Skip to content

Commit

Permalink
移动文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuqi154 committed Jun 21, 2024
1 parent 6bcfb56 commit cd441b6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/touhou/mystiasizakaya/MystiasIzakaya.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import net.touhou.mystiasizakaya.content.trades.Professions;
import net.touhou.mystiasizakaya.content.item.ModTab;
import net.touhou.mystiasizakaya.init.MystiasIzakayaModMenus;
import net.touhou.mystiasizakaya.functionals.Menus;
import net.touhou.mystiasizakaya.content.item.ItemRegistery;
import net.touhou.mystiasizakaya.content.block.ModBlocks;
import net.touhou.mystiasizakaya.content.block.BlockEntities;
Expand Down Expand Up @@ -49,7 +49,7 @@ public MystiasIzakaya() {
ModTab.REGISTRY.register(bus);

Professions.PROFESSIONS.register(bus);
MystiasIzakayaModMenus.REGISTRY.register(bus);
Menus.REGISTRY.register(bus);
}

private static final String PROTOCOL_VERSION = "1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* MCreator note: This file will be REGENERATED on each build.
*/
package net.touhou.mystiasizakaya.init;
package net.touhou.mystiasizakaya.functionals;

import net.touhou.mystiasizakaya.functionals.inventory.CookingRangeUiMenu;
import net.touhou.mystiasizakaya.functionals.inventory.BankUiMenu;
Expand All @@ -15,7 +15,7 @@

import net.minecraft.world.inventory.MenuType;

public class MystiasIzakayaModMenus {
public class Menus {
public static final DeferredRegister<MenuType<?>> REGISTRY = DeferredRegister.create(ForgeRegistries.MENU_TYPES, MystiasIzakaya.MODID);
public static final RegistryObject<MenuType<CookingRangeUiMenu>> COOKING_RANGE_UI = REGISTRY.register("cooking_range_ui", () -> IForgeMenuType.create(CookingRangeUiMenu::new));
public static final RegistryObject<MenuType<BankUiMenu>> BANK_UI = REGISTRY.register("bank_ui", () -> IForgeMenuType.create(BankUiMenu::new));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import net.minecraftforge.api.distmarker.Dist;

import net.minecraft.client.gui.screens.MenuScreens;
import net.touhou.mystiasizakaya.init.MystiasIzakayaModMenus;
import net.touhou.mystiasizakaya.functionals.Menus;

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ModScreens {
@SubscribeEvent
public static void clientLoad(FMLClientSetupEvent event) {
event.enqueueWork(() -> {
MenuScreens.register(MystiasIzakayaModMenus.COOKING_RANGE_UI.get(), CookingRangeUiScreen::new);
MenuScreens.register(MystiasIzakayaModMenus.BANK_UI.get(), BankUiScreen::new);
MenuScreens.register(Menus.COOKING_RANGE_UI.get(), CookingRangeUiScreen::new);
MenuScreens.register(Menus.BANK_UI.get(), BankUiScreen::new);
});
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

package net.touhou.mystiasizakaya.functionals.inventory;

import net.touhou.mystiasizakaya.init.MystiasIzakayaModMenus;
import net.touhou.mystiasizakaya.functionals.Menus;

import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.IItemHandler;
Expand Down Expand Up @@ -36,7 +36,7 @@ public class BankUiMenu extends AbstractContainerMenu implements Supplier<Map<In
private BlockEntity boundBlockEntity = null;

public BankUiMenu(int id, Inventory inv, FriendlyByteBuf extraData) {
super(MystiasIzakayaModMenus.BANK_UI.get(), id);
super(Menus.BANK_UI.get(), id);
this.entity = inv.player;
this.world = inv.player.level();
this.internal = new ItemStackHandler(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.SlotItemHandler;
import net.touhou.mystiasizakaya.init.MystiasIzakayaModMenus;
import net.touhou.mystiasizakaya.functionals.Menus;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -39,7 +39,7 @@ public class CookingRangeUiMenu extends AbstractContainerMenu implements Supplie
private BlockEntity boundBlockEntity = null;

public CookingRangeUiMenu(int id, Inventory inv, FriendlyByteBuf extraData) {
super(MystiasIzakayaModMenus.COOKING_RANGE_UI.get(), id);
super(Menus.COOKING_RANGE_UI.get(), id);
this.entity = inv.player;
this.world = inv.player.level();
this.internal = new ItemStackHandler(12);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package net.touhou.mystiasizakaya.init;
package net.touhou.mystiasizakaya.integration.jei;

import net.minecraft.world.item.Items;
import net.minecraft.world.item.ItemStack;
Expand All @@ -16,7 +16,7 @@
import java.util.ArrayList;

@JeiPlugin
public class MystiasIzakayaModBrewingRecipes implements IModPlugin {
public class BrewingRecipes implements IModPlugin {
@Override
public ResourceLocation getPluginUid() {
return new ResourceLocation("mystias_izakaya:brewing_recipes");
Expand Down

0 comments on commit cd441b6

Please sign in to comment.