use of io.github.bananapuncher714.crafters.implementation.v1_13_R1.ContainerManager_v1_13_R1.SelfContainer in project PublicCrafters by BananaPuncher714.
the class CustomTileEntityContainerSelector method getWorkbenchContainer.
protected Container getWorkbenchContainer(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 io.github.bananapuncher714.crafters.implementation.v1_13_R1.ContainerManager_v1_13_R1.SelfContainer 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 inventory = crafting.resultInventory;
InventoryCraftResult result;
if (inventory instanceof InventoryCraftResult || inventory == null) {
result = new InventoryCraftResult();
crafting.resultInventory = result;
} else {
result = (InventoryCraftResult) inventory;
}
Container container = new CustomContainerWorkbench(ent.getBukkitEntity(), bloc, crafting, result);
crafting.addContainer(container);
return container;
}
use of io.github.bananapuncher714.crafters.implementation.v1_13_R1.ContainerManager_v1_13_R1.SelfContainer 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 inventory = crafting.resultInventory;
InventoryCraftResult result;
if (inventory instanceof InventoryCraftResult || inventory == null) {
result = new InventoryCraftResult();
crafting.resultInventory = result;
} else {
result = (InventoryCraftResult) inventory;
}
Container container = new CustomContainerWorkbench(ent.getBukkitEntity(), bloc, crafting, result);
crafting.addContainer(container);
return container;
}
use of io.github.bananapuncher714.crafters.implementation.v1_13_R1.ContainerManager_v1_13_R1.SelfContainer in project PublicCrafters by BananaPuncher714.
the class CustomTileEntityContainerWorkbench method createMenu.
/**
* This is an ITileEntityContainer method that returns a new container for whatever tile entity
*/
@Override
public Container createMenu(int id, PlayerInventory inv, EntityHuman ent) {
CustomInventoryCrafting crafting = manager.benches.get(bloc);
if (crafting == null) {
crafting = new CustomInventoryCrafting(bloc, manager, new SelfContainer(id), 3, 3);
manager.put(bloc, crafting);
}
IInventory inventory = crafting.resultInventory;
InventoryCraftResult result;
if (inventory instanceof InventoryCraftResult || inventory == null) {
result = new InventoryCraftResult();
crafting.resultInventory = result;
} else {
result = (InventoryCraftResult) inventory;
}
Container container = new CustomContainerWorkbench(id, ent.getBukkitEntity(), bloc, crafting, result);
crafting.addContainer(container);
return container;
}
use of io.github.bananapuncher714.crafters.implementation.v1_13_R1.ContainerManager_v1_13_R1.SelfContainer in project PublicCrafters by BananaPuncher714.
the class CustomTileEntityContainerWorkbench method createMenu.
/**
* This is an ITileEntityContainer method that returns a new container for whatever tile entity
*/
@Override
public Container createMenu(int id, PlayerInventory inv, EntityHuman ent) {
CustomInventoryCrafting crafting = manager.benches.get(bloc);
if (crafting == null) {
crafting = new CustomInventoryCrafting(bloc, manager, new SelfContainer(id), 3, 3);
manager.put(bloc, crafting);
}
IInventory inventory = crafting.resultInventory;
InventoryCraftResult result;
if (inventory instanceof InventoryCraftResult || inventory == null) {
result = new InventoryCraftResult();
crafting.resultInventory = result;
} else {
result = (InventoryCraftResult) inventory;
}
Container container = new CustomContainerWorkbench(id, ent.getBukkitEntity(), bloc, crafting, result);
crafting.addContainer(container);
return container;
}
Aggregations