From 447e504f2fe57f5974da214b0d2391fb62e61f57 Mon Sep 17 00:00:00 2001 From: YannickMG Date: Mon, 3 Jan 2022 14:07:53 -0500 Subject: Basicmachine gui slots rework (#846) * Updated build script Also set developmentEnvironmentUserName = Developer * Added .vscode to .gitignore * Properly hide unused slots in basic machines - Adds methods to GT_Recipe_Map to determine whether it contains fluid inputs or outputs - Adds methods to GT_Slot_Holo to support turning it "off", which also turns off highlighting it on mouse-over - Uses those changes in GT_GUIContainer_BasicMachine to "turn off" slots unused by a machine - Some code clarification/deduplication in GT_GUIContainer_BasicMachine * Hide unused Replicator fluid output slot * Disallow filling fluid input tank if unused --- src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java index cb5fa85ffb..8dc8813166 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -264,7 +264,9 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { } GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); IFluidAccess tFillableAccess = IFluidAccess.from(tTank, true); - ItemStack tToken = handleFluidSlotClick(tFillableAccess, aPlayer, aMouseclick == 0, true, true); + GT_Recipe_Map recipes = machine.getRecipeList(); + //If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. + ItemStack tToken = handleFluidSlotClick(tFillableAccess, aPlayer, aMouseclick == 0, true, (recipes == null || recipes.hasFluidInputs())); if (mTileEntity.isServerSide() && tToken != null) mTileEntity.markInventoryBeenModified(); return tToken; -- cgit