3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-769: Fix opening custom inventories.

Dieser Commit ist enthalten in:
md_5 2015-05-24 10:42:53 +10:00
Ursprung 7bc9c08eb4
Commit 25de1e6baf

Datei anzeigen

@ -185,14 +185,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
break; break;
case DISPENSER: case DISPENSER:
if (craftinv.getInventory() instanceof TileEntityDispenser) { if (craftinv.getInventory() instanceof TileEntityDispenser) {
getHandle().openTileEntity((TileEntityDispenser) craftinv.getInventory()); getHandle().openContainer((TileEntityDispenser) craftinv.getInventory());
} else { } else {
openCustomInventory(inventory, player, "minecraft:dispenser"); openCustomInventory(inventory, player, "minecraft:dispenser");
} }
break; break;
case FURNACE: case FURNACE:
if (craftinv.getInventory() instanceof TileEntityFurnace) { if (craftinv.getInventory() instanceof TileEntityFurnace) {
getHandle().openTileEntity((TileEntityFurnace) craftinv.getInventory()); getHandle().openContainer((TileEntityFurnace) craftinv.getInventory());
} else { } else {
openCustomInventory(inventory, player, "minecraft:furnace"); openCustomInventory(inventory, player, "minecraft:furnace");
} }
@ -202,7 +202,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
break; break;
case BREWING: case BREWING:
if (craftinv.getInventory() instanceof TileEntityBrewingStand) { if (craftinv.getInventory() instanceof TileEntityBrewingStand) {
getHandle().openTileEntity((TileEntityBrewingStand) craftinv.getInventory()); getHandle().openContainer((TileEntityBrewingStand) craftinv.getInventory());
} else { } else {
openCustomInventory(inventory, player, "minecraft:brewing_stand"); openCustomInventory(inventory, player, "minecraft:brewing_stand");
} }
@ -212,16 +212,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
break; break;
case HOPPER: case HOPPER:
if (craftinv.getInventory() instanceof TileEntityHopper) { if (craftinv.getInventory() instanceof TileEntityHopper) {
getHandle().openTileEntity((TileEntityHopper) craftinv.getInventory()); getHandle().openContainer((TileEntityHopper) craftinv.getInventory());
} else if (craftinv.getInventory() instanceof EntityMinecartHopper) { } else if (craftinv.getInventory() instanceof EntityMinecartHopper) {
getHandle().openTileEntity((EntityMinecartHopper) craftinv.getInventory()); getHandle().openContainer((EntityMinecartHopper) craftinv.getInventory());
} else { } else {
openCustomInventory(inventory, player, "minecraft:hopper"); openCustomInventory(inventory, player, "minecraft:hopper");
} }
break; break;
case BEACON: case BEACON:
if (craftinv.getInventory() instanceof TileEntityBeacon) { if (craftinv.getInventory() instanceof TileEntityBeacon) {
getHandle().openTileEntity((TileEntityBeacon) craftinv.getInventory()); getHandle().openContainer((TileEntityBeacon) craftinv.getInventory());
} else { } else {
openCustomInventory(inventory, player, "minecraft:beacon"); openCustomInventory(inventory, player, "minecraft:beacon");
} }