Skip to content

Commit

Permalink
dont check if our capaibily is null
Browse files Browse the repository at this point in the history
  • Loading branch information
PrototypeTrousers committed Dec 18, 2020
1 parent 7c1beb8 commit 34f67b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gregtech/common/covers/CoverConveyor.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void update() {
TileEntity tileEntity = coverHolder.getWorld().getTileEntity(coverHolder.getPos().offset(attachedSide));
IItemHandler itemHandler = tileEntity == null ? null : tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, attachedSide.getOpposite());
IItemHandler myItemHandler = coverHolder.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, attachedSide);
if (itemHandler == null || myItemHandler == null) {
if (itemHandler == null) {
if (conveyorMode == ConveyorMode.IMPORT) setSituation(NO_IMPORT_INVENTORY);
if (conveyorMode == ConveyorMode.EXPORT) setSituation(NO_EXPORT_INVENTORY);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/common/covers/CoverPump.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected int doTransferFluids(int transferLimit) {
blockPos.release();
IFluidHandler fluidHandler = tileEntity == null ? null : tileEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, attachedSide.getOpposite());
IFluidHandler myFluidHandler = coverHolder.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, attachedSide);
if (fluidHandler == null || myFluidHandler == null) {
if (fluidHandler == null) {
if (pumpMode == PumpMode.IMPORT) setSituation(NO_IMPORT_TANK);
if (pumpMode == PumpMode.EXPORT) setSituation(NO_EXPORT_TANK);
return 0;
Expand Down

0 comments on commit 34f67b3

Please sign in to comment.