Skip to content

Commit

Permalink
Fix reservoir hatch input slot filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron committed Sep 19, 2024
1 parent e41e351 commit b8d7c85
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public boolean usesMui2() {
public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager) {
guiSyncManager.registerSlotGroup("item_inv", 2);

// TODO: Use controlsAmount(false) in the sync handler when #2622 is done
GTFluidSyncHandler tankSyncHandler = new GTFluidSyncHandler(this.fluidTank)
.canDrainSlot(true).canFillSlot(false);

Expand All @@ -151,16 +152,11 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
.child(IKey.dynamic(() -> getFluidNameTranslated(tankSyncHandler))
.color(0xFFFFFF)
.asWidget().pos(11, 40))
// TODO: Use controlsAmount(false) in the sync handler when #2622 is done
.child(new GTFluidSlot().syncHandler(tankSyncHandler)
.pos(69, 52))
.child(new ItemSlot().slot(SyncHandlers.itemSlot(this.importItems, 0)
.slotGroup("item_inv")
.filter(itemStack -> {
IFluidHandlerItem fluidHandlerItem = FluidUtil.getFluidHandler(itemStack);
return fluidHandlerItem != null &&
fluidHandlerItem.getTankProperties()[0].getContents() != null;
}))
.filter(itemStack -> FluidUtil.getFluidHandler(itemStack) != null))
.background(GTGuiTextures.SLOT, GTGuiTextures.IN_SLOT_OVERLAY)
.pos(90, 16))
.child(new ItemSlot().slot(SyncHandlers.itemSlot(this.exportItems, 0)
Expand Down

0 comments on commit b8d7c85

Please sign in to comment.