Skip to content

Commit

Permalink
Single-block boilers accept empty containers again (#3651)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: Maya <[email protected]>
(cherry picked from commit 2355a65)
  • Loading branch information
YannickMG authored and Dream-Master committed Dec 15, 2024
1 parent 83bf670 commit cd5e7a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aInde
@Override
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
ItemStack aStack) {
return isAutomatable() && (aIndex == 0 && isItemValidFluidFilledItem(aStack))
return isAutomatable() && (aIndex == 0 && isValidFluidInputSlotItem(aStack))
|| (aIndex == 2 && isItemValidFuel(aStack));
}

Expand Down Expand Up @@ -432,7 +432,7 @@ protected IDrawable[] getAshSlotBackground() {
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setFilter(this::isItemValidFluidFilledItem)
new SlotWidget(inventoryHandler, 0).setFilter(this::isValidFluidInputSlotItem)
.setPos(43, 25)
.setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
.widget(
Expand Down Expand Up @@ -473,8 +473,9 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont
.setSize(18, 18));
}

private boolean isItemValidFluidFilledItem(@NotNull ItemStack stack) {
return isFluidInputAllowed(GTUtility.getFluidForFilledItem(stack, true));
private boolean isValidFluidInputSlotItem(@NotNull ItemStack stack) {
return GTUtility.fillFluidContainer(GTModHandler.getSteam(getSteamCapacity()), stack, false, true) != null
|| isFluidInputAllowed(GTUtility.getFluidForFilledItem(stack, true));
}

protected Widget createFuelSlot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ public int maxProgresstime() {
return 1000 + (250 * tier);
}

@Override
public boolean isElectric() {
return false;
}

@Override
public int getCapacity() {
return (16000 + (16000 * tier));
Expand Down

0 comments on commit cd5e7a6

Please sign in to comment.