diff --git a/AntimatterAPI b/AntimatterAPI index a2a0ff42c8..722e4c91fa 160000 --- a/AntimatterAPI +++ b/AntimatterAPI @@ -1 +1 @@ -Subproject commit a2a0ff42c88ff7746cbd72ce643a17d6c78594c8 +Subproject commit 722e4c91fa9463f4a3dc3b956208a1e38787d093 diff --git a/common/src/main/java/muramasa/gregtech/data/Guis.java b/common/src/main/java/muramasa/gregtech/data/Guis.java index eafe30064a..e93e031f72 100644 --- a/common/src/main/java/muramasa/gregtech/data/Guis.java +++ b/common/src/main/java/muramasa/gregtech/data/Guis.java @@ -45,10 +45,10 @@ public class Guis { .add(FL_OUT, 107, 61).add(FL_OUT, 125, 61).add(FL_OUT, 143, 61)); public static GuiData MULTI_DISPLAY_COMPACT = new GuiData(GTIRef.ID, "multi_display") .setSlots(ISlotProvider.DEFAULT().add(MULTI_DISPLAY.getSlots())); - public static GuiData BASIC_TANK = new GuiData(GTIRef.ID, "basic_tank") + public static GuiData BASIC_TANK = new GuiData(GTIRef.ID, "basic_tank").setBackgroundTexture("basic_tank") .setSlots(ISlotProvider.DEFAULT().add(CELL_IN, 8, 17).add(CELL_OUT, 8, 53).add(FL_IN, 55, 43)); - public static GuiData MULTIBLOCK = new GuiData(GTIRef.ID, "multiblock").setSlots(ISlotProvider.DEFAULT().add(STORAGE, 152, 5)); + public static GuiData MULTIBLOCK = new GuiData(GTIRef.ID, "multiblock").setBackgroundTexture("multiblock").setSlots(ISlotProvider.DEFAULT().add(STORAGE, 152, 5)); public static GuiData ORE_BYPRODUCTS = new GuiData("antimatter", "ore_byproducts") { @Override @@ -86,16 +86,21 @@ public static void init(Side side) { ASSEMBLER.add(IT_IN, 17, 16).add(IT_IN, 35, 16).add(IT_IN, 53, 16).add(IT_IN, 17, 34).add(IT_IN, 35, 34) .add(IT_IN, 53, 34).add(IT_OUT, 107, 25) .add(FL_IN, 53, 63) - .add(ENERGY, 80, 63); + .add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("assembler"); BENDER.add(ALLOY_SMELTER); - CANNER.add(IT_IN, 35, 25).add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(ENERGY, 80, 63); - COMPRESSOR.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(ENERGY, 80, 63); - CUTTER.add(IT_IN, 53, 25).add(FL_IN, 53, 63).add(IT_OUT, 107, 25).add(IT_OUT, 125, 25).add(ENERGY, 80, 63); + CANNER.add(IT_IN, 35, 25).add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("canner"); + COMPRESSOR.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("compressor"); + CUTTER.add(IT_IN, 53, 25).add(FL_IN, 53, 63).add(IT_OUT, 107, 25).add(IT_OUT, 125, 25).add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("cutter"); FURNACE.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(ENERGY, 80, 63); - EXTRACTOR.add(COMPRESSOR); - EXTRUDER.add(ALLOY_SMELTER); - LATHE.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(IT_OUT, 125, 25).add(ENERGY, 80, 63); - MACERATOR.add(COMPRESSOR); + EXTRACTOR.add(COMPRESSOR).getGui().getMachineData().setProgressLocation("extractor"); + EXTRUDER.add(ALLOY_SMELTER).getGui().getMachineData().setProgressLocation("extruder"); + LATHE.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(IT_OUT, 125, 25).add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("lathe"); + MACERATOR.add(COMPRESSOR).getGui().setBackgroundTexture("machine_macerator").getMachineData().setProgressLocation("macerator"); MACERATOR.add(MV, MACERATOR).add(MV, IT_OUT, 125, 25); MACERATOR.add(HV, MACERATOR).add(HV, IT_OUT, 125, 25).add(HV, IT_OUT, 143, 25); MACERATOR.add(EV, IT_IN, 53, 25).add(EV, IT_OUT, 107, 16).add(EV, IT_OUT, 125, 16).add(EV, IT_OUT, 107, 34) @@ -104,52 +109,57 @@ public static void init(Side side) { .add(IT_OUT, 125, 34).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); RECYCLER.add(COMPRESSOR).add(FL_IN, 53, 63); SCANNER.add(COMPRESSOR); - WIRE_MILL.add(COMPRESSOR); + WIRE_MILL.add(COMPRESSOR).getGui().getMachineData().setProgressLocation("wiremill"); CENTRIFUGE.add(IT_IN, 35, 25) .add(FL_IN, 53, 25) .add(IT_OUT, 107, 16).add(IT_OUT, 125, 16).add(IT_OUT, 143, 16) .add(IT_OUT, 107, 34).add(IT_OUT, 125, 34).add(IT_OUT, 143, 34) .add(FL_OUT, 35, 63).add(FL_OUT, 53, 63).add(FL_OUT, 71, 63) .add(FL_OUT, 89, 63).add(FL_OUT, 107, 63).add(FL_OUT, 125, 63) - .add(ENERGY, 17, 25); - ELECTROLYZER.add(CENTRIFUGE); + .add(ENERGY, 17, 25).getGui().getMachineData().setProgressLocation("extractor"); + ELECTROLYZER.add(CENTRIFUGE).getGui().getMachineData().setProgressLocation("extractor"); THERMAL_CENTRIFUGE.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(IT_OUT, 125, 25).add(IT_OUT, 143, 25).add(ENERGY, 80, 63); - ORE_WASHER.add(THERMAL_CENTRIFUGE).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); + ORE_WASHER.add(THERMAL_CENTRIFUGE).add(FL_IN, 53, 63).add(FL_OUT, 107, 63) + .getGui().getMachineData().setProgressLocation("ore_washer"); CHEMICAL_REACTOR.add(IT_IN, 26, 16).add(IT_IN, 44, 16) .add(FL_IN, 17, 34).add(FL_IN, 35, 34).add(FL_IN, 53, 34) .add(IT_OUT, 116, 16).add(IT_OUT, 134, 16) .add(FL_OUT, 107, 34).add(FL_OUT, 125, 34).add(FL_OUT, 143, 34) - .add(ENERGY, 80, 63); - FLUID_CANNER.add(COMPRESSOR).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); + .add(ENERGY, 80, 63).getGui().getMachineData().setProgressLocation("chemical_reactor"); + FLUID_CANNER.add(COMPRESSOR).add(FL_IN, 53, 63).add(FL_OUT, 107, 63) + .getGui().getMachineData().setProgressLocation("canner"); DISASSEMBLER.add(IT_IN, 53, 25) .add(IT_OUT, 107, 7).add(IT_OUT, 107 + 18, 7).add(IT_OUT, 107 + 18 * 2, 7) .add(IT_OUT, 107, 25).add(IT_OUT, 107 + 18, 25).add(IT_OUT, 107 + 18 * 2, 25) .add(IT_OUT, 107, 43).add(IT_OUT, 107 + 18, 43).add(IT_OUT, 107 + 18 * 2, 43) .add(ENERGY, 80, 63); MASS_FABRICATOR.add(COMPRESSOR).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); - AMP_FABRICATOR.add(COMPRESSOR).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); + AMP_FABRICATOR.add(COMPRESSOR).add(FL_IN, 53, 63).add(FL_OUT, 107, 63).getGui().getMachineData().setProgressLocation("extractor"); REPLICATOR.add(FLUID_CANNER); - FERMENTER.add(FLUID_CANNER); - FLUID_EXTRACTOR.add(COMPRESSOR).add(FL_OUT, 107, 63); + FERMENTER.add(FLUID_CANNER).getGui().getMachineData().setProgressLocation("chemical_reactor"); + FLUID_EXTRACTOR.add(COMPRESSOR).add(FL_OUT, 107, 63).getGui().getMachineData().setProgressLocation("extractor"); FLUID_HEATER.add(ENERGY, 80, 63).add(FL_IN, 53, 63).add(FL_OUT, 107, 63); FLUID_SOLIDIFIER.add(COMPRESSOR).add(FL_IN, 53, 63); - DISTILLERY.add(FLUID_CANNER); - CHEMICAL_BATH.add(THERMAL_CENTRIFUGE).add(FL_IN, 53, 63); + DISTILLERY.add(FLUID_CANNER).getGui().getMachineData().setProgressLocation("chemical_reactor"); + CHEMICAL_BATH.add(THERMAL_CENTRIFUGE).add(FL_IN, 53, 63).getGui().getMachineData().setProgressLocation("ore_washer"); AUTOCLAVE.add(COMPRESSOR).add(FL_IN, 53, 63); PACKAGER.add(COMPRESSOR); - POLARIZER.add(COMPRESSOR); + POLARIZER.add(COMPRESSOR).getGui().getMachineData().setProgressLocation("electromagnetic_separator"); MIXER.add(IT_IN, 35, 16).add(IT_IN, 53, 16).add(IT_IN, 35, 34).add(IT_IN, 53, 34).add(FL_IN, 35, 63) - .add(FL_IN, 53, 63).add(IT_OUT, 107, 25).add(FL_OUT, 107, 63).add(FL_OUT, 125, 63).add(ENERGY, 80, 63); + .add(FL_IN, 53, 63).add(IT_OUT, 107, 25).add(FL_OUT, 107, 63).add(FL_OUT, 125, 63).add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("mixer"); LASER_ENGRAVER.add(ALLOY_SMELTER); - FORMING_PRESS.add(ALLOY_SMELTER); - FORGE_HAMMER.add(FURNACE); + FORMING_PRESS.add(ALLOY_SMELTER).getGui().getMachineData().setProgressLocation("compressor"); + FORGE_HAMMER.add(FURNACE).getGui().setBackgroundTexture("machine_forge_hammer").getMachineData().setProgressLocation("forge_hammer"); SIFTER.add(IT_IN, 53, 25) .add(IT_OUT, 107, 16).add(IT_OUT, 125, 16).add(IT_OUT, 143, 16) .add(IT_OUT, 107, 34).add(IT_OUT, 125, 34).add(IT_OUT, 143, 34) - .add(ENERGY, 80, 63); + .add(ENERGY, 80, 63) + .getGui().getMachineData().setProgressLocation("sifter"); PLASMA_ARC_FURNACE.add(ARC_FURNACE); - ELECTROMAGNETIC_SEPARATOR.add(COMPRESSOR).add(IT_OUT, 125, 25).add(IT_OUT, 143, 25); + ELECTROMAGNETIC_SEPARATOR.add(COMPRESSOR).add(IT_OUT, 125, 25).add(IT_OUT, 143, 25) + .getGui().getMachineData().setProgressLocation("electromagnetic_separator"); DECAY_CHAMBER.add(IT_IN, 17, 25).add(IT_IN, 35, 25) .add(IT_OUT, 107, 25).add(FL_IN,53,25).add(FL_OUT,125,25).add(ENERGY,80,63); CHEMICAL_DEHYDRATOR.add(IT_IN, 35, 25).add(IT_IN, 53, 25) @@ -160,7 +170,7 @@ public static void init(Side side) { .add(FL_OUT,107,63).add(FL_OUT,125,63).add(FL_OUT,143,63) .add(ENERGY,80,63); - COKE_OVEN.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(FL_OUT, 125, 25); + COKE_OVEN.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(FL_OUT, 125, 25).getGui().setBackgroundTexture("coke_oven"); BATTERY_BUFFER_FOUR.add(ENERGY, 71, 27).add(ENERGY, 89, 27).add(ENERGY, 71, 45).add(ENERGY, 89, 45); BATTERY_BUFFER_ONE.add(ENERGY, 80, 40); BATTERY_BUFFER_EIGHT @@ -172,27 +182,19 @@ public static void init(Side side) { .add(ENERGY,53,45).add(ENERGY,71,45).add(ENERGY,89,45).add(ENERGY,107,45) .add(ENERGY,53,63).add(ENERGY,71,63).add(ENERGY,89,63).add(ENERGY,107,63); - COAL_BOILER.add(BRONZE, CELL_IN, 44, 26).add(BRONZE, CELL_OUT, 44, 62).add(BRONZE, IT_OUT, 116, 26).add(BRONZE, - IT_IN, 116, 62); - COAL_BOILER.add(STEEL, CELL_IN, 44, 26).add(STEEL, CELL_OUT, 44, 62).add(STEEL, IT_OUT, 116, 26).add(STEEL, + COAL_BOILER.add(CELL_IN, 44, 26).add(CELL_OUT, 44, 62).add(IT_OUT, 116, 26).add(IT_IN, 116, 62); + COAL_BOILER.add(CELL_IN, 44, 26).add(CELL_OUT, 44, 62).add(IT_OUT, 116, 26).add(STEEL, IT_IN, 116, 62); - LAVA_BOILER.add(STEEL, CELL_IN, 44, 26).add(STEEL, CELL_OUT, 44, 62); - SOLAR_BOILER.add(BRONZE, CELL_IN, 44, 26).add(BRONZE, CELL_OUT, 44, 62); - - STEAM_ALLOY_SMELTER.add(BRONZE, ALLOY_SMELTER).add(BRONZE, FL_IN, 53, 63); - STEAM_ALLOY_SMELTER.add(STEEL, ALLOY_SMELTER).add(STEEL, FL_IN, 53, 63); - STEAM_COMPRESSOR.add(BRONZE, COMPRESSOR).add(BRONZE, FL_IN, 53, 63); - STEAM_COMPRESSOR.add(STEEL, COMPRESSOR).add(STEEL, FL_IN, 53, 63); - STEAM_FURNACE.add(BRONZE, FURNACE).add(BRONZE, FL_IN, 53, 63); - STEAM_FURNACE.add(STEEL, FURNACE).add(STEEL, FL_IN, 53, 63); - STEAM_EXTRACTOR.add(BRONZE, EXTRACTOR).add(BRONZE, FL_IN, 53, 63); - STEAM_EXTRACTOR.add(STEEL, EXTRACTOR).add(STEEL, FL_IN, 53, 63); - STEAM_MACERATOR.add(BRONZE, MACERATOR).add(BRONZE, FL_IN, 53, 63); - STEAM_MACERATOR.add(STEEL, MACERATOR).add(STEEL, FL_IN, 53, 63); - STEAM_FORGE_HAMMER.add(BRONZE, FORGE_HAMMER).add(BRONZE, FL_IN, 53, 63); - STEAM_FORGE_HAMMER.add(STEEL, FORGE_HAMMER).add(STEEL, FL_IN, 53, 63); - STEAM_SIFTER.add(BRONZE, SIFTER).add(BRONZE, FL_IN, 53, 63); - STEAM_SIFTER.add(STEEL, SIFTER).add(STEEL, FL_IN, 53, 63); + LAVA_BOILER.add(CELL_IN, 44, 26).add(CELL_OUT, 44, 62); + SOLAR_BOILER.add(CELL_IN, 44, 26).add(CELL_OUT, 44, 62); + + STEAM_ALLOY_SMELTER.add(ALLOY_SMELTER).add(FL_IN, 53, 63); + STEAM_COMPRESSOR.add(COMPRESSOR).add(FL_IN, 53, 63); + STEAM_FURNACE.add(FURNACE).add(FL_IN, 53, 63); + STEAM_EXTRACTOR.add(EXTRACTOR).add(FL_IN, 53, 63); + STEAM_MACERATOR.add(MACERATOR).add(FL_IN, 53, 63); + STEAM_FORGE_HAMMER.add(FORGE_HAMMER).add(FL_IN, 53, 63); + STEAM_SIFTER.add(SIFTER).add(FL_IN, 53, 63); STEAM_GENERATOR.add(BASIC_TANK.getSlots()).getGui().setOverrideLocation(BASIC_TANK.getTexture(LV, "machine")); GAS_GENERATOR.add(BASIC_TANK.getSlots()).getGui().setOverrideLocation(BASIC_TANK.getTexture(LV, "machine")); @@ -206,7 +208,7 @@ public static void init(Side side) { QUANTUM_TANK.add(BASIC_TANK.getSlots()).getGui().setOverrideLocation(BASIC_TANK.getTexture(LV, "machine")); PRIMITIVE_BLAST_FURNACE.add(IT_IN, 53, 16).add(IT_IN, 53, 34).add(IT_IN, 53, 52).add(IT_OUT, 107, 25) - .add(IT_OUT, 125, 25).add(IT_OUT, 143, 25); + .add(IT_OUT, 125, 25).add(IT_OUT, 143, 25).getGui().setBackgroundTexture("primitive_blast_furnace"); HATCH_MUFFLER.add(IT_IN, 79, 34); @@ -268,20 +270,9 @@ public static void init(Side side) { .add(UV, FL_OUT, 97, 52); HATCH_FLUID_O.add(MAX, HATCH_FLUID_O, ULV); - FORGE_HAMMER.getCallbacks().remove(1); - FORGE_HAMMER.setGuiProgressBarForJEI(BarDir.BOTTOM, false).addGuiCallback(t -> { - t.addWidget(WidgetSupplier.build((a, b) -> TextWidget.build(((AntimatterContainerScreen)b).getTitle().getString(), 4210752).build(a,b)).setPos(9, 5).clientSide()) - .addWidget(ProgressWidget.build(BarDir.BOTTOM, false)) - .addWidget(MachineStateWidget.build().setPos(84,46).setWH(8,8)) - .addWidget(IOWidget.build(9,63,16,16)); - }); + FORGE_HAMMER.setGuiProgressBarForJEI(BarDir.BOTTOM, false).getGui().getMachineData().setMachineStatePos(84, 46); + STEAM_FORGE_HAMMER.setGuiProgressBarForJEI(BarDir.BOTTOM, false).getGui().getMachineData().setMachineStatePos(80, 50); - STEAM_FORGE_HAMMER.getCallbacks().remove(1); - STEAM_FORGE_HAMMER.setGuiProgressBarForJEI(BarDir.BOTTOM, false).addGuiCallback(t -> { - t.addWidget(WidgetSupplier.build((a, b) -> TextWidget.build(((AntimatterContainerScreen)b).getTitle().getString(), 4210752).build(a,b)).setPos(9, 5).clientSide()) - .addWidget(ProgressWidget.build(BarDir.BOTTOM, false)) - .addWidget(MachineStateWidget.build().setPos(84,46).setWH(8,8)); - }); COAL_BOILER.addGuiCallback(t -> { t.addWidget(WidgetSupplier @@ -318,7 +309,7 @@ public static void init(Side side) { .add(SlotTypes.FILTERABLE, 98, 23).add(SlotTypes.FILTERABLE, 98 + 18, 23) .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 23) .add(SlotTypes.FILTERABLE, 98, 41).add(SlotTypes.FILTERABLE, 98 + 18, 41) - .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 41); + .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 41).getGui().setBackgroundTexture("electric_item_filter"); ELECTRIC_TYPE_FILTER .add(DISPLAY_SETTABLE, 35, 23) @@ -327,7 +318,7 @@ public static void init(Side side) { .add(SlotTypes.FILTERABLE, 98, 23).add(SlotTypes.FILTERABLE, 98 + 18, 23) .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 23) .add(SlotTypes.FILTERABLE, 98, 41).add(SlotTypes.FILTERABLE, 98 + 18, 41) - .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 41); + .add(SlotTypes.FILTERABLE, 98 + 18 * 2, 41).getGui().setBackgroundTexture("electric_type_filter"); } // if (side.isClient()) { @@ -377,14 +368,15 @@ public static void init(Side side) { CRACKING_UNIT.add(MULTIBLOCK.getSlots()).getGui().setOverrideLocation(MULTIBLOCK.getTexture(LV, "machine")); NUCLEAR_REACTOR.add(MULTIBLOCK.getSlots()).getGui().setOverrideLocation(MULTIBLOCK.getTexture(LV, "machine")); FUSION_REACTOR.setGUI(MenuHandlers.FUSION_MENU_HANDLER); - FUSION_REACTOR.getGui().setEnablePlayerSlots(false); + FUSION_REACTOR.getGui().setBackgroundTexture("fusion_control_computer").setEnablePlayerSlots(false) + .getMachineData().setProgressLocation("fusion_reactor").setProgressPos(163, 4).setProgressSize(149, 16); FUSION_REACTOR.addGuiCallback(t -> { t.addButton(155, 23, 16, 16, ButtonBody.NO_OVERLAY).addButton(155, 41, 16, 16, NO_OVERLAY).addButton(155, 59, 16, 16, NO_OVERLAY).addWidget(makeProgress(BarDir.LEFT, true, new int4(0, 235, 149, 16)).setSize(4,162, 149, 16)).addWidget(FusionButtonWidget.build()); }); } public static WidgetSupplier makeProgress(BarDir dir, boolean barFill, int4 loc){ - return builder((screen, handler) -> new ProgressWidget(screen, handler, loc, dir, dir.getPos().x + 6, dir.getPos().y + 6, dir.getUV().z, dir.getUV().w, barFill)); + return builder(ProgressWidget::new); } // } } diff --git a/common/src/main/java/muramasa/gregtech/gui/widgets/FusionButtonWidget.java b/common/src/main/java/muramasa/gregtech/gui/widgets/FusionButtonWidget.java index f5bdc39336..1e8ac28498 100644 --- a/common/src/main/java/muramasa/gregtech/gui/widgets/FusionButtonWidget.java +++ b/common/src/main/java/muramasa/gregtech/gui/widgets/FusionButtonWidget.java @@ -16,8 +16,8 @@ import javax.annotation.Nullable; public class FusionButtonWidget extends Widget { - ResourceLocation middle = new ResourceLocation(GTIRef.ID, "textures/gui/machine/fusion_computer_middle_overlay.png"); - ResourceLocation top_bottom = new ResourceLocation(GTIRef.ID, "textures/gui/machine/fusion_computer_top_bottom_overlay.png"); + ResourceLocation middle = new ResourceLocation(GTIRef.ID, "textures/gui/background/fusion_computer_middle_overlay.png"); + ResourceLocation top_bottom = new ResourceLocation(GTIRef.ID, "textures/gui/background/fusion_computer_top_bottom_overlay.png"); TileEntityFusionReactor.Display display = TileEntityFusionReactor.Display.REGULAR; diff --git a/common/src/main/java/muramasa/gregtech/machine/SteamMachine.java b/common/src/main/java/muramasa/gregtech/machine/SteamMachine.java index f2ec9e9a8d..abf748ce06 100644 --- a/common/src/main/java/muramasa/gregtech/machine/SteamMachine.java +++ b/common/src/main/java/muramasa/gregtech/machine/SteamMachine.java @@ -3,11 +3,18 @@ import com.google.common.collect.ImmutableMap; import muramasa.antimatter.Data; import muramasa.antimatter.gui.BarDir; +import muramasa.antimatter.gui.SlotData; +import muramasa.antimatter.gui.SlotType; import muramasa.antimatter.gui.screen.AntimatterContainerScreen; +import muramasa.antimatter.gui.slot.ISlotProvider; import muramasa.antimatter.gui.widget.*; import muramasa.antimatter.machine.Tier; import muramasa.antimatter.machine.types.Machine; +import muramasa.gregtech.GTIRef; import muramasa.gregtech.tile.single.TileEntitySteamMachine; +import net.minecraft.resources.ResourceLocation; + +import java.util.List; import static muramasa.antimatter.machine.MachineFlag.*; import static muramasa.antimatter.machine.Tier.*; @@ -20,19 +27,44 @@ public SteamMachine(String domain, String id) { addFlags(BASIC, STEAM, COVERABLE); setGUI(Data.BASIC_MENU_HANDLER); setClientTick(); - setGuiTiers(ImmutableMap.builder().put(BRONZE, BRONZE).put(STEEL, STEEL)); + getGui().getMachineData().setMachineStateLocation(BRONZE, "bronze_machine_state").setMachineStateLocation(STEEL, "steel_machine_state"); + String suffix = id.contains("furnace") || id.contains("smelter") || id.contains("boiler") ? "default" : id.replace("steam_", ""); + getGui().getMachineData().setProgressLocation(BRONZE, "bronze_" + suffix).setProgressLocation(STEEL, "steel_" + suffix); + String bSuffix = id.contains("macerator") || id.contains("forge_hammer") ? id.replace("steam", "") : ""; + if (id.contains("boiler")){ + getGui().setBackgroundTexture(BRONZE, id + "_bronze").setBackgroundTexture(STEEL, id + "_steel"); + } else { + getGui().setBackgroundTexture(BRONZE, "machine_bronze" + bSuffix).setBackgroundTexture(STEEL, "machine_steel" + bSuffix); + } } protected void setupGui() { super.setupGui(); addGuiCallback(t -> { t.addWidget(WidgetSupplier.build((a, b) -> TextWidget.build(((AntimatterContainerScreen) b).getTitle().getString(), 4210752).build(a, b)).setPos(9, 5).clientSide()); - if (has(RECIPE)) { - t.addWidget(ProgressWidget.build(BarDir.LEFT, true)) - .addWidget(MachineStateWidget.build().setPos(84, 46).setWH(8, 8)); + if (has(RECIPE) && !getId().contains("boiler")) { + t.addWidget(ProgressWidget.build()) + .addWidget(MachineStateWidget.build()); } - // if ((has(ITEM) || has(FLUID))) - // t.addWidget(IOWidget.build(9, 63, 16, 16).onlyIf(u -> u.handler.getClass() == TileEntityMachine.class)); }); } + + @Override + public Machine add(ISlotProvider provider) { + List> list = provider.getAnySlots(); + for (SlotData slot : list) { + String suffix = slot.getType() == SlotType.FL_IN ? "fluid" : "item"; + add(BRONZE, slot.getType(), slot.getX(), slot.getY(), new ResourceLocation(GTIRef.ID, "bronze_"+suffix)); + add(STEEL, slot.getType(), slot.getX(), slot.getY(), new ResourceLocation(GTIRef.ID, "steel_"+suffix)); + } + return this; + } + + @Override + public Machine add(SlotType type, int x, int y) { + String suffix = type == SlotType.FL_IN ? "fluid" : "item"; + add(BRONZE, type, x, y, new ResourceLocation(GTIRef.ID, "bronze_"+suffix)); + add(STEEL, type, x, y, new ResourceLocation(GTIRef.ID, "steel_"+suffix)); + return this; + } } \ No newline at end of file diff --git a/common/src/main/resources/assets/gti/textures/gui/background/basic_tank.png b/common/src/main/resources/assets/gti/textures/gui/background/basic_tank.png new file mode 100644 index 0000000000..f8a1912cbc Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/basic_tank.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_bronze.png b/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_bronze.png new file mode 100644 index 0000000000..9fdd9696c5 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_bronze.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_steel.png b/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_steel.png new file mode 100644 index 0000000000..c7b9c22ef9 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/coal_boiler_steel.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/coke_oven.png b/common/src/main/resources/assets/gti/textures/gui/background/coke_oven.png new file mode 100644 index 0000000000..cb078c3f6a Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/coke_oven.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/electric_item_filter.png b/common/src/main/resources/assets/gti/textures/gui/background/electric_item_filter.png new file mode 100644 index 0000000000..6decd9b2ef Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/electric_item_filter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/electric_type_filter.png b/common/src/main/resources/assets/gti/textures/gui/background/electric_type_filter.png new file mode 100644 index 0000000000..2e09b9836b Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/electric_type_filter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/machine/fusion_computer_middle_overlay.png b/common/src/main/resources/assets/gti/textures/gui/background/fusion_computer_middle_overlay.png similarity index 100% rename from common/src/main/resources/assets/gti/textures/gui/machine/fusion_computer_middle_overlay.png rename to common/src/main/resources/assets/gti/textures/gui/background/fusion_computer_middle_overlay.png diff --git a/common/src/main/resources/assets/gti/textures/gui/machine/fusion_computer_top_bottom_overlay.png b/common/src/main/resources/assets/gti/textures/gui/background/fusion_computer_top_bottom_overlay.png similarity index 100% rename from common/src/main/resources/assets/gti/textures/gui/machine/fusion_computer_top_bottom_overlay.png rename to common/src/main/resources/assets/gti/textures/gui/background/fusion_computer_top_bottom_overlay.png diff --git a/common/src/main/resources/assets/gti/textures/gui/machine/fusion_control_computer.png b/common/src/main/resources/assets/gti/textures/gui/background/fusion_control_computer.png similarity index 100% rename from common/src/main/resources/assets/gti/textures/gui/machine/fusion_control_computer.png rename to common/src/main/resources/assets/gti/textures/gui/background/fusion_control_computer.png diff --git a/common/src/main/resources/assets/gti/textures/gui/background/lava_boiler_steel.png b/common/src/main/resources/assets/gti/textures/gui/background/lava_boiler_steel.png new file mode 100644 index 0000000000..c189c579e8 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/lava_boiler_steel.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze.png new file mode 100644 index 0000000000..0c7c4fbacc Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_forge_hammer.png new file mode 100644 index 0000000000..66c1a54f3c Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_macerator.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_macerator.png new file mode 100644 index 0000000000..55b4fc3a20 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_bronze_macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_forge_hammer.png new file mode 100644 index 0000000000..a254ff6d00 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_macerator.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_macerator.png new file mode 100644 index 0000000000..4c2e6c59f4 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_steel.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel.png new file mode 100644 index 0000000000..b1edad2ed1 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_forge_hammer.png new file mode 100644 index 0000000000..37af103020 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_macerator.png b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_macerator.png new file mode 100644 index 0000000000..4a4b6ff496 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/machine_steel_macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/multiblock.png b/common/src/main/resources/assets/gti/textures/gui/background/multiblock.png new file mode 100644 index 0000000000..c7054cf958 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/multiblock.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/primitive_blast_furnace.png b/common/src/main/resources/assets/gti/textures/gui/background/primitive_blast_furnace.png new file mode 100644 index 0000000000..de6e7e6cd3 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/primitive_blast_furnace.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/solar_boiler_bronze.png b/common/src/main/resources/assets/gti/textures/gui/background/solar_boiler_bronze.png new file mode 100644 index 0000000000..767ee965bc Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/solar_boiler_bronze.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/transformer_digital.png b/common/src/main/resources/assets/gti/textures/gui/background/transformer_digital.png new file mode 100644 index 0000000000..1f6ce5d8d8 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/transformer_digital.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/background/type_filter.png b/common/src/main/resources/assets/gti/textures/gui/background/type_filter.png new file mode 100644 index 0000000000..78695e82e5 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/background/type_filter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/assembler.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/assembler.png index 4a30e77c6e..eb21368714 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/assembler.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/assembler.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bender.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bender.png index 58f593eb55..3250173cd4 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bender.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bender.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_compressor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_compressor.png index 202437892b..e71ffc5da5 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_compressor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_compressor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_default.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_default.png index 77904517fe..77b2c5e443 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_default.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_default.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_extractor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_extractor.png index 6139648a55..f7acbc1ebf 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_extractor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_extractor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_forge_hammer.png index 42a05a0d03..467555d5d7 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_forge_hammer.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_macerator.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_macerator.png index a3e0072e63..06f96d13a3 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_macerator.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_sifter.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_sifter.png index 580b88f1fa..0c9e4b8dd4 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_sifter.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/bronze_sifter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/canner.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/canner.png index 1f88b9aa0a..bd7e94058b 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/canner.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/canner.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/centrifuge.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/centrifuge.png deleted file mode 100644 index dcf7237424..0000000000 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/centrifuge.png and /dev/null differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/chemical_reactor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/chemical_reactor.png index b113bef9c3..0ac9ef5679 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/chemical_reactor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/chemical_reactor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/coke_oven.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/coke_oven.png new file mode 100644 index 0000000000..b16f2973cf Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/coke_oven.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/compressor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/compressor.png index e189bb624d..6e05490f8a 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/compressor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/compressor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/cutter.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/cutter.png index 86a6754a2a..f13c005532 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/cutter.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/cutter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/electromagnetic_separator.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/electromagnetic_separator.png index 0eeddfd9ad..5c978ec789 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/electromagnetic_separator.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/electromagnetic_separator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/extractor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/extractor.png new file mode 100644 index 0000000000..36a339d04e Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/extractor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/extruder.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/extruder.png index 53aec0297a..c8d7fe5ef8 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/extruder.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/extruder.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/forge_hammer.png index 0d62ea6079..a9477c406e 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/forge_hammer.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/fusion_reactor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/fusion_reactor.png new file mode 100644 index 0000000000..5157096e87 Binary files /dev/null and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/fusion_reactor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/lathe.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/lathe.png index 9fee544e87..a3bcf59e12 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/lathe.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/lathe.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/macerator.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/macerator.png index 4b96d613f8..deee180b13 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/macerator.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/mixer.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/mixer.png index ec42c7af6b..da519b8821 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/mixer.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/mixer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/ore_washer.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/ore_washer.png index 499239b9cc..5546226697 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/ore_washer.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/ore_washer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/recycler.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/recycler.png index c974ad23a1..7206113460 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/recycler.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/recycler.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/sifter.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/sifter.png index 831b11567a..cea8131140 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/sifter.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/sifter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_compressor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_compressor.png index 0a9a9f4b49..4f38747a2e 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_compressor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_compressor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_default.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_default.png index c49aca623c..5a7b25ebff 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_default.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_default.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_extractor.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_extractor.png index e2783fb245..bf4e71ab94 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_extractor.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_extractor.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_forge_hammer.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_forge_hammer.png index be2b34b54e..ce8b902293 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_forge_hammer.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_forge_hammer.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_macerator.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_macerator.png index d85539fee3..6570cac096 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_macerator.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_macerator.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_sifter.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_sifter.png index 145b124f94..1ed235f87b 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_sifter.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/steel_sifter.png differ diff --git a/common/src/main/resources/assets/gti/textures/gui/progress_bars/wiremill.png b/common/src/main/resources/assets/gti/textures/gui/progress_bars/wiremill.png index 63ae8a2820..954350fcdd 100644 Binary files a/common/src/main/resources/assets/gti/textures/gui/progress_bars/wiremill.png and b/common/src/main/resources/assets/gti/textures/gui/progress_bars/wiremill.png differ