use of net.minecraft.server.v1_14_R1.InventoryCraftResult in project PublicCrafters by BananaPuncher714.
the class CustomTileEntityContainerWorkbench method createContainer.
/**
* This is an ITileEntityContainer method that returns a new container for whatever tile entity
*/
@Override
public Container createContainer(PlayerInventory paramPlayerInventory, EntityHuman ent) {
CustomInventoryCrafting crafting = manager.benches.get(bloc);
if (crafting == null) {
crafting = new CustomInventoryCrafting(bloc, manager, new SelfContainer(), 3, 3);
manager.put(bloc, crafting);
}
IInventory result = crafting.resultInventory;
if (result == null) {
result = new InventoryCraftResult();
crafting.resultInventory = result;
}
Container container = new CustomContainerWorkbench(ent.getBukkitEntity(), bloc, crafting, result);
crafting.addContainer(container);
return container;
}
use of net.minecraft.server.v1_14_R1.InventoryCraftResult in project PublicCrafters by BananaPuncher714.
the class ContainerManager_v1_11_R1 method load.
@Override
public void load(Location location, List<ItemStack> items) {
CustomInventoryCrafting crafting = new CustomInventoryCrafting(location, this, new SelfContainer(), 3, 3);
InventoryCraftResult result = new InventoryCraftResult();
crafting.resultInventory = result;
crafting.setItems(items);
benches.put(location, crafting);
}
Aggregations