Skip to content

Commit

Permalink
修点bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuqi154 committed Aug 25, 2024
1 parent 24b3c45 commit 1612fe4
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void render(KitchenwaresEntity pBlockEntity, float pPartialTick, PoseStac
PoseStack.Pose poseStack = pPoseStack.last();
float process;
if(pBlockEntity.getPersistentData().getDouble("timeleft")==0)
process = 1;
process = 0;
else
process = 1 - (float) pBlockEntity.getPersistentData().getDouble("timeleft") / cookedMealItem.getDefaultInstance().get(MIDatacomponet.MI_COOKTIME).cooktime();
VertexConsumer vertexconsumerIn = pBuffer.getBuffer(RENDER_TYPE_IN);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.hiedacamellia.mystiasizakaya.content.common.item.cuisines;
package org.hiedacamellia.mystiasizakaya.content.common.item.beverages;

import net.minecraft.world.item.Rarity;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Beverages;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Cuisines;

public class BingShanMaoYuDongNingItem extends Cuisines {
public class BingShanMaoYuDongNingItem extends Beverages {
public BingShanMaoYuDongNingItem() {
super(4, 1.2f, Rarity.COMMON, "bing_shan_mao_yu_dong_ning",
new String[]{"no_alcohol", "chillable", "soda", "stimulating", "fruity", "neat", "sweet"},
new String[]{},0);
new String[]{"no_alcohol", "chillable", "soda", "stimulating", "fruity", "neat", "sweet"});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class GuoWeiHighBallItem extends Beverages {
public GuoWeiHighBallItem() {
super(4, 0.8f, Rarity.COMMON, "guo_wei_high_ball", new String[]{"low_alcohol", "chill", "western", "cocktail",
super(4, 0.8f, Rarity.COMMON, "guo_wei_high_ball", new String[]{"low_alcohol", "chillable", "western", "cocktail",
"fruity", "sweet", "bitter"});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.hiedacamellia.mystiasizakaya.content.common.item.beverages;

import net.minecraft.world.item.Rarity;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Beverages;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Cuisines;

public class HongYouGuoZhiItem extends Beverages {
public HongYouGuoZhiItem() {
super(3, 0.8f, Rarity.COMMON, "hong_you_guo_zhi",
new String[]{"no_alcohol", "fruity"});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.hiedacamellia.mystiasizakaya.content.common.item.beverages;

import net.minecraft.world.item.Rarity;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Beverages;
import org.hiedacamellia.mystiasizakaya.content.common.item.items.Cuisines;

public class HuoShuQiuItem extends Beverages {
public HuoShuQiuItem() {
super(8, 0.8f, Rarity.COMMON, "huo_shu_qiu",
new String[]{"high_alcohol", "heatable", "shochu", "dry"});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
public class NiGeLuoNiItem extends Beverages {
public NiGeLuoNiItem() {
super(6, 0.8f, Rarity.COMMON, "ni_ge_luo_ni",
new String[]{"Mid_alcohol", "Chillable", "Western", "Cocktail", "Fruity", "Bitter"});
new String[]{"mid_alcohol", "chillable", "western", "cocktail", "fruity", "bitter"});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

public class QiItem extends Beverages {
public QiItem() {
super(4, 0.8f, Rarity.COMMON, "qi", new String[]{"low_alcohol", "chiilable", "sake", "cocktail", "soda", "sweet", "dry", "bitter"});
super(4, 0.8f, Rarity.COMMON, "qi",
new String[]{"low_alcohol", "chillable", "sake", "cocktail", "soda", "sweet", "dry", "bitter"});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
public class ShiSiYeItem extends Beverages {
public ShiSiYeItem() {
super(8, 1.2f, Rarity.COMMON, "shi_si_ye",
new String[]{"Mid_Alcohol", "Chillable", "Heatable", "Sake", "Vintage", "Sweet"});
new String[]{"mid_alcohol", "chillable", "heatable", "sake", "vintage", "sweet"});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
public class YueMianHuoJianItem extends Beverages {
public YueMianHuoJianItem() {
super(4, 0.8f, Rarity.COMMON, "yue_mian_huo_jian",
new String[]{"No_Alcohol", "Chillable", "Modern", "Soda"});
new String[]{"no_alcohol", "chillable", "modern", "soda"});
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.hiedacamellia.mystiasizakaya.core.event;

import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
Expand Down Expand Up @@ -39,6 +41,7 @@ public static void clonePlayer(PlayerEvent.Clone event) {

@SubscribeEvent
public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
Player player = event.getEntity();
if (!event.getEntity().hasData(MIAttachment.MI_ORDERS)) {
event.getEntity().setData(MIAttachment.MI_ORDERS, new MIOrders(new ArrayList<>(10),new ArrayList<>(10)));
}
Expand All @@ -48,6 +51,14 @@ public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
if (!event.getEntity().hasData(MIAttachment.MI_TURNOVER)) {
event.getEntity().setData(MIAttachment.MI_TURNOVER, new MITurnover(new ArrayList<>(),new ArrayList<>()));
}
if(player instanceof ServerPlayer){
MIBalance miBalance = player.getData(MIAttachment.MI_BALANCE);
miBalance.sync(player);
MIOrders miOrders = player.getData(MIAttachment.MI_ORDERS);
miOrders.sync(player);
MITurnover miTurnover = player.getData(MIAttachment.MI_TURNOVER);
miTurnover.sync(player);
}
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.hiedacamellia.mystiasizakaya.content.common.item.currency.En1Item;
import org.hiedacamellia.mystiasizakaya.content.common.item.currency.En5Item;
import org.hiedacamellia.mystiasizakaya.content.common.item.ingredients.*;
import org.hiedacamellia.mystiasizakaya.content.common.item.kitchenwares.*;
import org.hiedacamellia.mystiasizakaya.content.common.item.utils.LedgerItem;
import org.hiedacamellia.mystiasizakaya.content.common.item.utils.IconItem;
import org.hiedacamellia.mystiasizakaya.content.common.item.utils.IronKnifeItem;
Expand Down

0 comments on commit 1612fe4

Please sign in to comment.