Fix CraftContainer#getNotchInventoryType detection of player inventory (#12751)

This commit is contained in:
masmc05
2025-06-30 20:33:40 +03:00
committed by GitHub
parent 00e79dfb22
commit 6e021c8272

View File

@@ -111,7 +111,6 @@ public class CraftContainer extends AbstractContainerMenu {
public static net.minecraft.world.inventory.MenuType getNotchInventoryType(Inventory inventory) { public static net.minecraft.world.inventory.MenuType getNotchInventoryType(Inventory inventory) {
final InventoryType type = inventory.getType(); final InventoryType type = inventory.getType();
switch (type) { switch (type) {
case PLAYER:
case CHEST: case CHEST:
case ENDER_CHEST: case ENDER_CHEST:
case BARREL: case BARREL:
@@ -123,7 +122,6 @@ public class CraftContainer extends AbstractContainerMenu {
case 27: case 27:
return net.minecraft.world.inventory.MenuType.GENERIC_9x3; return net.minecraft.world.inventory.MenuType.GENERIC_9x3;
case 36: case 36:
case 41: // PLAYER
return net.minecraft.world.inventory.MenuType.GENERIC_9x4; return net.minecraft.world.inventory.MenuType.GENERIC_9x4;
case 45: case 45:
return net.minecraft.world.inventory.MenuType.GENERIC_9x5; return net.minecraft.world.inventory.MenuType.GENERIC_9x5;