diff --git a/src/main/java/net/touhou/mystiasizakaya/block/CookingRangeBlock.java b/src/main/java/net/touhou/mystiasizakaya/block/CookingRangeBlock.java index 8f6f32aa..4ecabfbc 100644 --- a/src/main/java/net/touhou/mystiasizakaya/block/CookingRangeBlock.java +++ b/src/main/java/net/touhou/mystiasizakaya/block/CookingRangeBlock.java @@ -3,7 +3,7 @@ import net.touhou.mystiasizakaya.world.inventory.CookingRangeUiMenu; import net.touhou.mystiasizakaya.procedures.ReProcedure; -import net.touhou.mystiasizakaya.procedures.MainProcedure; +import net.touhou.mystiasizakaya.cooking.Main; import net.touhou.mystiasizakaya.procedures.InitialCookProcedure; import net.touhou.mystiasizakaya.procedures.CleanProcedure; import net.touhou.mystiasizakaya.block.entity.CookingRangeBlockEntity; @@ -46,10 +46,8 @@ import net.minecraft.client.gui.screens.Screen; import java.util.List; -import java.util.Set; import java.util.Arrays; import java.util.Collections; -import java.util.LinkedHashSet; import io.netty.buffer.Unpooled; @@ -111,7 +109,7 @@ public void tick(BlockState blockstate, ServerLevel world, BlockPos pos, RandomS int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); - MainProcedure.execute(world, x, y, z); + Main.execute(world, x, y, z); world.scheduleTick(pos, this, 1); } diff --git a/src/main/java/net/touhou/mystiasizakaya/client/gui/BankUiScreen.java b/src/main/java/net/touhou/mystiasizakaya/client/gui/BankUiScreen.java index 78222293..661e86a2 100644 --- a/src/main/java/net/touhou/mystiasizakaya/client/gui/BankUiScreen.java +++ b/src/main/java/net/touhou/mystiasizakaya/client/gui/BankUiScreen.java @@ -1,7 +1,6 @@ package net.touhou.mystiasizakaya.client.gui; import net.touhou.mystiasizakaya.world.inventory.BankUiMenu; -import net.touhou.mystiasizakaya.procedures.Text10Procedure; import net.touhou.mystiasizakaya.network.BankUiButtonMessage; import net.touhou.mystiasizakaya.MystiasIzakayaMod; @@ -78,7 +77,7 @@ public void containerTick() { protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) { guiGraphics.drawString(this.font, - Text10Procedure.execute(), 66, 24, -12829636, false); + Component.translatable("gui.mystias_izakaya.bank_ui.bank").getString(), 66, 24, -12829636, false); } @Override diff --git a/src/main/java/net/touhou/mystiasizakaya/client/gui/CookingRangeUiScreen.java b/src/main/java/net/touhou/mystiasizakaya/client/gui/CookingRangeUiScreen.java index cf768ff1..55a33ce1 100644 --- a/src/main/java/net/touhou/mystiasizakaya/client/gui/CookingRangeUiScreen.java +++ b/src/main/java/net/touhou/mystiasizakaya/client/gui/CookingRangeUiScreen.java @@ -1,10 +1,10 @@ package net.touhou.mystiasizakaya.client.gui; import net.touhou.mystiasizakaya.world.inventory.CookingRangeUiMenu; -import net.touhou.mystiasizakaya.procedures.TargetsText; -import net.touhou.mystiasizakaya.procedures.ButtunShow; -import net.touhou.mystiasizakaya.procedures.StatusProcedure; -import net.touhou.mystiasizakaya.procedures.LefttimeProcedure; +import net.touhou.mystiasizakaya.util.TargetsText; +import net.touhou.mystiasizakaya.util.ButtunShow; +import net.touhou.mystiasizakaya.cooking.ui.Status; +import net.touhou.mystiasizakaya.cooking.ui.Lefttime; import net.touhou.mystiasizakaya.network.CookingRangeUiButtonMessage; import net.touhou.mystiasizakaya.MystiasIzakayaMod; @@ -85,8 +85,8 @@ protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) { guiGraphics.drawString(this.font, TargetsText.get(world, x, y, z, 2), 44, 83, -1, false); guiGraphics.drawString(this.font, TargetsText.get(world, x, y, z, 3), 44, 110, -1, false); guiGraphics.drawString(this.font, TargetsText.get(world, x, y, z, 4), 44, 137, -1, false); - guiGraphics.drawString(this.font, StatusProcedure.execute(world, x, y, z), 233, 26, -1, false); - guiGraphics.drawString(this.font, LefttimeProcedure.execute(world, x, y, z), 238, 65, -1, false); + guiGraphics.drawString(this.font, Status.execute(world, x, y, z), 233, 26, -1, false); + guiGraphics.drawString(this.font, Lefttime.execute(world, x, y, z), 238, 65, -1, false); } @Override diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/ConfirmProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/Confirm.java similarity index 86% rename from src/main/java/net/touhou/mystiasizakaya/procedures/ConfirmProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/Confirm.java index 02f73941..1aa5935a 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/ConfirmProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/Confirm.java @@ -1,10 +1,8 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.entity.BlockEntity; @@ -13,16 +11,20 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.GetKitchenwareTagProcedure; +import net.touhou.mystiasizakaya.cooking.get.GetTagFromItemStacks; +import net.touhou.mystiasizakaya.cooking.get.GetTargetNagetivetags; +import net.touhou.mystiasizakaya.cooking.get.GetTargetTags; +import net.touhou.mystiasizakaya.util.GetItemStack; +import net.touhou.mystiasizakaya.util.GetValue; +import net.touhou.mystiasizakaya.util.SetSlotItem; -import java.util.concurrent.atomic.AtomicReference; import java.util.Set; import java.util.LinkedHashSet; import java.util.HashSet; import java.util.ArrayList; -public class ConfirmProcedure { +public class Confirm { public static void execute(LevelAccessor world, double x, double y, double z) { boolean bool = false; double time = 0; @@ -33,9 +35,9 @@ public static void execute(LevelAccessor world, double x, double y, double z) { if ((ItemStack.EMPTY.getItem() == GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), 6).getItem()) && !(ItemStack.EMPTY.getItem() == GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), 12) .getItem()) && time == 0) { - ArrayList rawtags = (ArrayList) GetTagFromItemStacksProcedure.execute(world, x, y, z); - ArrayList targettags = (ArrayList) GetTargetTagsProcedure.execute(world, x, y, z); - ArrayList targetntags = (ArrayList) GetTargetNagetivetagsProcedure.execute(world, x, y, z); + ArrayList rawtags = (ArrayList) GetTagFromItemStacks.execute(world, x, y, z); + ArrayList targettags = (ArrayList) GetTargetTags.execute(world, x, y, z); + ArrayList targetntags = (ArrayList) GetTargetNagetivetags.execute(world, x, y, z); target = GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), 12); Kitchenware = GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), 0); ArrayList combinedList = new ArrayList(rawtags); @@ -93,7 +95,7 @@ public static void execute(LevelAccessor world, double x, double y, double z) { BlockEntity _blockEntity = world.getBlockEntity(_bp); BlockState _bs = world.getBlockState(_bp); if (_blockEntity != null) - _blockEntity.getPersistentData().putDouble("timeleft", GetTimeProcedure.execute(world, x, y, z)); + _blockEntity.getPersistentData().putDouble("timeleft", GetTime.execute(world, x, y, z)); if (world instanceof Level _level) _level.sendBlockUpdated(_bp, _bs, _bs, 3); } diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTimeProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/GetTime.java similarity index 95% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetTimeProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/GetTime.java index 795bf82e..95106551 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTimeProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/GetTime.java @@ -1,20 +1,14 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; -import net.minecraftforge.common.capabilities.ForgeCapabilities; - -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; - -import java.util.concurrent.atomic.AtomicReference; +import net.touhou.mystiasizakaya.util.GetItemStack; -public class GetTimeProcedure { +public class GetTime { public static double execute(LevelAccessor world, double x, double y, double z) { ItemStack target = ItemStack.EMPTY; double time = 0; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/MainProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/Main.java similarity index 88% rename from src/main/java/net/touhou/mystiasizakaya/procedures/MainProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/Main.java index 9049e2af..4ab7cfe0 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/MainProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/Main.java @@ -1,10 +1,9 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking; +import net.touhou.mystiasizakaya.cooking.kitchenwares.*; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.entity.BlockEntity; @@ -14,19 +13,16 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; -import net.touhou.mystiasizakaya.procedures.GetValue; +import net.touhou.mystiasizakaya.util.GetItemStack; +import net.touhou.mystiasizakaya.util.SetSlotItem; +import net.touhou.mystiasizakaya.util.GetValue; import java.util.regex.Pattern; import java.util.regex.Matcher; -import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.atomic.AtomicInteger; import java.util.List; -import java.util.Set; import java.util.ArrayList; -public class MainProcedure { +public class Main { public static void execute(LevelAccessor world, double x, double y, double z) { String str = ""; double i = 0; @@ -101,19 +97,19 @@ public static void execute(LevelAccessor world, double x, double y, double z) { SetSlotItem.setEmptySlot(world, x, y, z, 12); } if (util.getItem() == MystiasIzakayaModItems.LIAO_LI_TAI.get()) { - str = CuttingBoardProcedure.execute(world, x, y, z); + str = CuttingBoard.execute(world, x, y, z); } if (util.getItem() == MystiasIzakayaModItems.SHAO_KAO_JIA.get()) { - str = GrillProcedure.execute(world, x, y, z); + str = Grill.execute(world, x, y, z); } if (util.getItem() == MystiasIzakayaModItems.YOU_GUO.get()) { - str = FryingPanProcedure.execute(world, x, y, z); + str = FryingPan.execute(world, x, y, z); } if (util.getItem() == MystiasIzakayaModItems.ZHENG_GUO.get()) { - str = SteamerProcedure.execute(world, x, y, z); + str = Steamer.execute(world, x, y, z); } if (util.getItem() == MystiasIzakayaModItems.ZHU_GUO.get()) { - str = BoilingPotProcedure.execute(world, x, y, z); + str = BoilingPot.execute(world, x, y, z); } String longString = str; String regex = "\\$start%(.*?)\\$end%"; // 创建 Pattern 对象 diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetRawsFromSelectedFoodProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetRawsFromSelectedFood.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetRawsFromSelectedFoodProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/get/GetRawsFromSelectedFood.java index f1ab1908..c410b32c 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetRawsFromSelectedFoodProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetRawsFromSelectedFood.java @@ -1,21 +1,18 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.get; -import org.checkerframework.checker.units.qual.s; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; -import net.minecraftforge.common.capabilities.ForgeCapabilities; - -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class GetRawsFromSelectedFoodProcedure { +public class GetRawsFromSelectedFood { public static ArrayList execute(LevelAccessor world, double x, double y, double z) { ItemStack s = ItemStack.EMPTY; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromItemStacksProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromItemStacks.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromItemStacksProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromItemStacks.java index 5b870da6..cfd638d5 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromItemStacksProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromItemStacks.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.get; import net.touhou.mystiasizakaya.item.ZunYuItem; import net.touhou.mystiasizakaya.item.ZhuZiItem; @@ -62,7 +62,7 @@ import java.util.LinkedHashSet; import java.util.ArrayList; -public class GetTagFromItemStacksProcedure { +public class GetTagFromItemStacks { public static ArrayList execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; @@ -71,7 +71,7 @@ public static ArrayList execute(LevelAccessor world, double x, double y, double List araws = new ArrayList<>(); List tags = new ArrayList<>(); List negativetags = new ArrayList<>(); - araws = (ArrayList) GetRawsFromSelectedFoodProcedure.execute(world, x, y, z); + araws = (ArrayList) GetRawsFromSelectedFood.execute(world, x, y, z); i = 0; while (i < araws.size()) { raws.add((ForgeRegistries.ITEMS.getKey((araws.get((int) i) instanceof ItemStack _bs ? _bs : ItemStack.EMPTY).getItem()).toString())); diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromRawsProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromRaws.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromRawsProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromRaws.java index df630bf6..72d0877e 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTagFromRawsProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTagFromRaws.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.get; import net.touhou.mystiasizakaya.item.ZunYuItem; import net.touhou.mystiasizakaya.item.ZhuZiItem; @@ -53,23 +53,20 @@ import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import java.util.concurrent.atomic.AtomicReference; import java.util.Set; import java.util.List; import java.util.LinkedHashSet; import java.util.ArrayList; -public class GetTagFromRawsProcedure { +public class GetTagFromRaws { public static ArrayList execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetNagetivetagsProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetNagetivetags.java similarity index 97% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetNagetivetagsProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetNagetivetags.java index 514032ed..98ec39d2 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetNagetivetagsProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetNagetivetags.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.get; import net.touhou.mystiasizakaya.item.ZhuTongZhengDanItem; import net.touhou.mystiasizakaya.item.ZhuSunChaoRouItem; @@ -74,23 +74,18 @@ import net.touhou.mystiasizakaya.item.BaiGuoLuoBuPaiGuTangItem; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; -import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.touhou.mystiasizakaya.util.GetItemStack; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; - -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import java.util.concurrent.atomic.AtomicReference; import java.util.Set; import java.util.List; import java.util.LinkedHashSet; import java.util.ArrayList; -public class GetTargetNagetivetagsProcedure { +public class GetTargetNagetivetags { public static ArrayList execute(LevelAccessor world, double x, double y, double z) { ItemStack target = ItemStack.EMPTY; double time = 0; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetTagsProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetTags.java similarity index 97% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetTagsProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetTags.java index 820a048a..78076704 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetTargetTagsProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/get/GetTargetTags.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.get; import net.touhou.mystiasizakaya.item.ZhuTongZhengDanItem; import net.touhou.mystiasizakaya.item.ZhuSunChaoRouItem; @@ -74,23 +74,18 @@ import net.touhou.mystiasizakaya.item.BaiGuoLuoBuPaiGuTangItem; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; -import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.touhou.mystiasizakaya.util.GetItemStack; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; - -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import java.util.concurrent.atomic.AtomicReference; import java.util.Set; import java.util.List; import java.util.LinkedHashSet; import java.util.ArrayList; -public class GetTargetTagsProcedure { +public class GetTargetTags { public static ArrayList execute(LevelAccessor world, double x, double y, double z) { ItemStack target = ItemStack.EMPTY; double time = 0; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/BoilingPotProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/BoilingPot.java similarity index 95% rename from src/main/java/net/touhou/mystiasizakaya/procedures/BoilingPotProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/BoilingPot.java index f2795c21..bcae726e 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/BoilingPotProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/BoilingPot.java @@ -1,23 +1,20 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.kitchenwares; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class BoilingPotProcedure { +public class BoilingPot { public static String execute(LevelAccessor world, double x, double y, double z) { String str = ""; List raws = new ArrayList<>(); diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/CuttingBoardProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/CuttingBoard.java similarity index 95% rename from src/main/java/net/touhou/mystiasizakaya/procedures/CuttingBoardProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/CuttingBoard.java index fef82ec4..03f11ff5 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/CuttingBoardProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/CuttingBoard.java @@ -1,23 +1,20 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.kitchenwares; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class CuttingBoardProcedure { +public class CuttingBoard { public static String execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/FryingPanProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/FryingPan.java similarity index 95% rename from src/main/java/net/touhou/mystiasizakaya/procedures/FryingPanProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/FryingPan.java index 1c9300fc..bc985bba 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/FryingPanProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/FryingPan.java @@ -1,23 +1,20 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.kitchenwares; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class FryingPanProcedure { +public class FryingPan { public static String execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GrillProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Grill.java similarity index 91% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GrillProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Grill.java index 4eab0b4a..06414927 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GrillProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Grill.java @@ -1,23 +1,20 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.kitchenwares; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class GrillProcedure { +public class Grill { public static String execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/SteamerProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Steamer.java similarity index 93% rename from src/main/java/net/touhou/mystiasizakaya/procedures/SteamerProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Steamer.java index fa712aa4..d0eddd32 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/SteamerProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/kitchenwares/Steamer.java @@ -1,23 +1,20 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.kitchenwares; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; +import net.touhou.mystiasizakaya.procedures.YHCProcedure; +import net.touhou.mystiasizakaya.util.GetItemStack; -import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.ArrayList; -public class SteamerProcedure { +public class Steamer { public static String execute(LevelAccessor world, double x, double y, double z) { String str = ""; ItemStack raw = ItemStack.EMPTY; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/LefttimeProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/ui/Lefttime.java similarity index 68% rename from src/main/java/net/touhou/mystiasizakaya/procedures/LefttimeProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/ui/Lefttime.java index cc5f3e57..facf33f9 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/LefttimeProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/ui/Lefttime.java @@ -1,12 +1,11 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.ui; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetValue; +import net.touhou.mystiasizakaya.util.GetValue; -public class LefttimeProcedure { +public class Lefttime { public static String execute(LevelAccessor world, double x, double y, double z) { if (GetValue.getDouble(world, BlockPos.containing(x, y, z), "timeleft") != 0) { return new java.text.DecimalFormat("#.#") diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/StatusProcedure.java b/src/main/java/net/touhou/mystiasizakaya/cooking/ui/Status.java similarity index 67% rename from src/main/java/net/touhou/mystiasizakaya/procedures/StatusProcedure.java rename to src/main/java/net/touhou/mystiasizakaya/cooking/ui/Status.java index f56c7c43..3800eb3a 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/StatusProcedure.java +++ b/src/main/java/net/touhou/mystiasizakaya/cooking/ui/Status.java @@ -1,15 +1,13 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.cooking.ui; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.network.chat.Component; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; -import net.touhou.mystiasizakaya.procedures.GetValue; +import net.touhou.mystiasizakaya.util.GetItemStack; +import net.touhou.mystiasizakaya.util.GetValue; -public class StatusProcedure { +public class Status { public static String execute(LevelAccessor world, double x, double y, double z) { if (GetValue.getDouble(world, BlockPos.containing(x, y, z), "timeleft") != 0) { return Component.translatable("status.mystias_izakaya.working").getString(); diff --git a/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModJeiPlugin.java b/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModJeiPlugin.java index 242f3b05..75304089 100644 --- a/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModJeiPlugin.java +++ b/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModJeiPlugin.java @@ -1,16 +1,16 @@ package net.touhou.mystiasizakaya.init; -import net.touhou.mystiasizakaya.jei_recipes.StreamerTypeRecipeCategory; -import net.touhou.mystiasizakaya.jei_recipes.StreamerTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.GrillTypeRecipeCategory; -import net.touhou.mystiasizakaya.jei_recipes.GrillTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.FryingPanTypeRecipeCategory; -import net.touhou.mystiasizakaya.jei_recipes.FryingPanTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.CuttingBoardTypeRecipeCategory; -import net.touhou.mystiasizakaya.jei_recipes.CuttingBoardTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.BoilingPotTypeRecipeCategory; -import net.touhou.mystiasizakaya.jei_recipes.BoilingPotTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.StreamerTypeRecipeCategory; +import net.touhou.mystiasizakaya.integration.jei.StreamerTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.GrillTypeRecipeCategory; +import net.touhou.mystiasizakaya.integration.jei.GrillTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.FryingPanTypeRecipeCategory; +import net.touhou.mystiasizakaya.integration.jei.FryingPanTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.CuttingBoardTypeRecipeCategory; +import net.touhou.mystiasizakaya.integration.jei.CuttingBoardTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.BoilingPotTypeRecipeCategory; +import net.touhou.mystiasizakaya.integration.jei.BoilingPotTypeRecipe; import net.minecraft.world.item.crafting.RecipeManager; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModRecipeTypes.java b/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModRecipeTypes.java index 46eee0bc..31af5110 100644 --- a/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModRecipeTypes.java +++ b/src/main/java/net/touhou/mystiasizakaya/init/MystiasIzakayaModRecipeTypes.java @@ -1,10 +1,10 @@ package net.touhou.mystiasizakaya.init; -import net.touhou.mystiasizakaya.jei_recipes.StreamerTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.GrillTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.FryingPanTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.CuttingBoardTypeRecipe; -import net.touhou.mystiasizakaya.jei_recipes.BoilingPotTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.StreamerTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.GrillTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.FryingPanTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.CuttingBoardTypeRecipe; +import net.touhou.mystiasizakaya.integration.jei.BoilingPotTypeRecipe; import net.touhou.mystiasizakaya.MystiasIzakayaMod; import net.minecraftforge.registries.ForgeRegistries; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipe.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipe.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipe.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipe.java index b25ac9ff..5a84456b 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipe.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipe.java @@ -1,6 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; -import net.minecraft.world.level.storage.loot.Serializer; import net.minecraft.world.level.Level; import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.item.crafting.RecipeType; @@ -17,8 +16,6 @@ import javax.annotation.Nullable; -import java.lang.reflect.Type; - import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipeCategory.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipeCategory.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipeCategory.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipeCategory.java index 01bc9039..7420b81f 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/BoilingPotTypeRecipeCategory.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/BoilingPotTypeRecipeCategory.java @@ -1,5 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; import net.touhou.mystiasizakaya.init.MystiasIzakayaModJeiPlugin; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipe.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipe.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipe.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipe.java index 524179ae..0ad4594d 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipe.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipe.java @@ -1,6 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; -import net.minecraft.world.level.storage.loot.Serializer; import net.minecraft.world.level.Level; import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.item.crafting.RecipeType; @@ -17,8 +16,6 @@ import javax.annotation.Nullable; -import java.lang.reflect.Type; - import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipeCategory.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipeCategory.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipeCategory.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipeCategory.java index 8da99f82..b05b7c81 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/CuttingBoardTypeRecipeCategory.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/CuttingBoardTypeRecipeCategory.java @@ -1,5 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; import net.touhou.mystiasizakaya.init.MystiasIzakayaModJeiPlugin; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipe.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipe.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipe.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipe.java index b5da4be7..871647c8 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipe.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipe.java @@ -1,6 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; -import net.minecraft.world.level.storage.loot.Serializer; import net.minecraft.world.level.Level; import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.item.crafting.RecipeType; @@ -17,8 +16,6 @@ import javax.annotation.Nullable; -import java.lang.reflect.Type; - import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipeCategory.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipeCategory.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipeCategory.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipeCategory.java index 491809ff..c126c600 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/FryingPanTypeRecipeCategory.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/FryingPanTypeRecipeCategory.java @@ -1,5 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; import net.touhou.mystiasizakaya.init.MystiasIzakayaModJeiPlugin; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipe.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipe.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipe.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipe.java index befc4305..cc99b204 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipe.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipe.java @@ -1,6 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; -import net.minecraft.world.level.storage.loot.Serializer; import net.minecraft.world.level.Level; import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.item.crafting.RecipeType; @@ -17,8 +16,6 @@ import javax.annotation.Nullable; -import java.lang.reflect.Type; - import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipeCategory.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipeCategory.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipeCategory.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipeCategory.java index cf382632..c569eb3a 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/GrillTypeRecipeCategory.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/GrillTypeRecipeCategory.java @@ -1,5 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; import net.touhou.mystiasizakaya.init.MystiasIzakayaModJeiPlugin; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipe.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipe.java similarity index 96% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipe.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipe.java index 05be7905..32726674 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipe.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipe.java @@ -1,6 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; -import net.minecraft.world.level.storage.loot.Serializer; import net.minecraft.world.level.Level; import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraft.world.item.crafting.RecipeType; @@ -17,8 +16,6 @@ import javax.annotation.Nullable; -import java.lang.reflect.Type; - import com.google.gson.JsonObject; import com.google.gson.JsonArray; diff --git a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipeCategory.java b/src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipeCategory.java similarity index 98% rename from src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipeCategory.java rename to src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipeCategory.java index ca8a05df..5b8e4706 100644 --- a/src/main/java/net/touhou/mystiasizakaya/jei_recipes/StreamerTypeRecipeCategory.java +++ b/src/main/java/net/touhou/mystiasizakaya/integration/jei/StreamerTypeRecipeCategory.java @@ -1,5 +1,5 @@ -package net.touhou.mystiasizakaya.jei_recipes; +package net.touhou.mystiasizakaya.integration.jei; import net.touhou.mystiasizakaya.init.MystiasIzakayaModJeiPlugin; import net.touhou.mystiasizakaya.init.MystiasIzakayaModItems; diff --git a/src/main/java/net/touhou/mystiasizakaya/network/CookingRangeUiButtonMessage.java b/src/main/java/net/touhou/mystiasizakaya/network/CookingRangeUiButtonMessage.java index 8b30f070..a318dfd0 100644 --- a/src/main/java/net/touhou/mystiasizakaya/network/CookingRangeUiButtonMessage.java +++ b/src/main/java/net/touhou/mystiasizakaya/network/CookingRangeUiButtonMessage.java @@ -2,8 +2,8 @@ package net.touhou.mystiasizakaya.network; import net.touhou.mystiasizakaya.world.inventory.CookingRangeUiMenu; -import net.touhou.mystiasizakaya.procedures.ConfirmProcedure; -import net.touhou.mystiasizakaya.procedures.SelectTarget; +import net.touhou.mystiasizakaya.cooking.Confirm; +import net.touhou.mystiasizakaya.util.SelectTarget; import net.touhou.mystiasizakaya.MystiasIzakayaMod; import net.minecraftforge.network.NetworkEvent; @@ -65,7 +65,7 @@ public static void handleButtonAction(Player entity, int buttonID, int x, int y, return; if (buttonID == 0) { - ConfirmProcedure.execute(world, x, y, z); + Confirm.execute(world, x, y, z); } if (buttonID == 1) { SelectTarget.set(world, x, y, z, 7); diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/SelectTarget.java b/src/main/java/net/touhou/mystiasizakaya/procedures/SelectTarget.java deleted file mode 100644 index e6743d54..00000000 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/SelectTarget.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.touhou.mystiasizakaya.procedures; - -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.common.capabilities.ForgeCapabilities; - -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.item.ItemStack; -import net.minecraft.core.BlockPos; - -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; - -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; - -public class SelectTarget { - public static void set(LevelAccessor world, double x, double y, double z,int targetSlot) { - MainProcedure.execute(world, x, y, z); - SetSlotItem.setSlotItem(world, x, y, z, GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), targetSlot), 12, 1); - } -} diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/TestProcedure.java b/src/main/java/net/touhou/mystiasizakaya/procedures/TestProcedure.java deleted file mode 100644 index 7077f90c..00000000 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/TestProcedure.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.touhou.mystiasizakaya.procedures; - -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.resources.ResourceKey; -import net.minecraft.core.registries.Registries; - -public class TestProcedure { - public static void execute(LevelAccessor world, Entity entity) { - if (entity == null) - return; - if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide()) - _entity.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, 60, 1)); - entity.hurt(new DamageSource(world.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation("mystias_izakaya:chili")))), 2); - } -} diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/Text10Procedure.java b/src/main/java/net/touhou/mystiasizakaya/procedures/Text10Procedure.java deleted file mode 100644 index ed81280c..00000000 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/Text10Procedure.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.touhou.mystiasizakaya.procedures; - -import net.minecraft.network.chat.Component; - -public class Text10Procedure { - public static String execute() { - return Component.translatable("gui.mystias_izakaya.bank_ui.bank").getString(); - } -} diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/ButtunShow.java b/src/main/java/net/touhou/mystiasizakaya/util/ButtunShow.java similarity index 93% rename from src/main/java/net/touhou/mystiasizakaya/procedures/ButtunShow.java rename to src/main/java/net/touhou/mystiasizakaya/util/ButtunShow.java index 90304670..fce85d72 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/ButtunShow.java +++ b/src/main/java/net/touhou/mystiasizakaya/util/ButtunShow.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.util; import net.minecraft.world.item.ItemStack; import net.minecraft.world.inventory.Slot; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetItemStack.java b/src/main/java/net/touhou/mystiasizakaya/util/GetItemStack.java similarity index 94% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetItemStack.java rename to src/main/java/net/touhou/mystiasizakaya/util/GetItemStack.java index 423ea5d5..c6234210 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetItemStack.java +++ b/src/main/java/net/touhou/mystiasizakaya/util/GetItemStack.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.util; import java.util.concurrent.atomic.AtomicReference; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/GetValue.java b/src/main/java/net/touhou/mystiasizakaya/util/GetValue.java similarity index 88% rename from src/main/java/net/touhou/mystiasizakaya/procedures/GetValue.java rename to src/main/java/net/touhou/mystiasizakaya/util/GetValue.java index 8bced32e..5990d0a6 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/GetValue.java +++ b/src/main/java/net/touhou/mystiasizakaya/util/GetValue.java @@ -1,8 +1,7 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.util; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; -import net.minecraft.network.chat.Component; import net.minecraft.core.BlockPos; public class GetValue { diff --git a/src/main/java/net/touhou/mystiasizakaya/util/SelectTarget.java b/src/main/java/net/touhou/mystiasizakaya/util/SelectTarget.java new file mode 100644 index 00000000..0b8727ab --- /dev/null +++ b/src/main/java/net/touhou/mystiasizakaya/util/SelectTarget.java @@ -0,0 +1,13 @@ +package net.touhou.mystiasizakaya.util; + +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.core.BlockPos; + +import net.touhou.mystiasizakaya.cooking.Main; + +public class SelectTarget { + public static void set(LevelAccessor world, double x, double y, double z,int targetSlot) { + Main.execute(world, x, y, z); + SetSlotItem.setSlotItem(world, x, y, z, GetItemStack.getItemStack(world, BlockPos.containing(x, y, z), targetSlot), 12, 1); + } +} diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/SetSlotItem.java b/src/main/java/net/touhou/mystiasizakaya/util/SetSlotItem.java similarity index 97% rename from src/main/java/net/touhou/mystiasizakaya/procedures/SetSlotItem.java rename to src/main/java/net/touhou/mystiasizakaya/util/SetSlotItem.java index 1bf789d6..8af04bd4 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/SetSlotItem.java +++ b/src/main/java/net/touhou/mystiasizakaya/util/SetSlotItem.java @@ -1,4 +1,4 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.util; import net.minecraft.core.BlockPos; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/net/touhou/mystiasizakaya/procedures/TargetsText.java b/src/main/java/net/touhou/mystiasizakaya/util/TargetsText.java similarity index 63% rename from src/main/java/net/touhou/mystiasizakaya/procedures/TargetsText.java rename to src/main/java/net/touhou/mystiasizakaya/util/TargetsText.java index 028e01c1..e5f5132d 100644 --- a/src/main/java/net/touhou/mystiasizakaya/procedures/TargetsText.java +++ b/src/main/java/net/touhou/mystiasizakaya/util/TargetsText.java @@ -1,17 +1,9 @@ -package net.touhou.mystiasizakaya.procedures; +package net.touhou.mystiasizakaya.util; -import net.minecraftforge.common.capabilities.ForgeCapabilities; - -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; import net.minecraft.core.BlockPos; -import net.touhou.mystiasizakaya.procedures.GetItemStack; -import net.touhou.mystiasizakaya.procedures.SetSlotItem; - -import java.util.concurrent.atomic.AtomicReference; - public class TargetsText { public static String get(LevelAccessor world, double x, double y, double z, double i) { String str = ""; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index f2e72f1a..a2c35a23 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,12 +4,12 @@ license="GNU General Public License version 3 (GPLv3)" [[mods]] modId="mystias_izakaya" -version="0.0.8a" +version="0.0.8b" displayName="Mystia's Izakaya" displayURL="https://www.curseforge.com/minecraft/mc-mods/mystias-izakaya" credits="modding from 东方夜雀食堂" authors="HiedaCamellia" -description="ver0.0.8a" +description="ver0.0.8b" [[dependencies.mystias_izakaya]] modId="minecraft"