use of net.minecraft.server.v1_12_R1.ContainerChest in project PaperDev by Kamillaova.
the class CraftContainer method setupSlots.
private void setupSlots(IInventory top, PlayerInventory bottom, EntityHuman entityhuman) {
switch(cachedType) {
case CREATIVE:
// TODO: This should be an error?
break;
case PLAYER:
case CHEST:
delegate = new ContainerChest(bottom, top, entityhuman);
break;
case DISPENSER:
case DROPPER:
delegate = new ContainerDispenser(bottom, top);
break;
case FURNACE:
delegate = new ContainerFurnace(bottom, top);
break;
// TODO: This should be an error?
case CRAFTING:
case WORKBENCH:
// SPIGOT-3812 - manually set up slots so we can use the delegated inventory and not the automatically created one
setupWorkbench(top, bottom);
break;
case ENCHANTING:
delegate = new ContainerEnchantTable(bottom, entityhuman.world, entityhuman.getChunkCoordinates());
break;
case BREWING:
delegate = new ContainerBrewingStand(bottom, top);
break;
case HOPPER:
delegate = new ContainerHopper(bottom, top, entityhuman);
break;
case ANVIL:
delegate = new ContainerAnvil(bottom, entityhuman.world, entityhuman.getChunkCoordinates(), entityhuman);
break;
case BEACON:
delegate = new ContainerBeacon(bottom, top);
break;
case SHULKER_BOX:
delegate = new ContainerShulkerBox(bottom, top, entityhuman);
break;
}
if (delegate != null) {
this.items = delegate.items;
this.slots = delegate.slots;
}
}
Aggregations