From 9a2741128a78bb52eba50a631126e090a5a2abd8 Mon Sep 17 00:00:00 2001 From: miozune Date: Sat, 26 Nov 2022 01:45:28 +0900 Subject: Rewrite GUIs with ModularUI (#1381) * Base work for ModularUI compat * Remove useless interface * Add almost all the widgets * Invert method * Refactor NEI stack placement positions * NEI handlers on ModularUI * Add some more docs * AdvDebugStructureWriter * Fix NEI progressbar not working * PrimitiveBlastFurnace * clean * derp * clean * spotlessApply * Boilers * Buffers * clean * N by N slots containers * Fix boilers not having bucket interaction Put opening UI to individual MetaTEs * Maintenance Hatch * clean * spotlessApply * Add dependency * IndustrialApiary * Adapt to ModularUI change * Base work for covers & fix crash with MP * Fix crash with server * Rewrite base work for covers * Send initial cover data on cover GUI open so that the time of showing incorrect data will be eliminated * Covers part 1 * Rename package: ModularUI -> modularui * Rename class: GT_UIInfo -> GT_UIInfos * Fix build * Covers part2 * Fix missing client check with tile UI & fix title overlap * CoverTabLine * Move cover window creators to inner class * Fix crash with null base TE * Close GUI when tile is broken * Color cover window with tile colorization * Change signature of addUIWidgets * FluidFilter cover, FluidDisplaySlotWidget, BasicTank, BasicGenerator, Output Hatch, MicrowaveEnergyTransmitter, Teleporter, DigitalChest, DigitalTank * Add title tab * Move package: modularui -> modularui/widget * Programmed circuit + IConfigurationCircuitSupport * clean * VolumetricFlask * Remove integrated circuit overlay from recipe input slots * Input Hatch & Quadruple Input Hatch * Multiblock * Deprecate old cover GUI * BasicMachines * Finish BasicMachine & NEI * Expand DTPF NEI to 9 slots * Fix ME input bus on MP * Move AESlotWidget to public class * Move GT_Recipe_Map constructors with mNEIUnificateOutput to setter method * Move SteamTexture.Variant to outer enum * Switch to remote repository * oops * Update MUI * Update MUI * Minor refactor for change amount buttons * Display items and fluids that exceed usual count * blah * use +=, why didn't I do this * Update MUI * Move ModularUI to Base (#1510) * Move ModularUI to Base * Move most of the ModularUI functionality to `BaseTileEntity` (and `CoverableTileEntity`) * `CommonMetaTileEntity` delegates ato the MetaTileEntity * Added several interfaces (with defaults) to indicate if a tile/metatile override/implement certain behaviors. * Moved `IConfigurationCircuitSupport` interface such that it will work with BaseTileEntity or a MetaTileEntity * Address reviews Co-authored-by: miozune * Update MUI * Minor changes to NEI * Return :facepalm: * IGetTabIconSet override * Some more changes to NEI * Merge texture getter interfaces to new class GUITextureSet * Remove BBF structure picture as it's auto-buildable now * Make unified title tab style of texture angular * Expose some boiler texture getters for addon * Fix crash with cover GUI on pipe * Lower the number of recipe per page for DTPF & update MUI * Update MUI * Fix crash with middle-clicking slot on circuit selection GUI * Fix circuit selection window not syncing item from base machine * Merge GT_NEI_AssLineHandler into GT_NEI_DefaultHandler * Update MUI * Add in TecTech multi message * Allow changing the way of binding player inventory * Update MUI * Update MUI * Update MUI * Update MUI * Update MUI * Make MUI non-transitive to allow addons to use their own version * Force enable mixin * Format fluid amount tooltip * Add GUITextureSet.STEAM * Add guard against null ModularWindow creation * Add constructors for Muffler Hatch with inventory * Fix output slot on digital chest and tank allowing insertion * Don't log null ModularWindow * Add default implementation for IHasWorldObjectAndCoords#openGUI * Make openGTTileEntityUI accept MultiTE & cleanup Co-authored-by: Jason Mitchell --- .../java/gregtech/api/util/GT_CoverBehavior.java | 17 +- .../gregtech/api/util/GT_CoverBehaviorBase.java | 156 +- src/main/java/gregtech/api/util/GT_Recipe.java | 3306 ++++++++++++-------- 3 files changed, 2118 insertions(+), 1361 deletions(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_CoverBehavior.java b/src/main/java/gregtech/api/util/GT_CoverBehavior.java index 3bbb4f9ae5..f3b8f7a9fb 100644 --- a/src/main/java/gregtech/api/util/GT_CoverBehavior.java +++ b/src/main/java/gregtech/api/util/GT_CoverBehavior.java @@ -3,6 +3,7 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.E; import gregtech.api.enums.GT_Values; +import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.net.GT_Packet_TileEntityCoverGUI; @@ -28,7 +29,7 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase { protected GT_CoverBehaviorBase(Class typeToken, ITexture coverTexture) { this.typeToken = typeToken; this.coverFGTexture = coverTexture; + this.colorOverride = new GT_GUIColorOverride(guiTexturePath); } public abstract T createDataObject(int aLegacyData); @@ -216,6 +228,7 @@ public abstract class GT_CoverBehaviorBase { return onCoverShiftRightClickImpl(aSide, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer); } + @Deprecated public final Object getClientGUI( byte aSide, int aCoverID, @@ -404,6 +417,136 @@ public abstract class GT_CoverBehaviorBase { } // endregion + // region UI stuff + + protected GT_TooltipDataCache mTooltipCache = new GT_TooltipDataCache(); + protected GT_GUIColorOverride colorOverride; + private static final String guiTexturePath = "gregtech:textures/gui/GuiCover.png"; + + /** + * For back compatibility, you need to override this if this cover uses ModularUI. + */ + public boolean useModularUI() { + return false; + } + + public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + return new UIFactory(buildContext).createWindow(); + } + + /** + * Creates {@link ModularWindow} for this cover. + * This is separated from base class, as attaching the same covers in different sides of the same tile + * needs different UI with different context. + */ + protected class UIFactory { + + private final GT_CoverUIBuildContext uiBuildContext; + + public UIFactory(GT_CoverUIBuildContext buildContext) { + this.uiBuildContext = buildContext; + } + + public ModularWindow createWindow() { + ModularWindow.Builder builder = ModularWindow.builder(getGUIWidth(), getGUIHeight()); + builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); + builder.setGuiTint(getUIBuildContext().getGuiColorization()); + if (doesBindPlayerInventory() && !getUIBuildContext().isAnotherWindow()) { + builder.bindPlayerInventory(getUIBuildContext().getPlayer()); + } + addTitleToUI(builder); + addUIWidgets(builder); + if (getUIBuildContext().isAnotherWindow()) { + builder.widget(ButtonWidget.closeWindowButton(true).setPos(getGUIWidth() - 15, 3)); + } + return builder.build(); + } + + /** + * Override this to add widgets for your UI. + */ + protected void addUIWidgets(ModularWindow.Builder builder) {} + + public GT_CoverUIBuildContext getUIBuildContext() { + return uiBuildContext; + } + + /** + * Can return null when cover data is invalid e.g. tile is broken or cover is removed + */ + @Nullable + public T getCoverData() { + if (isCoverValid()) { + return forceCast(getUIBuildContext() + .getTile() + .getComplexCoverDataAtSide(getUIBuildContext().getCoverSide())); + } else { + return null; + } + } + + public boolean setCoverData(T data) { + if (isCoverValid()) { + getUIBuildContext() + .getTile() + .receiveCoverData( + getUIBuildContext().getCoverSide(), + getUIBuildContext().getCoverID(), + data, + getUIBuildContext().getPlayer() instanceof EntityPlayerMP + ? (EntityPlayerMP) getUIBuildContext().getPlayer() + : null); + return true; + } else { + return false; + } + } + + public boolean isCoverValid() { + return !getUIBuildContext().getTile().isDead() + && getUIBuildContext() + .getTile() + .getCoverBehaviorAtSideNew( + getUIBuildContext().getCoverSide()) + != GregTech_API.sNoBehavior; + } + + protected void addTitleToUI(ModularWindow.Builder builder) { + ItemStack coverItem = GT_Utility.intToStack(getUIBuildContext().getCoverID()); + if (coverItem != null) { + builder.widget(new ItemDrawable(coverItem) + .asWidget() + .setPos(5, 5) + .setSize(16, 16)) + .widget(new TextWidget(coverItem.getDisplayName()) + .setDefaultColor(COLOR_TITLE.get()) + .setPos(25, 9)); + } + } + + protected int getGUIWidth() { + return 176; + } + + protected int getGUIHeight() { + return 107; + } + + protected boolean doesBindPlayerInventory() { + return false; + } + + protected int getTextColorOrDefault(String textType, int defaultColor) { + return colorOverride.getTextColorOrDefault(textType, defaultColor); + } + + protected Supplier COLOR_TITLE = () -> getTextColorOrDefault("title", 0x222222); + protected Supplier COLOR_TEXT_GRAY = () -> getTextColorOrDefault("text_gray", 0x555555); + protected Supplier COLOR_TEXT_WARN = () -> getTextColorOrDefault("text_warn", 0xff0000); + } + + // endregion + // region impl protected Block getFacadeBlockImpl(byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity) { @@ -494,15 +637,20 @@ public abstract class GT_CoverBehaviorBase { byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer) { if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) { lastPlayer = aPlayer; - GT_Values.NW.sendToPlayer( - new GT_Packet_TileEntityCoverGUI( - aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), - (EntityPlayerMP) aPlayer); + if (useModularUI()) { + GT_UIInfos.openCoverUI(aTileEntity, aPlayer, aSide); + } else { + GT_Values.NW.sendToPlayer( + new GT_Packet_TileEntityCoverGUI( + aSide, aCoverID, aCoverVariable, aTileEntity, (EntityPlayerMP) aPlayer), + (EntityPlayerMP) aPlayer); + } return true; } return false; } + @Deprecated protected Object getClientGUIImpl( byte aSide, int aCoverID, T aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) { return null; diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index a498754451..40ba7fe60f 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -3,11 +3,26 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.*; import codechicken.nei.PositionedStack; +import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; +import com.gtnewhorizons.modularui.common.widget.ProgressBar; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; +import gnu.trove.map.TByteObjectMap; +import gnu.trove.map.hash.TByteObjectHashMap; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; +import gregtech.api.enums.SteamVariant; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.SteamTexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.objects.GT_FluidStack; @@ -15,11 +30,15 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; import gregtech.api.util.extensions.ArrayExt; +import gregtech.common.gui.modularui.UIHelper; import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Replicator; -import gregtech.nei.GT_NEI_DefaultHandler.FixedPositionedStack; import ic2.core.Ic2Items; +import java.awt.*; import java.util.*; +import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; +import javax.annotation.Nullable; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -30,6 +49,8 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -721,7 +742,7 @@ public class GT_Recipe implements Comparable { } /** - * Use {@link GT_Recipe_Map#getInputPositionedStacks(GT_Recipe)} instead + * Use {@link GT_Recipe_Map#getItemInputPositions} or {@link GT_Recipe_Map#getSpecialItemPosition} or {@link GT_Recipe_Map#getFluidInputPositions} instead */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated @@ -730,7 +751,7 @@ public class GT_Recipe implements Comparable { } /** - * Use {@link GT_Recipe_Map#getOutputPositionedStacks(GT_Recipe)} instead + * Use {@link GT_Recipe_Map#getItemOutputPositions} or {@link GT_Recipe_Map#getFluidOutputPositions} instead */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated @@ -974,6 +995,7 @@ public class GT_Recipe implements Comparable { } } + @SuppressWarnings("StaticInitializerReferencesSubClass") public static class GT_Recipe_Map { /** * Contains all Recipe Maps @@ -985,117 +1007,139 @@ public class GT_Recipe implements Comparable { public static final Map sIndexedMappings = new HashMap<>(); public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map( - new HashSet<>(500), - "gt.recipe.orewasher", - "Ore Washing Plant", - null, - RES_PATH_GUI + "basicmachines/OreWasher", - 1, - 3, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(500), + "gt.recipe.orewasher", + "Ore Washing Plant", + null, + RES_PATH_GUI + "basicmachines/OreWasher", + 1, + 3, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map( - new HashSet<>(1000), - "gt.recipe.thermalcentrifuge", - "Thermal Centrifuge", - null, - RES_PATH_GUI + "basicmachines/ThermalCentrifuge", - 1, - 3, - 1, - 0, - 2, - E, - 1, - E, - true, - true); + new HashSet<>(1000), + "gt.recipe.thermalcentrifuge", + "Thermal Centrifuge", + null, + RES_PATH_GUI + "basicmachines/ThermalCentrifuge", + 1, + 3, + 1, + 0, + 2, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map( - new HashSet<>(750), - "gt.recipe.compressor", - "Compressor", - null, - RES_PATH_GUI + "basicmachines/Compressor", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(750), + "gt.recipe.compressor", + "Compressor", + null, + RES_PATH_GUI + "basicmachines/Compressor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR) + .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_COMPRESSOR_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_COMPRESS_STEAM); public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map( - new HashSet<>(250), - "gt.recipe.extractor", - "Extractor", - null, - RES_PATH_GUI + "basicmachines/Extractor", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(250), + "gt.recipe.extractor", + "Extractor", + null, + RES_PATH_GUI + "basicmachines/Extractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM); public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler( - new HashSet<>(0), - "ic.recipe.recycler", - "Recycler", - "ic2.recycler", - RES_PATH_GUI + "basicmachines/Recycler", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - false); + new HashSet<>(0), + "ic.recipe.recycler", + "Recycler", + "ic2.recycler", + RES_PATH_GUI + "basicmachines/Recycler", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_RECYCLE) + .setProgressBar(GT_UITextures.PROGRESSBAR_RECYCLE, ProgressBar.Direction.CIRCULAR_CW); public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace( - new HashSet<>(0), - "mc.recipe.furnace", - "Furnace", - "smelting", - RES_PATH_GUI + "basicmachines/E_Furnace", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - false); + new HashSet<>(0), + "mc.recipe.furnace", + "Furnace", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM); public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave( - new HashSet<>(0), - "gt.recipe.microwave", - "Microwave", - "smelting", - RES_PATH_GUI + "basicmachines/E_Furnace", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - false); + new HashSet<>(0), + "gt.recipe.microwave", + "Microwave", + "smelting", + RES_PATH_GUI + "basicmachines/E_Furnace", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + false) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_FURNACE) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); /** Set {@code aSpecialValue = -100} to bypass the disassembler tier check and default recipe duration. */ public static final GT_Recipe_Map sDisassemblerRecipes = new GT_Recipe_Map( @@ -1113,590 +1157,712 @@ public class GT_Recipe implements Comparable { 1, E, true, - false); + false) { + @Override + public IDrawable getOverlayForSlot(boolean isFluid, boolean isOutput, int index, boolean isSpecial) { + if (isOutput) { + switch (index) { + case 0: + case 2: + case 6: + case 8: + return GT_UITextures.OVERLAY_SLOT_CIRCUIT; + case 4: + return GT_UITextures.OVERLAY_SLOT_WRENCH; + } + } + return super.getOverlayForSlot(isFluid, isOutput, index, isSpecial); + } + }.setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_WRENCH) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map( - new HashSet<>(300), - "gt.recipe.scanner", - "Scanner", - null, - RES_PATH_GUI + "basicmachines/Scanner", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(300), + "gt.recipe.scanner", + "Scanner", + null, + RES_PATH_GUI + "basicmachines/Scanner", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MICROSCOPE) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map( - new HashSet<>(200), - "gt.recipe.rockbreaker", - "Rock Breaker", - null, - RES_PATH_GUI + "basicmachines/RockBreaker", - 1, - 1, - 0, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(200), + "gt.recipe.rockbreaker", + "Rock Breaker", + null, + RES_PATH_GUI + "basicmachines/RockBreaker", + 2, + 1, + 0, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map( - new HashSet<>(1000), - "gt.recipe.byproductlist", - "Ore Byproduct List", - null, - RES_PATH_GUI + "basicmachines/Default", - 1, - 6, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(1000), + "gt.recipe.byproductlist", + "Ore Byproduct List", + null, + RES_PATH_GUI + "basicmachines/Default", + 1, + 6, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sReplicatorFakeRecipes = new ReplicatorFakeMap( - new HashSet<>(100), - "gt.recipe.replicator", - "Replicator", - null, - RES_PATH_GUI + "basicmachines/Replicator", - 0, - 1, - 0, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(100), + "gt.recipe.replicator", + "Replicator", + null, + RES_PATH_GUI + "basicmachines/Replicator", + 0, + 1, + 0, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_UUM) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); // public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet<>(30), // "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, // true); - public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map( - new HashSet<>(110), - "gt.recipe.fakeAssemblylineProcess", - "Assemblyline Process", - null, - RES_PATH_GUI + "FakeAssemblyline", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - false); + public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map_AssemblyLineFake( + new HashSet<>(110), + "gt.recipe.fakeAssemblylineProcess", + "Assemblyline Process", + null, + RES_PATH_GUI + "FakeAssemblyline", + 16, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .setUsualFluidInputCount(4); public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map( - new HashSet<>(20000), - "gt.recipe.plasmaarcfurnace", - "Plasma Arc Furnace", - null, - RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", - 1, - 4, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(20000), + "gt.recipe.plasmaarcfurnace", + "Plasma Arc Furnace", + null, + RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", + 1, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map( - new HashSet<>(20000), - "gt.recipe.arcfurnace", - "Arc Furnace", - null, - RES_PATH_GUI + "basicmachines/ArcFurnace", - 1, - 4, - 1, - 1, - 3, - E, - 1, - E, - true, - true); + new HashSet<>(20000), + "gt.recipe.arcfurnace", + "Arc Furnace", + null, + RES_PATH_GUI + "basicmachines/ArcFurnace", + 1, + 4, + 1, + 1, + 3, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer( - new HashSet<>(5), - "gt.recipe.printer", - "Printer", - null, - RES_PATH_GUI + "basicmachines/Printer", - 1, - 1, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(5), + "gt.recipe.printer", + "Printer", + null, + RES_PATH_GUI + "basicmachines/Printer", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_PAGE_BLANK) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PAGE_PRINTED) + .setSlotOverlay(false, false, true, true, GT_UITextures.OVERLAY_SLOT_DATA_STICK) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map( - new HashSet<>(105), - "gt.recipe.sifter", - "Sifter", - null, - RES_PATH_GUI + "basicmachines/Sifter", - 1, - 9, - 0, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(105), + "gt.recipe.sifter", + "Sifter", + null, + RES_PATH_GUI + "basicmachines/Sifter", + 1, + 9, + 0, + 0, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN); public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress( - new HashSet<>(300), - "gt.recipe.press", - "Forming Press", - null, - RES_PATH_GUI + "basicmachines/Press", - 2, - 1, - 2, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(300), + "gt.recipe.press", + "Forming Press", + null, + RES_PATH_GUI + "basicmachines/Press", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_PRESS_1) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_PRESS_2) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_PRESS_3) + .setProgressBar(GT_UITextures.PROGRESSBAR_COMPRESS, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map( - new HashSet<>(810), - "gt.recipe.laserengraver", - "Precision Laser Engraver", - null, - RES_PATH_GUI + "basicmachines/LaserEngraverNEI", - 2, - 1, - 0, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(810), + "gt.recipe.laserengraver", + "Precision Laser Engraver", + null, + RES_PATH_GUI + "basicmachines/LaserEngraverNEI", + 2, + 1, + 0, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_LENS) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2) + .setUsualFluidOutputCount(2); public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map( - new HashSet<>(900), - "gt.recipe.mixer", - "Mixer", - null, - RES_PATH_GUI + "basicmachines/Mixer6", - 9, - 4, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(900), + "gt.recipe.mixer", + "Mixer", + null, + RES_PATH_GUI + "basicmachines/Mixer6", + 9, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW); public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map( - new HashSet<>(300), - "gt.recipe.autoclave", - "Autoclave", - null, - RES_PATH_GUI + "basicmachines/Autoclave4", - 2, - 4, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(300), + "gt.recipe.autoclave", + "Autoclave", + null, + RES_PATH_GUI + "basicmachines/Autoclave4", + 2, + 4, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setSlotOverlay(false, true, true, GT_UITextures.OVERLAY_SLOT_GEM) + .setSlotOverlay(false, true, false, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map( - new HashSet<>(50), - "gt.recipe.electromagneticseparator", - "Electromagnetic Separator", - null, - RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", - 1, - 3, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(50), + "gt.recipe.electromagneticseparator", + "Electromagnetic Separator", + null, + RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", + 1, + 3, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map( - new HashSet<>(300), - "gt.recipe.polarizer", - "Electromagnetic Polarizer", - null, - RES_PATH_GUI + "basicmachines/Polarizer", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(300), + "gt.recipe.polarizer", + "Electromagnetic Polarizer", + null, + RES_PATH_GUI + "basicmachines/Polarizer", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_MAGNET, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator( - new HashSet<>(16600), - "gt.recipe.macerator", - "Pulverization", - null, - RES_PATH_GUI + "basicmachines/Macerator4", - 1, - 4, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(16600), + "gt.recipe.macerator", + "Pulverization", + null, + RES_PATH_GUI + "basicmachines/Macerator4", + 1, + 4, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_DUST) + .setProgressBar(GT_UITextures.PROGRESSBAR_MACERATE, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE_STEAM) + .setSlotOverlaySteam(true, GT_UITextures.OVERLAY_SLOT_DUST_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_MACERATE_STEAM); public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map( - new HashSet<>(2550), - "gt.recipe.chemicalbath", - "Chemical Bath", - null, - RES_PATH_GUI + "basicmachines/ChemicalBath", - 1, - 3, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(2550), + "gt.recipe.chemicalbath", + "Chemical Bath", + null, + RES_PATH_GUI + "basicmachines/ChemicalBath", + 1, + 3, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW); public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner( - new HashSet<>(2100), - "gt.recipe.fluidcanner", - "Fluid Canning Machine", - null, - RES_PATH_GUI + "basicmachines/FluidCanner", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(2100), + "gt.recipe.fluidcanner", + "Fluid Canning Machine", + null, + RES_PATH_GUI + "basicmachines/FluidCanner", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_CANISTER) + .setProgressBar(GT_UITextures.PROGRESSBAR_CANNER, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map( - new HashSet<>(450), - "gt.recipe.brewer", - "Brewing Machine", - null, - RES_PATH_GUI + "basicmachines/PotionBrewer", - 1, - 0, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(450), + "gt.recipe.brewer", + "Brewing Machine", + null, + RES_PATH_GUI + "basicmachines/PotionBrewer", + 1, + 0, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CAULDRON) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map( - new HashSet<>(10), - "gt.recipe.fluidheater", - "Fluid Heater", - null, - RES_PATH_GUI + "basicmachines/FluidHeater", - 1, - 0, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(10), + "gt.recipe.fluidheater", + "Fluid Heater", + null, + RES_PATH_GUI + "basicmachines/FluidHeater", + 1, + 0, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_HEATER_1) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_HEATER_2) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map( - new HashSet<>(400), - "gt.recipe.distillery", - "Distillery", - null, - RES_PATH_GUI + "basicmachines/Distillery", - 1, - 1, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(400), + "gt.recipe.distillery", + "Distillery", + null, + RES_PATH_GUI + "basicmachines/Distillery", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(true, false, GT_UITextures.OVERLAY_SLOT_BEAKER_1) + .setSlotOverlay(true, true, GT_UITextures.OVERLAY_SLOT_BEAKER_2) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map( - new HashSet<>(50), - "gt.recipe.fermenter", - "Fermenter", - null, - RES_PATH_GUI + "basicmachines/Fermenter", - 0, - 0, - 0, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(50), + "gt.recipe.fermenter", + "Fermenter", + null, + RES_PATH_GUI + "basicmachines/Fermenter", + 0, + 0, + 0, + 1, + 1, + E, + 1, + E, + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map( - new HashSet<>(35000), - "gt.recipe.fluidsolidifier", - "Fluid Solidifier", - null, - RES_PATH_GUI + "basicmachines/FluidSolidifier", - 1, - 1, - 1, - 1, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(35000), + "gt.recipe.fluidsolidifier", + "Fluid Solidifier", + null, + RES_PATH_GUI + "basicmachines/FluidSolidifier", + 1, + 1, + 1, + 1, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_MOLD) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map( - new HashSet<>(15000), - "gt.recipe.fluidextractor", - "Fluid Extractor", - null, - RES_PATH_GUI + "basicmachines/FluidExtractor", - 1, - 1, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(15000), + "gt.recipe.fluidextractor", + "Fluid Extractor", + null, + RES_PATH_GUI + "basicmachines/FluidExtractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map( - new HashSet<>(2500), - "gt.recipe.packager", - "Packager", - null, - RES_PATH_GUI + "basicmachines/Packager", - 2, - 1, - 2, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(2500), + "gt.recipe.packager", + "Packager", + null, + RES_PATH_GUI + "basicmachines/Packager", + 2, + 1, + 2, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_BOX) + .setSlotOverlay(false, true, GT_UITextures.OVERLAY_SLOT_BOXED) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator( - new HashSet<>(2500), - "gt.recipe.unpackager", - "Unpackager", - null, - RES_PATH_GUI + "basicmachines/Unpackager", - 1, - 2, - 1, - 0, - 1, - E, - 1, - E, - true, - true); + new HashSet<>(2500), + "gt.recipe.unpackager", + "Unpackager", + null, + RES_PATH_GUI + "basicmachines/Unpackager", + 1, + 2, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_BOXED) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map( - new HashSet<>(50), - "gt.recipe.fusionreactor", - "Fusion Reactor", - null, - RES_PATH_GUI + "basicmachines/FusionReactor", - 0, - 0, - 0, - 2, - 1, - "Start: ", - 1, - " EU", - true, - true); + new HashSet<>(50), + "gt.recipe.fusionreactor", + "Fusion Reactor", + null, + RES_PATH_GUI + "basicmachines/FusionReactor", + 0, + 0, + 0, + 2, + 1, + "Start: ", + 1, + " EU", + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(2); public static final GT_Recipe_Map sComplexFusionRecipes = new GT_Recipe_Map_ComplexFusion( - new HashSet<>(50), - "gt.recipe.complexfusionreactor", - "Complex Fusion Reactor", - null, - RES_PATH_GUI + "basicmachines/ComplexFusionReactor", - 3, - 0, - 0, - 2, - 1, - "Start: ", - 1, - " EU", - true, - true); + new HashSet<>(50), + "gt.recipe.complexfusionreactor", + "Complex Fusion Reactor", + null, + RES_PATH_GUI + "basicmachines/ComplexFusionReactor", + 3, + 0, + 0, + 2, + 1, + "Start: ", + 1, + " EU", + true, + true) + .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) + .setUsualFluidInputCount(16) + .setUsualFluidOutputCount(16) + .setNEITransferRect(new Rectangle(79, 34, 18, 18)) + .setNEIGregTechLogoPos(80, 61); public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map( - new HashSet<>(1200), - "gt.recipe.centrifuge", - "Centrifuge", - null, - RES_PATH_GUI + "basicmachines/Centrifuge", - 2, - 6, - 0, - 0, - 1, - E, - 1, - E, - tru