2222import static igentuman .nc .NuclearCraft .MODID ;
2323
2424public class FissionPortContainer extends AbstractContainerMenu {
25- protected FissionPortBE portBE ;
26- protected Player playerEntity ;
25+ protected final FissionPortBE portBE ;
26+ protected final Player playerEntity ;
2727
2828
2929 protected String name = "fission_reactor_port" ;
@@ -40,8 +40,6 @@ public FissionPortContainer(int pContainerId, BlockPos pos, Inventory playerInve
4040 layoutPlayerInventorySlots ();
4141 portBE .getCapability (ForgeCapabilities .ITEM_HANDLER ).ifPresent (h -> {
4242 addSlot (new NCSlotItemHandler .Input (h , 0 , 56 , 35 ));
43- });
44- portBE .getCapability (ForgeCapabilities .ITEM_HANDLER ).ifPresent (h -> {
4543 addSlot (new NCSlotItemHandler .Output (h , 1 , 116 , 35 ));
4644 });
4745 }
@@ -97,7 +95,6 @@ public Component getTitle() {
9795 return Component .translatable ("block." +MODID +"." +name );
9896 }
9997
100-
10198 private void addSlotRange (IItemHandler handler , int x , int y , int amount , int dx ) {
10299 for (int i = 0 ; i < amount ; i ++) {
103100 addSlot (new SlotItemHandler (handler , slotIndex , x , y ));
@@ -120,6 +117,7 @@ protected void layoutPlayerInventorySlots() {
120117 topRow -= 58 ;
121118 addSlotBox (playerInventory , leftCol , topRow , 9 , 18 , 3 , 18 );
122119 }
120+
123121 public int getEnergy () {
124122 return portBE .getEnergyStored ();
125123 }
0 commit comments