aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/gui')
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIColorOverride.java93
-rw-r--r--src/main/java/gregtech/api/gui/GUIHost.java56
-rw-r--r--src/main/java/gregtech/api/gui/GUIProvider.java38
-rw-r--r--src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java89
-rw-r--r--src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java74
-rw-r--r--src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java188
-rw-r--r--src/main/java/gregtech/api/gui/modularui/GT_UITextures.java538
-rw-r--r--src/main/java/gregtech/api/gui/modularui/GUITextureSet.java156
-rw-r--r--src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java50
-rw-r--r--src/main/java/gregtech/api/gui/modularui/SteamTexture.java62
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_CoverTickRateButton.java82
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_LockedWhileActiveButton.java90
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_PhantomItemButton.java92
13 files changed, 1608 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java
new file mode 100644
index 0000000000..6ade7b030d
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java
@@ -0,0 +1,93 @@
+package gregtech.api.gui;
+
+import java.util.concurrent.ExecutionException;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.resources.IResource;
+import net.minecraft.util.ResourceLocation;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.util.concurrent.UncheckedExecutionException;
+
+import cpw.mods.fml.relauncher.FMLLaunchHandler;
+import cpw.mods.fml.relauncher.Side;
+import gregtech.api.GregTech_API;
+import gregtech.api.util.ColorsMetadataSection;
+
+@SuppressWarnings("UnstableApiUsage")
+public class GT_GUIColorOverride {
+
+ private static final Object NOT_FOUND = new Object();
+ private static final LoadingCache<ResourceLocation, Object> cache = CacheBuilder.newBuilder()
+ .softValues()
+ .build(new CacheLoader<>() {
+
+ @Override
+ public Object load(@Nonnull ResourceLocation key) throws Exception {
+ IResource ir = Minecraft.getMinecraft()
+ .getResourceManager()
+ .getResource(key);
+ if (ir.hasMetadata()) return ir.getMetadata("colors");
+ // return a dummy
+ // object because
+ // LoadingCache
+ // doesn't like null
+ return NOT_FOUND;
+ }
+ });
+ private static final GT_GUIColorOverride FALLBACK = new GT_GUIColorOverride();
+ private ColorsMetadataSection cmSection;
+
+ public static GT_GUIColorOverride get(String fullLocation) {
+ // see other get for more info
+ if (FMLLaunchHandler.side() != Side.CLIENT) return FALLBACK;
+ return new GT_GUIColorOverride(new ResourceLocation(fullLocation));
+ }
+
+ public static GT_GUIColorOverride get(ResourceLocation path) {
+ // use dummy fallback if there isn't such thing as a resource pack.
+ // #side() usually has two possible return value, but since this might be called by test code, it might
+ // also return null when in test env. Using #isClient will cause a NPE. A plain inequality test won't.
+ // FMLCommonHandler's #getSide() might trigger a NPE when in test env, so no.
+ if (FMLLaunchHandler.side() != Side.CLIENT) return FALLBACK;
+ return new GT_GUIColorOverride(path);
+ }
+
+ private GT_GUIColorOverride() {
+ cmSection = null;
+ }
+
+ private GT_GUIColorOverride(ResourceLocation resourceLocation) {
+ try {
+ Object metadata = cache.get(resourceLocation);
+ if (metadata != NOT_FOUND) cmSection = (ColorsMetadataSection) metadata;
+ } catch (ExecutionException | UncheckedExecutionException ignore) {
+ // make sure it doesn't cache a failing entry
+ cache.invalidate(resourceLocation);
+ }
+ }
+
+ public int getTextColorOrDefault(String textType, int defaultColor) {
+ return sLoaded() ? cmSection.getTextColorOrDefault(textType, defaultColor) : defaultColor;
+ }
+
+ public int getGuiTintOrDefault(String key, int defaultColor) {
+ return sLoaded() ? cmSection.getGuiTintOrDefault(key, defaultColor) : defaultColor;
+ }
+
+ public boolean sGuiTintingEnabled() {
+ return sLoaded() ? cmSection.sGuiTintingEnabled() : GregTech_API.sColoredGUI;
+ }
+
+ public boolean sLoaded() {
+ return cmSection != null;
+ }
+
+ public static void onResourceManagerReload() {
+ cache.invalidateAll();
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/GUIHost.java b/src/main/java/gregtech/api/gui/GUIHost.java
new file mode 100644
index 0000000000..bbb94317c4
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/GUIHost.java
@@ -0,0 +1,56 @@
+package gregtech.api.gui;
+
+import java.util.Objects;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.item.ItemStack;
+
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+
+public interface GUIHost extends ITileWithModularUI {
+
+ @Nonnull
+ @Override
+ default ModularWindow createWindow(UIBuildContext uiContext) {
+ Objects.requireNonNull(uiContext);
+ GUIProvider<?> gui = getGUI(uiContext);
+ return gui.openGUI(uiContext);
+ }
+
+ /**
+ * Width of the GUI when its being displayed
+ */
+ default int getWidth() {
+ return 170;
+ }
+
+ default int getHeight() {
+ return 192;
+ }
+
+ @Nonnull
+ GUIProvider<?> getGUI(@Nonnull UIBuildContext uiContext);
+
+ ItemStack getAsItem();
+
+ String getMachineName();
+
+ default boolean hasItemInput() {
+ return true;
+ }
+
+ default boolean hasItemOutput() {
+ return true;
+ }
+
+ default boolean hasFluidInput() {
+ return true;
+ }
+
+ default boolean hasFluidOutput() {
+ return true;
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/GUIProvider.java b/src/main/java/gregtech/api/gui/GUIProvider.java
new file mode 100644
index 0000000000..6fec4aa52a
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/GUIProvider.java
@@ -0,0 +1,38 @@
+package gregtech.api.gui;
+
+import java.util.Objects;
+
+import javax.annotation.Nonnull;
+
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+
+public abstract class GUIProvider<T extends GUIHost> {
+
+ @Nonnull
+ protected final T host;
+
+ public GUIProvider(@Nonnull T host) {
+ this.host = host;
+ }
+
+ @Nonnull
+ public ModularWindow openGUI(@Nonnull UIBuildContext uiContext) {
+ Builder builder = Objects.requireNonNull(ModularWindow.builder(host.getWidth(), host.getHeight()));
+ if (shouldBindPlayerInventory()) {
+ builder.bindPlayerInventory(uiContext.getPlayer());
+ }
+ attachSynchHandlers(builder, uiContext);
+ addWidgets(builder, uiContext);
+ return Objects.requireNonNull(builder.build());
+ }
+
+ protected abstract void attachSynchHandlers(@Nonnull Builder builder, @Nonnull UIBuildContext uiContext);
+
+ protected abstract void addWidgets(@Nonnull Builder builder, @Nonnull UIBuildContext uiContext);
+
+ protected boolean shouldBindPlayerInventory() {
+ return true;
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java
new file mode 100644
index 0000000000..8de4bc4536
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/modularui/FallbackableSteamTexture.java
@@ -0,0 +1,89 @@
+package gregtech.api.gui.modularui;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import net.minecraft.client.Minecraft;
+
+import com.gtnewhorizons.modularui.api.drawable.UITexture;
+import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils;
+
+import gregtech.api.enums.SteamVariant;
+
+public class FallbackableSteamTexture {
+
+ private final SteamTexture candidate;
+ private final Object fallback;
+ private final Map<SteamVariant, Boolean> useFallbackMap = new HashMap<>();
+
+ private static final List<FallbackableSteamTexture> ALL_INSTANCES = new ArrayList<>();
+
+ public FallbackableSteamTexture(SteamTexture candidate, SteamTexture fallback) {
+ this(candidate, (Object) fallback);
+ }
+
+ public FallbackableSteamTexture(SteamTexture candidate, FallbackableSteamTexture fallback) {
+ this(candidate, (Object) fallback);
+ }
+
+ public FallbackableSteamTexture(SteamTexture fallback) {
+ this(null, fallback);
+ }
+
+ private FallbackableSteamTexture(SteamTexture candidate, Object fallback) {
+ this.candidate = candidate;
+ this.fallback = fallback;
+ ALL_INSTANCES.add(this);
+ }
+
+ public UITexture get(SteamVariant steamVariant) {
+ verifyCandidate(steamVariant);
+ if (useFallbackMap.get(steamVariant)) {
+ return castFallback(steamVariant);
+ } else {
+ return candidate.get(steamVariant);
+ }
+ }
+
+ private void verifyCandidate(SteamVariant steamVariant) {
+ if (useFallbackMap.get(steamVariant) == null) {
+ boolean useFallback;
+ if (NetworkUtils.isDedicatedClient()) {
+ if (candidate == null) {
+ useFallback = true;
+ } else {
+ try {
+ Minecraft.getMinecraft()
+ .getResourceManager()
+ .getResource(candidate.get(steamVariant).location);
+ useFallback = false;
+ } catch (IOException e) {
+ useFallback = true;
+ }
+ }
+ } else {
+ useFallback = true;
+ }
+ useFallbackMap.put(steamVariant, useFallback);
+ }
+ }
+
+ private UITexture castFallback(SteamVariant steamVariant) {
+ if (fallback instanceof SteamTexture) {
+ return ((SteamTexture) fallback).get(steamVariant);
+ } else if (fallback instanceof FallbackableSteamTexture) {
+ return ((FallbackableSteamTexture) fallback).get(steamVariant);
+ } else {
+ throw new RuntimeException("Unexpected type found for fallback: " + fallback.getClass());
+ }
+ }
+
+ public static void reload() {
+ for (FallbackableSteamTexture t : ALL_INSTANCES) {
+ t.useFallbackMap.clear();
+ }
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java
new file mode 100644
index 0000000000..f98d6099fc
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/modularui/GT_CoverUIBuildContext.java
@@ -0,0 +1,74 @@
+package gregtech.api.gui.modularui;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+
+import gregtech.api.interfaces.tileentity.ICoverable;
+
+public class GT_CoverUIBuildContext extends UIBuildContext {
+
+ // cover data is not synced to client, while ID is
+ private final int coverID;
+ private final ForgeDirection side;
+ private final ICoverable tile;
+ private final boolean anotherWindow;
+ private final int guiColorization;
+
+ /**
+ * @param player Player opened this UI
+ * @param coverID See {@link ICoverable#getCoverIDAtSide}
+ * @param side Side this cover is attached to
+ * @param tile Tile this cover is attached to
+ * @param anotherWindow If cover UI is shown on top of another window
+ * @param guiColorization The color used to render machine's GUI
+ */
+ public GT_CoverUIBuildContext(EntityPlayer player, int coverID, ForgeDirection side, ICoverable tile,
+ boolean anotherWindow, int guiColorization) {
+ super(player);
+ this.coverID = coverID;
+ this.side = side;
+ this.tile = tile;
+ this.anotherWindow = anotherWindow;
+ this.guiColorization = guiColorization;
+ }
+
+ /**
+ * @param player Player opened this UI
+ * @param coverID See {@link ICoverable#getCoverIDAtSide}
+ * @param side Side this cover is attached to
+ * @param tile Tile this cover is attached to
+ * @param anotherWindow If cover GUI is shown in opened on top of another window
+ */
+ public GT_CoverUIBuildContext(EntityPlayer player, int coverID, ForgeDirection side, ICoverable tile,
+ boolean anotherWindow) {
+ this(player, coverID, side, tile, anotherWindow, tile.getGUIColorization());
+ }
+
+ public int getCoverID() {
+ return coverID;
+ }
+
+ public ForgeDirection getCoverSide() {
+ return side;
+ }
+
+ /**
+ * Note that this will return different object between client v.s. server side on SP.
+ */
+ public ICoverable getTile() {
+ return tile;
+ }
+
+ /**
+ * If cover GUI is shown in opened on top of another window.
+ */
+ public boolean isAnotherWindow() {
+ return anotherWindow;
+ }
+
+ public int getGuiColorization() {
+ return guiColorization;
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java
new file mode 100644
index 0000000000..89a0835f13
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/modularui/GT_UIInfos.java
@@ -0,0 +1,188 @@
+package gregtech.api.gui.modularui;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import com.gtnewhorizons.modularui.api.UIInfos;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularUIContext;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.builder.UIBuilder;
+import com.gtnewhorizons.modularui.common.builder.UIInfo;
+import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils;
+import com.gtnewhorizons.modularui.common.internal.wrapper.ModularGui;
+import com.gtnewhorizons.modularui.common.internal.wrapper.ModularUIContainer;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
+import gregtech.api.net.GT_Packet_SendCoverData;
+import gregtech.api.util.GT_CoverBehaviorBase;
+
+public class GT_UIInfos {
+
+ public static void init() {}
+
+ /**
+ * Generator for {@link UIInfo} which is responsible for registering and opening UIs. Unlike
+ * {@link com.gtnewhorizons.modularui.api.UIInfos#TILE_MODULAR_UI}, this accepts custom constructors for UI. <br>
+ * Do NOT run {@link UIBuilder#build} on-the-fly, otherwise MP client won't register UIs. Instead, store to static
+ * field, just like {@link #GTTileEntityDefaultUI}. Such mistake can be easily overlooked by testing only SP.
+ */
+ public static final Function<ContainerConstructor, UIInfo<?, ?>> GTTileEntityUIFactory = containerConstructor -> UIBuilder
+ .of()
+ .container((player, world, x, y, z) -> {
+ TileEntity te = world.getTileEntity(x, y, z);
+ if (te instanceof ITileWithModularUI mui) {
+ return createTileEntityContainer(player, mui::createWindow, te::markDirty, containerConstructor);
+ }
+ return null;
+ })
+ .gui(((player, world, x, y, z) -> {
+ if (!world.isRemote) return null;
+ TileEntity te = world.getTileEntity(x, y, z);
+ if (te instanceof ITileWithModularUI mui) {
+ return createTileEntityGuiContainer(player, mui::createWindow, containerConstructor);
+ }
+ return null;
+ }))
+ .build();
+
+ private static final UIInfo<?, ?> GTTileEntityDefaultUI = GTTileEntityUIFactory.apply(ModularUIContainer::new);
+
+ private static final Map<ForgeDirection, UIInfo<?, ?>> coverUI = new HashMap<>();
+
+ static {
+ for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
+ coverUI.put(
+ side,
+ UIBuilder.of()
+ .container((player, world, x, y, z) -> {
+ final TileEntity te = world.getTileEntity(x, y, z);
+ if (!(te instanceof ICoverable gtTileEntity)) return null;
+ final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side);
+ return createCoverContainer(
+ player,
+ cover::createWindow,
+ te::markDirty,
+ gtTileEntity.getCoverIDAtSide(side),
+ side,
+ gtTileEntity);
+ })
+ .gui((player, world, x, y, z) -> {
+ if (!world.isRemote) return null;
+ final TileEntity te = world.getTileEntity(x, y, z);
+ if (!(te instanceof ICoverable gtTileEntity)) return null;
+ final GT_CoverBehaviorBase<?> cover = gtTileEntity.getCoverBehaviorAtSideNew(side);
+ return createCoverGuiContainer(
+ player,
+ cover::createWindow,
+ gtTileEntity.getCoverIDAtSide(side),
+ side,
+ gtTileEntity);
+ })
+ .build());
+ }
+ }
+
+ /**
+ * Opens TileEntity UI, created by {@link ITileWithModularUI#createWindow}.
+ */
+ public static void openGTTileEntityUI(IHasWorldObjectAndCoords aTileEntity, EntityPlayer aPlayer) {
+ if (aTileEntity.isClientSide()) return;
+ GTTileEntityDefaultUI.open(
+ aPlayer,
+ aTileEntity.getWorld(),
+ aTileEntity.getXCoord(),
+ aTileEntity.getYCoord(),
+ aTileEntity.getZCoord());
+ }
+
+ /**
+ * Opens cover UI, created by {@link GT_CoverBehaviorBase#createWindow}.
+ */
+ public static void openCoverUI(ICoverable tileEntity, EntityPlayer player, ForgeDirection side) {
+ if (tileEntity.isClientSide()) return;
+
+ GT_Values.NW.sendToPlayer(
+ new GT_Packet_SendCoverData(
+ side,
+ tileEntity.getCoverIDAtSide(side),
+ tileEntity.getComplexCoverDataAtSide(side),
+ tileEntity),
+ (EntityPlayerMP) player);
+
+ coverUI.get(side)
+ .open(
+ player,
+ tileEntity.getWorld(),
+ tileEntity.getXCoord(),
+ tileEntity.getYCoord(),
+ tileEntity.getZCoord());
+ }
+
+ /**
+ * Opens UI for player's item, created by
+ * {@link com.gtnewhorizons.modularui.api.screen.IItemWithModularUI#createWindow}.
+ */
+ public static void openPlayerHeldItemUI(EntityPlayer player) {
+ if (NetworkUtils.isClient()) return;
+ UIInfos.PLAYER_HELD_ITEM_UI.open(player);
+ }
+
+ private static ModularUIContainer createTileEntityContainer(EntityPlayer player,
+ Function<UIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate,
+ ContainerConstructor containerCreator) {
+ final UIBuildContext buildContext = new UIBuildContext(player);
+ final ModularWindow window = windowCreator.apply(buildContext);
+ if (window == null) return null;
+ return containerCreator.of(new ModularUIContext(buildContext, onWidgetUpdate), window);
+ }
+
+ @SideOnly(Side.CLIENT)
+ private static ModularGui createTileEntityGuiContainer(EntityPlayer player,
+ Function<UIBuildContext, ModularWindow> windowCreator, ContainerConstructor containerConstructor) {
+ final ModularUIContainer container = createTileEntityContainer(
+ player,
+ windowCreator,
+ null,
+ containerConstructor);
+ if (container == null) return null;
+ return new ModularGui(container);
+ }
+
+ private static ModularUIContainer createCoverContainer(EntityPlayer player,
+ Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, Runnable onWidgetUpdate, int coverID,
+ ForgeDirection side, ICoverable tile) {
+ final GT_CoverUIBuildContext buildContext = new GT_CoverUIBuildContext(player, coverID, side, tile, false);
+ final ModularWindow window = windowCreator.apply(buildContext);
+ if (window == null) return null;
+ return new ModularUIContainer(new ModularUIContext(buildContext, onWidgetUpdate), window);
+ }
+
+ @SideOnly(Side.CLIENT)
+ private static ModularGui createCoverGuiContainer(EntityPlayer player,
+ Function<GT_CoverUIBuildContext, ModularWindow> windowCreator, int coverID, ForgeDirection side,
+ ICoverable tile) {
+ final ModularUIContainer container = createCoverContainer(player, windowCreator, null, coverID, side, tile);
+ if (container == null) {
+ return null;
+ }
+ return new ModularGui(container);
+ }
+
+ @FunctionalInterface
+ public interface ContainerConstructor {
+
+ ModularUIContainer of(ModularUIContext context, ModularWindow mainWindow);
+ }
+}
diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java
new file mode 100644
index 0000000000..526ba1aa18
--- /dev/null
+++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java
@@ -0,0 +1,538 @@
+package gregtech.api.gui.modularui;
+
+import static gregtech.api.enums.Mods.GregTech;
+
+import java.util.function.BiFunction;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture;
+import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture;
+import com.gtnewhorizons.modularui.api.drawable.UITexture;
+
+public class GT_UITextures {
+
+ public static final UITexture TRANSPARENT = UITexture.fullImage(GregTech.ID, "gui/picture/transparent");
+
+ public static final AdaptableUITexture BACKGROUND_SINGLEBLOCK_DEFAULT = AdaptableUITexture
+ .of(GregTech.ID, "gui/background/singleblock_default", 176, 166, 4);
+ public static final SteamTexture BACKGROUND_STEAM = SteamTexture
+ .adaptableTexture(GregTech.ID, "gui/background/%s", 176, 166, 4);
+ public static final UITexture BACKGROUND_FUSION_COMPUTER = UITexture
+ .fullImage(GregTech.ID, "gui/background/fusion_computer");
+ public static final AdaptableUITexture BACKGROUND_TEXT_FIELD = AdaptableUITexture
+ .of(GregTech.ID, "gui/background/text_field", 142, 28, 1);
+ public static final AdaptableUITexture BACKGROUND_TEXT_FIELD_LIGHT_GRAY = AdaptableUITexture
+ .of(GregTech.ID, "gui/background/text_field_light_gray", 61, 12, 1);
+ public static final AdaptableUITexture BACKGROUND_NEI_SINGLE_RECIPE = AdaptableUITexture
+ .of(GregTech.ID, "gui/background/nei_single_recipe.png", 64, 64, 2);
+ public static final UITexture BACKGROUND_FLOCCULATION_RECIPE = UITexture
+ .fullImage(GregTech.ID, "gui/background/flocculation_recipe.png");
+ public static final SteamTexture SLOT_ITEM_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/item_%s");
+ public static final SteamTexture SLOT_FLUID_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/fluid_%s");
+ public static final AdaptableUITexture SLOT_DARK_GRAY = AdaptableUITexture
+ .of(GregTech.ID, "gui/slot/dark_gray", 18, 18, 1);
+ public static final AdaptableUITexture SLOT_MAINTENANCE = AdaptableUITexture
+ .of(GregTech.ID, "gui/slot/maintenance", 20, 20, 1);
+ public static final AdaptableUITexture SLOT_UPLIFTED = AdaptableUITexture
+ .of(GregTech.ID, "gui/slot/uplifted", 18, 18, 1);
+
+ public static final UITexture OVERLAY_SLOT_ARROW_ME = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/arrow_me");
+ public static final UITexture OVERLAY_SLOT_PATTERN_ME = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/pattern_me");
+
+ public static final UITexture OVERLAY_SLOT_BEAKER_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/beaker_1");
+ public static final UITexture OVERLAY_SLOT_BEAKER_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/beaker_2");
+ public static final UITexture OVERLAY_SLOT_BEE_DRONE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/bee_drone");
+ public static final UITexture OVERLAY_SLOT_BEE_QUEEN = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/bee_queen");
+ public static final UITexture OVERLAY_SLOT_BENDER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/bender");
+ public static final UITexture OVERLAY_SLOT_BOX = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/box");
+ public static final UITexture OVERLAY_SLOT_BOXED = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/boxed");
+ public static final UITexture OVERLAY_SLOT_CANISTER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/canister");
+ public static final SteamTexture OVERLAY_SLOT_CANISTER_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/canister_%s");
+ public static final UITexture OVERLAY_SLOT_CANNER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/canner");
+ public static final UITexture OVERLAY_SLOT_CAULDRON = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/cauldron");
+ public static final UITexture OVERLAY_SLOT_CENTRIFUGE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge");
+ public static final UITexture OVERLAY_SLOT_CENTRIFUGE_FLUID = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge_fluid");
+ public static final SteamTexture OVERLAY_SLOT_CENTRIFUGE_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/centrifuge_%s");
+ public static final UITexture OVERLAY_SLOT_CHARGER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/charger");
+ public static final UITexture OVERLAY_SLOT_CHARGER_FLUID = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/charger_fluid");
+ public static final UITexture OVERLAY_SLOT_CIRCUIT = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/circuit");
+ public static final SteamTexture OVERLAY_SLOT_COAL_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/coal_%s");
+ public static final UITexture OVERLAY_SLOT_COMPRESSOR = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/compressor");
+ public static final SteamTexture OVERLAY_SLOT_COMPRESSOR_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/compressor_%s");
+ public static final UITexture OVERLAY_SLOT_CRUSHED_ORE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/crushed_ore");
+ public static final SteamTexture OVERLAY_SLOT_CRUSHED_ORE_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/crushed_ore_%s");
+ public static final UITexture OVERLAY_SLOT_CUTTER_SLICED = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/cutter_sliced");
+ public static final UITexture OVERLAY_SLOT_DATA_ORB = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/data_orb");
+ public static final UITexture OVERLAY_SLOT_DATA_STICK = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/data_stick");
+ public static final UITexture OVERLAY_SLOT_DUST = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/dust");
+ public static final SteamTexture OVERLAY_SLOT_DUST_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/dust_%s");
+ public static final SteamTexture OVERLAY_SLOT_BLOCK_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/block_%s");
+ public static final UITexture OVERLAY_SLOT_EXPLOSIVE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/explosive");
+ public static final UITexture OVERLAY_SLOT_EXTRUDER_SHAPE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/extruder_shape");
+ public static final UITexture OVERLAY_SLOT_FILTER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/filter");
+ public static final UITexture OVERLAY_SLOT_FURNACE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/furnace");
+ public static final SteamTexture OVERLAY_SLOT_FURNACE_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/furnace_%s");
+ public static final UITexture OVERLAY_SLOT_GEM = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/gem");
+ public static final UITexture OVERLAY_SLOT_HAMMER = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/hammer");
+ public static final SteamTexture OVERLAY_SLOT_HAMMER_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/hammer_%s");
+ public static final UITexture OVERLAY_SLOT_HEATER_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/heater_1");
+ public static final UITexture OVERLAY_SLOT_HEATER_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/heater_2");
+ public static final UITexture OVERLAY_SLOT_IMPLOSION = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/implosion");
+ public static final UITexture OVERLAY_SLOT_IN = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/in");
+ public static final SteamTexture OVERLAY_SLOT_IN_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/in_%s");
+ public static final SteamTexture OVERLAY_SLOT_INGOT_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/ingot_%s");
+ public static final UITexture OVERLAY_SLOT_INT_CIRCUIT = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/int_circuit");
+ public static final UITexture OVERLAY_SLOT_LENS = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/lens");
+ public static final UITexture OVERLAY_SLOT_MICROSCOPE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/microscope");
+ public static final UITexture OVERLAY_SLOT_MINING_PIPE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/mining_pipe");
+ public static final UITexture OVERLAY_SLOT_MOLD = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/mold");
+ public static final UITexture OVERLAY_SLOT_MOLECULAR_1 = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/molecular_1");
+ public static final UITexture OVERLAY_SLOT_MOLECULAR_2 = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/molecular_2");
+ public static final UITexture OVERLAY_SLOT_MOLECULAR_3 = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/molecular_3");
+ public static final UITexture OVERLAY_SLOT_OUT = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/out");
+ public static final SteamTexture OVERLAY_SLOT_OUT_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/out_%s");
+ public static final UITexture OVERLAY_SLOT_PAGE_BLANK = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/page_blank");
+ public static final UITexture OVERLAY_SLOT_PAGE_PRINTED = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/page_printed");
+ public static final UITexture OVERLAY_SLOT_PRESS_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_1");
+ public static final UITexture OVERLAY_SLOT_PRESS_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_2");
+ public static final UITexture OVERLAY_SLOT_PRESS_3 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/press_3");
+ public static final UITexture OVERLAY_SLOT_RECYCLE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/recycle");
+ public static final UITexture OVERLAY_SLOT_ROD_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/rod_1");
+ public static final UITexture OVERLAY_SLOT_ROD_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/rod_2");
+ public static final UITexture OVERLAY_SLOT_SLICE_SHAPE = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/slice_shape");
+ public static final UITexture OVERLAY_SLOT_SLICER_SLICED = UITexture
+ .fullImage(GregTech.ID, "gui/overlay_slot/slicer_sliced");
+ public static final UITexture OVERLAY_SLOT_SQUARE = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/square");
+ public static final UITexture OVERLAY_SLOT_UUA = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/uua");
+ public static final UITexture OVERLAY_SLOT_UUM = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/uum");
+ public static final UITexture OVERLAY_SLOT_VIAL_1 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/vial_1");
+ public static final UITexture OVERLAY_SLOT_VIAL_2 = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/vial_2");
+ public static final UITexture OVERLAY_SLOT_WIREMILL = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/wiremill");
+ public static final UITexture OVERLAY_SLOT_WRENCH = UITexture.fullImage(GregTech.ID, "gui/overlay_slot/wrench");
+ public static final UITexture[] OVERLAY_SLOTS_NUMBER = IntStream.range(0, 12)
+ .mapToObj(i -> UITexture.fullImage(GregTech.ID, "gui/overlay_slot/number_" + i))
+ .collect(Collectors.toList())
+ .toArray(new UITexture[0]);
+
+ public static final UITexture PROGRESSBAR_ARROW = UITexture.fullImage(GregTech.ID, "gui/progressbar/arrow");
+ public static final SteamTexture PROGRESSBAR_ARROW_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/progressbar/arrow_%s");
+ public static final SteamTexture PROGRESSBAR_ARROW_2_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/progressbar/arrow_2_%s");
+ public static final UITexture PROGRESSBAR_ARROW_MULTIPLE = UITexture
+ .fullImage(GregTech.ID, "gui/progressbar/arrow_multiple");
+ public static final UITexture PROGRESSBAR_ASSEMBLE = UITexture.fullImage(GregTech.ID, "gui/progressbar/assemble");
+ public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_1 = UITexture
+ .fullImage(GregTech.ID, "gui/progressbar/assemblyline_1");
+ public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_2 = UITexture
+ .fullImage(GregTech.ID, "gui/progressbar/assemblyline_2");
+ public static final UITexture PROGRESSBAR_ASSEMBLY_LINE_3 = UITexture
+ .fullImage(GregTech.ID, "gui/progressbar/assemblyline_3");
+ public static final UITexture PROGRESSBAR_BATH = UITexture.fullImage(GregTech.ID, "gui/progressbar/bath");
+ public static final UITexture PROGRESSBAR_BENDING = UITexture.fullImage(GregTech.ID, "gui/progressbar/bending");
+ public static final SteamTexture PROGRESSBAR_BOILER_EMPTY_STEAM = SteamTexture
+ .fullImage(GregTech.ID, "gui/progressbar/boiler_empty_%s");
+ public static final UITexture PROGRESSBAR_BOILER_HEAT = UITexture
+ .fullImage(GregTech.