Skip to content

Commit 44438bd

Browse files
reverted unintended logic changes and remove unused functions
1 parent 70f3317 commit 44438bd

File tree

4 files changed

+6
-32
lines changed

4 files changed

+6
-32
lines changed

src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,11 @@ public void update() {
120120
} else {
121121
metaTileEntity.setSituation(DISABLED_BY_CONTROLLER);
122122
}
123+
if (wasActiveAndNeedsUpdate) {
124+
this.wasActiveAndNeedsUpdate = false;
125+
setActive(false);
126+
}
123127
}
124-
if (wasActiveAndNeedsUpdate) {
125-
this.wasActiveAndNeedsUpdate = false;
126-
setActive(false);
127-
}
128-
}
129-
130-
boolean canOutputsFit(){
131-
return (MetaTileEntity.addItemsToItemHandler(metaTileEntity.getExportItems(), true, currentRecipe.getAllItemOutputs(metaTileEntity.getExportItems().getSlots())) &&
132-
MetaTileEntity.addFluidsToFluidHandler(metaTileEntity.getExportFluids(), true, currentRecipe.getFluidOutputs()));
133128
}
134129

135130
protected void updateRecipeProgress() {

src/main/java/gregtech/api/metatileentity/MetaTileEntity.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -984,27 +984,6 @@ public boolean isInputEmpty() {
984984
return true;
985985
}
986986

987-
public boolean isOutputFull() {
988-
boolean fullOutputSlots = true;
989-
boolean fullOutputTanks = true;
990-
if (exportItems.getSlots() > 0) {
991-
for (int i = 0; i < exportItems.getSlots(); i++) {
992-
if (exportItems.getStackInSlot(i).getCount() < exportItems.getStackInSlot(i).getMaxStackSize()) {
993-
fullOutputSlots = false;
994-
}
995-
}
996-
}
997-
if (exportFluids.getTanks() > 0) {
998-
for (int i = 0; i < exportFluids.getTanks(); i++) {
999-
if (exportFluids.getTankAt(i).getFluidAmount() < exportFluids.getTankAt(i).getCapacity()) {
1000-
fullOutputTanks = false;
1001-
}
1002-
}
1003-
}
1004-
return (fullOutputSlots && fullOutputTanks);
1005-
}
1006-
1007-
1008987
public final int getOutputRedstoneSignal(@Nullable EnumFacing side) {
1009988
if (side == null) {
1010989
return getHighestOutputRedstoneSignal();

src/main/java/gregtech/common/covers/CoverConveyor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void update() {
9898
TileEntity tileEntity = coverHolder.getWorld().getTileEntity(coverHolder.getPos().offset(attachedSide));
9999
IItemHandler itemHandler = tileEntity == null ? null : tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, attachedSide.getOpposite());
100100
IItemHandler myItemHandler = coverHolder.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, attachedSide);
101-
if (itemHandler == null) {
101+
if (itemHandler == null || myItemHandler == null) {
102102
if (conveyorMode == ConveyorMode.IMPORT) setSituation(NO_IMPORT_INVENTORY);
103103
if (conveyorMode == ConveyorMode.EXPORT) setSituation(NO_EXPORT_INVENTORY);
104104
return;

src/main/java/gregtech/common/covers/CoverPump.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected int doTransferFluids(int transferLimit) {
129129
blockPos.release();
130130
IFluidHandler fluidHandler = tileEntity == null ? null : tileEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, attachedSide.getOpposite());
131131
IFluidHandler myFluidHandler = coverHolder.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, attachedSide);
132-
if (fluidHandler == null) {
132+
if (fluidHandler == null || myFluidHandler == null) {
133133
if (pumpMode == PumpMode.IMPORT) setSituation(NO_IMPORT_TANK);
134134
if (pumpMode == PumpMode.EXPORT) setSituation(NO_EXPORT_TANK);
135135
return 0;

0 commit comments

Comments
 (0)