Basic Dynamic cell rendering
This commit is contained in:
parent
fb2a5a15b9
commit
8964c5aceb
16 changed files with 241 additions and 45 deletions
|
@ -40,7 +40,7 @@ import techreborn.TechReborn;
|
|||
import techreborn.init.ModRecipes;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -65,8 +65,8 @@ public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity i
|
|||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("centrifuge").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, ItemDynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, ItemDynamicCell.getEmptyCell(1), true, true))
|
||||
.outputSlot(2, 82, 44).outputSlot(3, 101, 25)
|
||||
.outputSlot(4, 120, 44).outputSlot(5, 101, 63).energySlot(6, 8, 72).syncEnergyValue()
|
||||
.syncCrafterValue().addInventory().create(this, syncID);
|
||||
|
|
|
@ -37,7 +37,7 @@ import techreborn.TechReborn;
|
|||
import techreborn.init.ModRecipes;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
import techreborn.blockentity.GenericMachineBlockEntity;
|
||||
|
||||
@RebornRegister(TechReborn.MOD_ID)
|
||||
|
@ -61,8 +61,8 @@ public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity
|
|||
public BuiltContainer createContainer(int syncID, final PlayerEntity player) {
|
||||
return new ContainerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().blockEntity(this)
|
||||
.filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, ItemDynamicCell.getEmptyCell(1), true, true))
|
||||
.filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, ItemDynamicCell.getEmptyCell(1), true, true))
|
||||
.outputSlot(2, 51, 24).outputSlot(3, 71, 24).outputSlot(4, 91, 24).outputSlot(5, 111, 24)
|
||||
.energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue