修复MenuType传参错误

This commit is contained in:
Light_Quanta 2025-06-22 00:36:28 +08:00
parent 42f38d53f9
commit 422a2aaae8
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -1,11 +1,11 @@
package com.atsuishio.superbwarfare.menu; package com.atsuishio.superbwarfare.menu;
import com.atsuishio.superbwarfare.init.ModMenuTypes;
import net.minecraft.world.Container; import net.minecraft.world.Container;
import net.minecraft.world.SimpleContainer; import net.minecraft.world.SimpleContainer;
import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.inventory.Slot; import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -20,7 +20,7 @@ public class SuperbItemInterfaceMenu extends AbstractContainerMenu {
} }
public SuperbItemInterfaceMenu(int containerId, Inventory playerInventory, Container container) { public SuperbItemInterfaceMenu(int containerId, Inventory playerInventory, Container container) {
super(MenuType.HOPPER, containerId); super(ModMenuTypes.SUPERB_ITEM_INTERFACE_MENU.get(), containerId);
this.container = container; this.container = container;
checkContainerSize(container, CONTAINER_SIZE); checkContainerSize(container, CONTAINER_SIZE);
container.startOpen(playerInventory.player); container.startOpen(playerInventory.player);