Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-block boilers accept empty containers again #3651

Merged
merged 4 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading