aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--dependencies.gradle12
-rw-r--r--gradle.properties3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java54
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java56
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java41
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java65
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java60
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java82
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java51
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java53
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java121
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java101
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java10
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java9
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java115
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java37
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java43
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java123
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java104
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java204
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_RadHatchHandler.java9
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java195
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java207
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_Windmill.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java255
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java66
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java56
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java156
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java39
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java155
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java8
-rw-r--r--src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.pngbin908 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GT2/gui/LESU.pngbin1158 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUI_CircuitP.pngbin1466 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUI_RSC.pngbin1340 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUI_Windmill.pngbin4857 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/GUIheatedPump.pngbin763 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/RadHatch.pngbin1214 -> 0 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/background/brown.pngbin0 -> 438 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.pngbin0 -> 994 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.pngbin0 -> 169 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.pngbin0 -> 202 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.pngbin0 -> 170 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.pngbin0 -> 196 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.pngbin0 -> 261 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.pngbin0 -> 215 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.pngbin0 -> 240 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.pngbin0 -> 146 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/radiation.pngbin0 -> 243 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.pngbin0 -> 156 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.pngbin0 -> 133 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.pngbin0 -> 230 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.pngbin0 -> 132 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.pngbin0 -> 435 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.pngbin0 -> 1002 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.pngbin0 -> 236 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.pngbin0 -> 249 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.pngbin0 -> 145 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/slot/brown.pngbin0 -> 109 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.pngbin0 -> 130 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.pngbin0 -> 154 bytes
-rw-r--r--src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.pngbin0 -> 150 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.BioLab.pngbin2000 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.Radioactive.pngbin2899 -> 0 bytes
75 files changed, 739 insertions, 1896 deletions
diff --git a/.gitignore b/.gitignore
index 40fb5e4a7d..5fcf044de6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ whitelist.json
*.iws
src/main/resources/mixins.*.json
*.bat
+.vscode/ \ No newline at end of file
diff --git a/dependencies.gradle b/dependencies.gradle
index 055cd143d2..bf9bf42c0a 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,14 +1,18 @@
// Add your dependencies here
dependencies {
- compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.99:dev")
+ compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.148:dev")
compile("com.github.GTNewHorizons:StructureLib:1.2.0-beta.2:dev")
- compile("com.github.GTNewHorizons:TecTech:5.0.42:dev")
- compile("com.github.GTNewHorizons:NotEnoughItems:2.3.7-GTNH:dev")
+ compile("com.github.GTNewHorizons:TecTech:5.0.52:dev")
+ compile("com.github.GTNewHorizons:NotEnoughItems:2.3.14-GTNH:dev")
compile("com.github.GTNewHorizons:TinkersConstruct:1.9.4-GTNH:dev")
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.5:dev")
compile("com.github.GTNewHorizons:CodeChickenCore:1.1.6:dev")
- compile("com.github.GTNewHorizons:Galacticraft:3.0.44-GTNH:dev")
+ compile("com.github.GTNewHorizons:Galacticraft:3.0.47-GTNH:dev") {
+ exclude group:"com.github.GTNewHorizons", module:"SpongePoweredMixin"
+ exclude group:"com.github.GTNewHorizons", module:"SpongeMixins"
+ }
+ compile("com.github.GTNewHorizons:ModularUI:1.0.23:dev")
compile("com.github.GTNewHorizons:GalacticGregGT5:1.0.8:dev") {
exclude group:"com.github.GTNewHorizons", module:"bartworks"
}
diff --git a/gradle.properties b/gradle.properties
index 0773d1e210..973bce915d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -55,6 +55,9 @@ coreModClass = ASM.BWCorePlugin
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
+# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
+forceEnableMixins = true
+
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java
deleted file mode 100644
index 38b762fa9a..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.API;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.tileentity.TileEntity;
-
-public interface ITileWithGUI {
-
- /**
- * @return the ID of the GUI, see @link com.github.bartimaeusnek.bartworks.GuiHandler
- */
- int getGUIID();
-
- /**
- * gets called from BW_TileEntityContainer(or _Multiple) when right clicked.
- *
- * @param tileEntity this tile entity
- * @param player the player right clicking it
- * @return true always.
- */
- default boolean openGUI(TileEntity tileEntity, EntityPlayer player) {
- if (!tileEntity.getWorldObj().isRemote)
- player.openGui(
- MainMod.MOD_ID,
- getGUIID(),
- tileEntity.getWorldObj(),
- tileEntity.xCoord,
- tileEntity.yCoord,
- tileEntity.zCoord);
- return true;
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
new file mode 100644
index 0000000000..86d9d2c0b8
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/modularUI/BW_UITextures.java
@@ -0,0 +1,56 @@
+package com.github.bartimaeusnek.bartworks.API.modularUI;
+
+import static com.github.bartimaeusnek.bartworks.MainMod.MOD_ID;
+
+import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture;
+import com.gtnewhorizons.modularui.api.drawable.UITexture;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+public class BW_UITextures {
+
+ public static final AdaptableUITexture BACKGROUND_BROWN =
+ AdaptableUITexture.of(MOD_ID, "GUI/background/brown", 176, 166, 3);
+ public static final UITexture BACKGROUND_CIRCUIT_PROGRAMMER =
+ UITexture.fullImage(MOD_ID, "GUI/background/circuit_programmer");
+
+ public static final AdaptableUITexture SLOT_BROWN = AdaptableUITexture.of(MOD_ID, "GUI/slot/brown", 18, 18, 1);
+
+ public static final UITexture OVERLAY_SLOT_DISH = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/dish");
+ public static final UITexture OVERLAY_SLOT_DNA_FLASK = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/dna_flask");
+ public static final UITexture OVERLAY_SLOT_MODULE = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/module");
+ public static final UITexture OVERLAY_SLOT_ROD = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/rod");
+ public static final UITexture OVERLAY_SLOT_CROSS = UITexture.fullImage(MOD_ID, "GUI/overlay_slot/cross");
+
+ public static final UITexture PROGRESSBAR_SIEVERT = UITexture.fullImage(MOD_ID, "GUI/progressbar/sievert");
+ public static final UITexture PROGRESSBAR_STORED_EU_116 =
+ UITexture.fullImage(MOD_ID, "GUI/progressbar/stored_eu_116");
+ public static final UITexture PROGRESSBAR_FUEL = UITexture.fullImage(MOD_ID, "GUI/progressbar/fuel");
+
+ public static final UITexture PICTURE_BW_LOGO_47X21 = UITexture.fullImage(MOD_ID, "GUI/picture/bw_logo_47x21");
+ public static final UITexture PICTURE_SIEVERT_CONTAINER =
+ UITexture.fullImage(MOD_ID, "GUI/picture/sievert_container");
+ public static final UITexture PICTURE_DECAY_TIME_CONTAINER =
+ UITexture.fullImage(MOD_ID, "GUI/picture/decay_time_container");
+ public static final UITexture PICTURE_DECAY_TIME_INSIDE =
+ UITexture.fullImage(MOD_ID, "GUI/picture/decay_time_inside");
+ public static final UITexture PICTURE_RADIATION = UITexture.fullImage(MOD_ID, "GUI/picture/radiation");
+ public static final UITexture PICTURE_WINDMILL_EMPTY = UITexture.fullImage(MOD_ID, "GUI/picture/windmill_empty");
+ public static final UITexture[] PICTURE_WINDMILL_ROTATING = IntStream.range(0, 4)
+ .mapToObj(i ->
+ UITexture.partly(MOD_ID, "GUI/picture/windmill_rotating", 32, 128, 0, i * 32, 32, (i + 1) * 32))
+ .collect(Collectors.toList())
+ .toArray(new UITexture[0]);
+ public static final UITexture PICTURE_STORED_EU_FRAME = UITexture.fullImage(MOD_ID, "GUI/picture/stored_eu_frame");
+ public static final UITexture PICTURE_RADIATION_SHUTTER_FRAME =
+ UITexture.fullImage(MOD_ID, "GUI/picture/radiation_shutter_frame");
+ public static final AdaptableUITexture PICTURE_RADIATION_SHUTTER_INSIDE =
+ AdaptableUITexture.of(MOD_ID, "GUI/picture/radiation_shutter_inside", 51, 48, 1);
+
+ public static final AdaptableUITexture TAB_TITLE_BROWN =
+ AdaptableUITexture.of(MOD_ID, "GUI/tab/title_brown", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_DARK_BROWN =
+ AdaptableUITexture.of(MOD_ID, "GUI/tab/title_dark_brown", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_ANGULAR_BROWN =
+ AdaptableUITexture.of(MOD_ID, "GUI/tab/title_angular_brown", 28, 28, 4);
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
index d074e32c53..28dbaf5250 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java
@@ -23,17 +23,7 @@
package com.github.bartimaeusnek.bartworks;
import com.github.bartimaeusnek.bartworks.API.SideReference;
-import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_HeatedWaterPump;
-import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_RadLevel;
-import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_CircuitProgrammer;
-import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_Destructopack;
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_HeatedWaterPump;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_RadioHatch;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_CircuitProgrammer;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack;
import cpw.mods.fml.common.network.IGuiHandler;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
@@ -41,43 +31,12 @@ public class GuiHandler implements IGuiHandler {
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- switch (ID) {
- case 0:
- return new GT_Container_Item_Destructopack(player.inventory);
- case 1:
- return new GT_Container_CircuitProgrammer(player.inventory);
- case 2: {
- if (world.getTileEntity(x, y, z) instanceof IGregTechTileEntity) {
- IGregTechTileEntity te = (IGregTechTileEntity) world.getTileEntity(x, y, z);
- return new BW_Container_RadioHatch(player.inventory, te.getMetaTileEntity());
- }
- }
- case 3:
- return new BW_Container_HeatedWaterPump(
- (BW_TileEntity_HeatedWaterPump) world.getTileEntity(x, y, z), player);
- }
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if (SideReference.Side.Client) {
- switch (ID) {
- case 0:
- return new GT_GUIContainer_Destructopack(player.inventory);
- case 1:
- return new GT_GUIContainer_CircuitProgrammer(player.inventory);
- case 2: {
- if (world.getTileEntity(x, y, z) instanceof IGregTechTileEntity) {
- IGregTechTileEntity te = (IGregTechTileEntity) world.getTileEntity(x, y, z);
- return new BW_GUIContainer_RadLevel(
- new BW_Container_RadioHatch(player.inventory, te.getMetaTileEntity()));
- }
- }
- case 3:
- return new BW_GUIContainer_HeatedWaterPump(new BW_Container_HeatedWaterPump(
- (BW_TileEntity_HeatedWaterPump) world.getTileEntity(x, y, z), player));
- }
} else return getServerGuiElement(ID, player, world, x, y, z);
return null;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java
deleted file mode 100644
index d92ed0012f..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_HeatedWaterPump;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.inventory.Container;
-import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-
-public class BW_GUIContainer_HeatedWaterPump extends GuiContainer {
- private static final ResourceLocation furnaceGuiTextures =
- new ResourceLocation(MainMod.MOD_ID + ":textures/GUI/GUIheatedPump.png");
- final BW_Container_HeatedWaterPump container;
-
- public BW_GUIContainer_HeatedWaterPump(Container p_i1072_1_) {
- super(p_i1072_1_);
- this.container = (BW_Container_HeatedWaterPump) p_i1072_1_;
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(BW_GUIContainer_HeatedWaterPump.furnaceGuiTextures);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- // this.drawString(this.fontRendererObj, "Fuel:" + container.fuel + " Water:" + container.water, k, l,
- // 0xffffff);
-
- if (this.container.fuel > 0) {
- this.mc.getTextureManager().bindTexture(BW_GUIContainer_HeatedWaterPump.furnaceGuiTextures);
- int ik = Math.max(this.container.maxfuel, 200);
- int i1 = ((this.container.fuel * 13) / ik);
- this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 13 - i1, 14, i1 + 1);
- }
-
- // if (this.container.water > 0){
- // this.mc.getTextureManager().bindTexture( new ResourceLocation("textures/blocks/water_still.png"));
- // this.drawTexturedModalRect(k+85,l+32,32,32,18,18);
- // }
-
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java
deleted file mode 100644
index 6d234b69dd..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_RadioHatch;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.inventory.Container;
-import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-
-@SideOnly(Side.CLIENT)
-public class BW_GUIContainer_RadLevel extends GuiContainer {
- final BW_Container_RadioHatch container;
-
- public BW_GUIContainer_RadLevel(Container p_i1072_1_) {
- super(p_i1072_1_);
- this.container = (BW_Container_RadioHatch) p_i1072_1_;
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
- GL11.glColor3f(1, 1, 1);
- this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUI_RSC.png"));
- this.drawTexturedModalRect(this.guiLeft - 79, this.guiTop, 0, 0, 256, 165);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- int y = 51 + (this.container.coverage / 2 - 3);
- int x = -63;
- if (this.container.coverage != 100 && this.container.coverage != 0)
- Gui.drawRect(x, y, x + 51, y + 1, 0xFF60D82E);
- Gui.drawRect(x, 48, x + 51, y, 0xFF8B8B8B);
- this.fontRendererObj.drawString(Byte.toString(this.container.coverage), 88 - 79, 50, 16448255);
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java
deleted file mode 100644
index 5b6c40c20a..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_Windmill;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-
-@SideOnly(Side.CLIENT)
-public class BW_GUIContainer_Windmill extends GT_GUIContainerMetaTile_Machine {
-
- public BW_GUIContainer_Windmill(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new BW_Container_Windmill(aInventoryPlayer, aTileEntity), "");
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- if (!(this.mContainer instanceof GT_Container_MultiMachine)) return;
-
- if ((this.mContainer.mDisplayErrorCode & 64) != 0)
- this.fontRendererObj.drawString(this.trans("138", "Incomplete Structure."), 92, 22, 16448255);
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- private static final int DIVIDER = 125;
- private byte last = 0;
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUI_Windmill.png"));
-
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer.mMaxProgressTime > 0) {
- if (System.currentTimeMillis() / DIVIDER % 40 == 30)
- this.drawTexturedModalRect(x + 85, y + 27, 176, (last = 96), 32, 32);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 20)
- this.drawTexturedModalRect(x + 85, y + 27, 176, (last = 64), 32, 32);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 10)
- this.drawTexturedModalRect(x + 85, y + 27, 176, (last = 32), 32, 32);
- else if (System.currentTimeMillis() / DIVIDER % 40 == 0)
- this.drawTexturedModalRect(x + 85, y + 27, 176, (last = 0), 32, 32);
- else this.drawTexturedModalRect(x + 85, y + 27, 176, last, 32, 32);
- }
-
- // Soft Mallet
- if (this.mContainer.mDisplayErrorCode == 0) {
- if (this.mContainer.mActive == 0) {
- this.drawTexturedModalRect(x + 66, y + 66, 176, 128, 15, 15);
- }
- }
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java
deleted file mode 100644
index e575474b72..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_CircuitProgrammer;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-
-@SideOnly(Side.CLIENT)
-public class GT_GUIContainer_CircuitProgrammer extends GuiContainer {
-
- public static final ResourceLocation texture =
- new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUI_CircuitP.png");
-
- public GT_GUIContainer_CircuitProgrammer(InventoryPlayer p_i1072_1_) {
- super(new GT_Container_CircuitProgrammer(p_i1072_1_));
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- Minecraft.getMinecraft().getTextureManager().bindTexture(GT_GUIContainer_CircuitProgrammer.texture);
- this.drawTexturedModalRect(this.guiLeft - 79, this.guiTop, 0, 0, 256, 165);
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java
deleted file mode 100644
index 7b050d64b7..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-
-@SideOnly(Side.CLIENT)
-public class GT_GUIContainer_Destructopack extends GuiContainer {
- public static final ResourceLocation texture =
- new ResourceLocation(MainMod.MOD_ID, "textures/GT2/gui/Destructopack.png");
-
- public GT_GUIContainer_Destructopack(InventoryPlayer inventory) {
- super(new GT_Container_Item_Destructopack(inventory));
- }
-
- @Override
- public void drawGuiContainerBackgroundLayer(float f, int j, int i) {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- Minecraft.getMinecraft().getTextureManager().bindTexture(GT_GUIContainer_Destructopack.texture);
- this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 175, 165);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {}
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java
deleted file mode 100644
index acab43a06e..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
-import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_LESU;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_GUIContainer;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import java.awt.*;
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import org.lwjgl.opengl.GL11;
-
-@SideOnly(Side.CLIENT)
-public class GT_GUIContainer_LESU extends GT_GUIContainer {
-
- public static final ResourceLocation texture = new ResourceLocation(MainMod.MOD_ID, "textures/GT2/gui/LESU.png");
- protected GT_Container_LESU mContainer;
- private final GT_TileEntity_LESU c;
-
- public GT_GUIContainer_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(new GT_Container_LESU(aInventoryPlayer, aTileEntity), GT_GUIContainer_LESU.texture.getResourceDomain());
- this.mContainer = ((GT_Container_LESU) this.inventorySlots);
- this.c = ((GT_TileEntity_LESU) (this.mContainer.mTileEntity.getMetaTileEntity()));
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.drawString(this.fontRendererObj, "L.E.S.U.", 11, 8, 16448255);
- if (this.mContainer != null) {
- String percell = String.valueOf(ConfigHandler.energyPerCell).substring(1);
- this.drawString(
- this.fontRendererObj, "EU: " + GT_Utility.formatNumbers(this.mContainer.mEnergy), 11, 16, 16448255);
- this.drawString(
- this.fontRendererObj,
- "MAX: "
- + (this.c.getBaseMetaTileEntity().isActive()
- ? GT_Utility.formatNumbers(this.mContainer.mOutput) + percell
- : Integer.toString(0)),
- 11,
- 24,
- 16448255);
- this.drawString(
- this.fontRendererObj,
- "MAX EU/t IN: " + GT_Utility.formatNumbers(this.mContainer.mInput),
- 11,
- 32,
- 16448255);
- this.drawString(
- this.fontRendererObj,
- "EU/t OUT: " + GT_Utility.formatNumbers(this.mContainer.mOutput),
- 11,
- 40,
- 16448255);
- this.drawString(
- this.fontRendererObj,
- "AMP/t IN/OUT: "
- + GT_Utility.formatNumbers(
- this.c.getBaseMetaTileEntity().getInputAmperage()),
- 11,
- 48,
- 16448255);
- if (this.c.maxEUStore() >= Long.MAX_VALUE - 1) {
- this.drawString(
- this.fontRendererObj,
- StatCollector.translateToLocal("tooltip.LESU.0.name"),
- 11,
- 56,
- Color.YELLOW.getRGB());
- }
- if (!this.c.getBaseMetaTileEntity().isActive()) {
- this.drawString(
- this.fontRendererObj,
- StatCollector.translateToLocal("tooltip.LESU.1.name"),
- 11,
- 56,
- Color.RED.getRGB());
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- Minecraft.getMinecraft().getTextureManager().bindTexture(GT_GUIContainer_LESU.texture);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
- long tScale = this.mContainer.mEnergy / Math.max(1, this.c.maxEUStore() / 116);
- this.drawTexturedModalRect(x + 8, y + 73, 0, 251, (int) tScale, 5);
- }
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java
deleted file mode 100644
index b77417131c..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.client.gui;
-
-import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_RadioHatch;
-import com.github.bartimaeusnek.bartworks.util.MathUtils;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-import org.lwjgl.opengl.GL11;
-
-@SideOnly(Side.CLIENT)
-public class GT_GUIContainer_RadioHatch extends GT_GUIContainerMetaTile_Machine {
- private static int maxSv;
- private final String mName;
-
- public GT_GUIContainer_RadioHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_RadioHatch(aInventoryPlayer, aTileEntity),
- MainMod.MOD_ID + ":textures/GUI/RadHatch.png");
- this.mName = "Radio Hatch";
- this.mContainer.detectAndSendChanges();
- GT_GUIContainer_RadioHatch.maxSv = BioVatLogicAdder.RadioHatch.getMaxSv();
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
-
- long timer = ((GT_Container_RadioHatch) this.mContainer).teTimer;
- double maxT = ((GT_Container_RadioHatch) this.mContainer).decayTime;
- double rem = maxT - timer % maxT;
-
- this.fontRendererObj.drawString(this.mName, 5, 4, 4210752);
- this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID + ":textures/GUI/RadHatch.png"));
- if (((GT_Container_RadioHatch) this.mContainer).mass > 0) {
- GL11.glColor3f(
- ((GT_Container_RadioHatch) this.mContainer).r / 255f,
- ((GT_Container_RadioHatch) this.mContainer).g / 255f,
- ((GT_Container_RadioHatch) this.mContainer).b / 255f);
- this.drawTexturedModalRect(124, 18, 124, 18, 16, 48);
- }
- GL11.glColor3f(1f, 1f, 1f);
- if (((GT_Container_RadioHatch) this.mContainer).mass <= 0) {
- this.drawTexturedModalRect(124, 18, 176, 0, 16, 48);
- } else {
- this.drawTexturedModalRect(124, 18, 176, 0, 16, 48 - MathUtils.ceilInt(48 * (rem / maxT)));
- }
- this.drawTexturedModalRect(
- 65,
- 13,
- 192,
- 0,
- (48 * (((GT_Container_RadioHatch) this.mContainer).sv)) / (GT_GUIContainer_RadioHatch.maxSv),
- 16);
-
- this.fontRendererObj.drawString(
- StatCollector.translateToLocalFormatted(
- "BW.NEI.display.radhatch.1", ((GT_Container_RadioHatch) this.mContainer).mass),
- 65,
- 62,
- 4210752);
- this.fontRendererObj.drawString(
- StatCollector.translateToLocalFormatted(
- "BW.NEI.display.radhatch.0", ((GT_Container_RadioHatch) this.mContainer).sv),
- 60,
- 72,
- 4210752);
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
index e14ff9f491..7b10ace417 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java
@@ -25,9 +25,10 @@ package com.github.bartimaeusnek.bartworks.common.blocks;
import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
+import com.gtnewhorizons.modularui.api.UIInfos;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.api.tile.IWrenchable;
@@ -98,8 +99,11 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI
if (!player.isSneaking()) {
if (tile instanceof IHasGui) {
return worldObj.isRemote || IC2.platform.launchGui(player, (IHasGui) tile);
- } else if (tile instanceof ITileWithGUI) {
- return worldObj.isRemote || ((ITileWithGUI) tile).openGUI(tile, player);
+ } else if (tile instanceof ITileWithModularUI) {
+ if (!worldObj.isRemote) {
+ UIInfos.TILE_MODULAR_UI.open(player, worldObj, x, y, z);
+ }
+ return true;
}
}
return false;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
index 61429f10e1..184e02dc00 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java
@@ -22,8 +22,9 @@
package com.github.bartimaeusnek.bartworks.common.blocks;
-import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
import com.github.bartimaeusnek.bartworks.MainMod;
+import com.gtnewhorizons.modularui.api.UIInfos;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ic2.api.tile.IWrenchable;
@@ -90,8 +91,10 @@ public class BW_TileEntityContainer_Multiple extends BlockContainer {
TileEntity tile = worldObj.getTileEntity(x, y, z);
if (tile instanceof IHasGui) {
return worldObj.isRemote || IC2.platform.launchGui(player, (IHasGui) tile);
- } else if (tile instanceof ITileWithGUI) {
- return worldObj.isRemote || ((ITileWithGUI) tile).openGUI(tile, player);
+ } else if (tile instanceof ITileWithModularUI) {
+ if (!worldObj.isRemote) {
+ UIInfos.TILE_MODULAR_UI.open(player, worldObj, x, y, z);
+ }
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
index fde6eaa2f4..bfc0a9d239 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java
@@ -22,13 +22,32 @@
package com.github.bartimaeusnek.bartworks.common.items;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.math.Pos2d;
+import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
+import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.gui.modularui.GT_UIInfos;
+import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.items.GT_Generic_Item;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import java.util.List;
@@ -37,10 +56,11 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem {
+public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem, IItemWithModularUI {
private static final int COST_PER_USE = 100;
@@ -73,11 +93,12 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
@Override
public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
if (ElectricItem.manager.use(aStack, COST_PER_USE, aPlayer)) {
- aPlayer.openGui(MainMod.instance, 1, aWorld, 0, 0, 0);
+ GT_UIInfos.openPlayerHeldItemUI(aPlayer);
}
return aStack;
}
+ @Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("unchecked")
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List itemList) {
@@ -92,11 +113,13 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
}
}
+ @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister aIconRegister) {
this.mIcon = aIconRegister.registerIcon("bartworks:CircuitProgrammer");
}
+ @Override
public int getTier(ItemStack var1) {
return 1;
}
@@ -125,4 +148,92 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem
public double getTransferLimit(ItemStack itemStack) {
return GT_Values.V[1];
}
+
+ private static final String NBT_KEY_HAS_CHIP = "HasChip";
+ private static final String NBT_KEY_CHIP_CONFIG = "ChipConfig";
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext, ItemStack heldStack) {
+ ModularWindow.Builder builder = ModularWindow.builder(256, 166);
+ builder.setBackground(BW_UITextures.BACKGROUND_CIRCUIT_PROGRAMMER);
+ builder.bindPlayerInventory(buildContext.getPlayer(), new Pos2d(86, 83), ModularUITextures.ITEM_SLOT);
+
+ ItemStackHandler inventoryHandler = new ItemStackHandler(1) {
+ @Override
+ public int getSlotLimit(int slot) {
+ return 1;
+ }
+ };
+ SlotWidget circuitSlotWidget = new SlotWidget(new BaseSlot(inventoryHandler, 0) {
+ @Override
+ public void putStack(ItemStack stack) {
+ if (isLVCircuit(stack)) {
+ stack = createRealCircuit(0);
+ }
+ ((IItemHandlerModifiable) this.getItemHandler()).setStackInSlot(getSlotIndex(), stack);
+ this.onSlotChanged();
+ }
+ });
+
+ ItemStack initialStack = null;
+ NBTTagCompound tag = heldStack.getTagCompound();
+ if (tag != null && tag.getBoolean(NBT_KEY_HAS_CHIP)) {
+ initialStack = createRealCircuit(tag.getByte(NBT_KEY_CHIP_CONFIG));
+ }
+ circuitSlotWidget.getMcSlot().putStack(initialStack);
+
+ builder.widget(circuitSlotWidget
+ .setChangeListener(widget -> {
+ ItemStack stack = widget.getMcSlot().getStack();
+ ItemStack heldItem = widget.getContext().getPlayer().getHeldItem();
+ NBTTagCompound tag2 = heldItem.getTagCompound();
+ if (tag2 == null) {
+ tag2 = new NBTTagCompound();
+ }
+
+ if (stack != null) {
+ tag2.setBoolean(NBT_KEY_HAS_CHIP, true);
+ tag2.setByte(NBT_KEY_CHIP_CONFIG, (byte) stack.getItemDamage());
+ } else {
+ tag2.setBoolean(NBT_KEY_HAS_CHIP, false);
+ }
+ heldItem.setTagCompound(tag2);
+ })
+ .setFilter(stack -> isProgrammedCircuit(stack) || isLVCircuit(stack))
+ .setBackground(ModularUITextures.ITEM_SLOT, GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
+ .setPos(122, 60));
+
+ for (int i = 0; i < 24; i++) {
+ final int index = i;
+ builder.widget(new ButtonWidget()
+ .setOnClick((clickData, widget) -> {
+ if (circuitSlotWidget.getMcSlot().getHasStack()
+ && isProgrammedCircuit(
+ circuitSlotWidget.getMcSlot().getStack())) {
+ circuitSlotWidget.getMcSlot().putStack(createRealCircuit(index + 1));
+ }
+ })
+ .setPos(32 + (i % 12) * 18, 21 + (i / 12) * 18)
+ .setSize(18, 18));
+ }
+
+ return builder.build();
+ }
+
+ private ItemStack createRealCircuit(int config) {
+ return ItemList.Circuit_Integrated.getWithDamage(1, config);
+ }
+
+ private boolean isProgrammedCircuit(ItemStack stack) {
+ return stack.getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem());
+ }
+
+ private boolean isLVCircuit(ItemStack stack) {
+ return BW_Util.checkStackAndPrefix(stack)
+ && GT_OreDictUnificator.getAssociation(stack).mPrefix.equals(OrePrefixes.circuit)
+ && GT_OreDictUnificator.getAssociation(stack)
+ .mMaterial
+ .mMaterial
+ .equals(Materials.Basic);
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
index c116290257..714cc51f2e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java
@@ -22,10 +22,21 @@
package com.github.bartimaeusnek.bartworks.common.items;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.screen.IItemWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.gui.modularui.GT_UIInfos;
+import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.items.GT_Generic_Item;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -33,7 +44,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-public class GT_Destructopack_Item extends GT_Generic_Item {
+public class GT_Destructopack_Item extends GT_Generic_Item implements IItemWithModularUI {
public GT_Destructopack_Item() {
super("GT2Destructopack", "Destructopack", "Mobile Trash Bin");
@@ -52,7 +63,7 @@ public class GT_Destructopack_Item extends GT_Generic_Item {
@Override
public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- aPlayer.openGui(MainMod.instance, 0, aWorld, 0, 0, 0);
+ GT_UIInfos.openPlayerHeldItemUI(aPlayer);
return aStack;
}
@@ -60,4 +71,26 @@ public class GT_Destructopack_Item extends GT_Generic_Item {
public void registerIcons(IIconRegister aIconRegister) {
this.mIcon = aIconRegister.registerIcon("bartworks:gt.GT2Destructopack");
}
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext, ItemStack heldStack) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 166);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.bindPlayerInventory(buildContext.getPlayer());
+
+ builder.widget(new SlotWidget(new BaseSlot(new ItemStackHandler(), 0) {
+ @Override
+ public void putStack(ItemStack stack) {
+ onSlotChanged();
+ }
+ })
+ .setBackground(ModularUITextures.ITEM_SLOT, BW_UITextures.OVERLAY_SLOT_CROSS)
+ .setPos(79, 16))
+ .widget(new DrawableWidget()
+ .setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT)
+ .setSize(17, 17)
+ .setPos(152, 63));
+
+ return builder.build();
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
index ec740107da..6bf5546ce6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_HeatedWaterPump.java
@@ -25,9 +25,17 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.classic;
import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.api.forge.InvWrapper;
+import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Pollution;
import java.util.Arrays;
@@ -47,7 +55,7 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
implements ITileDropsContent,
IFluidHandler,
IFluidTank,
- ITileWithGUI,
+ ITileWithModularUI,
ITileAddsInformation,
ITileHasDifferentTextureSides {
@@ -88,7 +96,7 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
}
private boolean checkPreUpdate() {
- return this.worldObj.isRemote || ((this.fuelstack == null || this.fuelstack.stackSize <= 0) && this.fuel <= 0);
+ return (this.fuelstack == null || this.fuelstack.stackSize <= 0) && this.fuel <= 0;
}
private void fixUnderlflow() {
@@ -117,7 +125,10 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
@Override
public void updateEntity() {
+ if (this.worldObj.isRemote) return;
+
pushWaterToAdjacentTiles();
+ fakestack.setStackDisplayName(outputstack.amount + "L Water");
if (checkPreUpdate()) return;
fixUnderlflow();
@@ -280,11 +291,6 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
}
@Override
- public int getGUIID() {
- return 3;
- }
-
- @Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
return 0;
}
@@ -340,4 +346,25 @@ public class BW_TileEntity_HeatedWaterPump extends TileEntity
par1IconRegister.registerIcon(MainMod.MOD_ID + ":heatedWaterPumpSide");
}
}
+
+ @Override
+ public ModularWindow createWindow(UIBuildContext buildContext) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 166);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.bindPlayerInventory(buildContext.getPlayer());
+ final IItemHandlerModifiable invWrapper = new InvWrapper(this);
+
+ builder.widget(new SlotWidget(invWrapper, 0)
+ .setFilter(stack -> TileEntityFurnace.getItemBurnTime(stack) > 0)
+ .setPos(55, 52))
+ .widget(SlotWidget.phantom(invWrapper, 1).disableInteraction().setPos(85, 32))
+ .widget(new ProgressBar()
+ .setProgress(() -> (float) fuel / maxfuel)
+ .setTexture(BW_UITextures.PROGRESSBAR_FUEL, 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(56, 36)
+ .setSize(14, 14));
+
+ return builder.build();
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
index 7f25dd52c2..2fcf82d36c 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java
@@ -22,7 +22,6 @@
package com.github.bartimaeusnek.bartworks.common.tileentities.classic;
-import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import net.minecraft.nbt.NBTTagCompound;
@@ -31,7 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.*;
-public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank, IFluidHandler, ITileWithGUI {
+public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank, IFluidHandler {
final ArrayList<FluidStack> INTERNALTANKS = new ArrayList<>();
@@ -154,9 +153,4 @@ public class BW_TileEntity_InfinityTank extends TileEntity implements IFluidTank
}
return ret;
}
-
- @Override
- public int getGUIID() {
- return 4;
- }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
index 141cc4760c..e5a07a9505 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_LESU_Redux.java
@@ -25,7 +25,6 @@
// import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
// import com.github.bartimaeusnek.bartworks.API.ITileDropsContent;
// import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-// import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
// import com.github.bartimaeusnek.bartworks.MainMod;
// import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
// import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
@@ -51,7 +50,7 @@
//
//
// public class BW_TileEntity_LESU_Redux extends TileEntity implements ITileHasDifferentTextureSides,
-// ITileAddsInformation, ITileWithGUI, ITileDropsContent, IEnergyConnected {
+// ITileAddsInformation, ITileDropsContent, IEnergyConnected {
//
// public ConnectedBlocksChecker connectedcells;
// public ItemStack[] circuits = new ItemStack[5];
@@ -83,11 +82,6 @@
// }
//
// @Override
-// public int getGUIID() {
-// return 0;
-// }
-//
-// @Override
// public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
// if (inputEnergyFrom(aSide)){
//
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
index d19bd42924..a420fa6933 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java
@@ -29,7 +29,6 @@ import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
@@ -42,7 +41,6 @@ import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric;
import java.lang.reflect.Field;
import java.util.Arrays;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.Fluid;
@@ -102,12 +100,6 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "DrillingRig.png");
- }
-
- @Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
String casings = getCasingBlockItem().get(0).getDisplayName();
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
index 366b6cc81b..6ed572e976 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java
@@ -22,19 +22,29 @@
package com.github.bartimaeusnek.bartworks.common.tileentities.multis;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_LESU;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
import com.github.bartimaeusnek.bartworks.util.ConnectedBlocksChecker;
+import com.gtnewhorizons.modularui.api.drawable.Text;
+import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn;
+import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+import com.gtnewhorizons.modularui.common.widget.TextWidget;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
+import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -42,11 +52,11 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Utility;
+import java.awt.*;
import java.util.ArrayList;
import java.util.Collections;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
@@ -64,7 +74,13 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
private static final IIconContainer[] iIconContainers = new IIconContainer[4];
private static final ITexture[][] iTextures = new ITexture[4][1];
public ConnectedBlocksChecker connectedcells;
- public ItemStack[] circuits = new ItemStack[5];
+ public final ItemStack[] circuits = new ItemStack[5];
+ private final ItemStackHandler circuitsInventoryHandler = new ItemStackHandler(circuits) {
+ @Override
+ public int getSlotLimit(int slot) {
+ return 1;
+ }
+ };
private long mStorage;
public GT_TileEntity_LESU(int aID, String aName, String aNameRegional) {
@@ -194,16 +210,6 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
}
}
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_LESU(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_LESU(aPlayerInventory, aBaseMetaTileEntity);
- }
-
public boolean isClientSide() {
if (this.getWorld() != null)
return this.getWorld().isRemote
@@ -449,4 +455,93 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
public World getWorld() {
return this.getBaseMetaTileEntity().getWorld();
}
+
+ @Override
+ public void addGregTechLogo(ModularWindow.Builder builder) {
+ builder.widget(new DrawableWidget()
+ .setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
+ .setSize(17, 17)
+ .setPos(105, 51));
+ }
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ builder.widget(new DrawableWidget()
+ .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setPos(7, 4)
+ .setSize(118, 67))
+ .widget(new SlotWidget(new BaseSlot(inventoryHandler, 1) {
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ })
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(127, 13))
+ .widget(new SlotWidget(new BaseSlot(inventoryHandler, 0) {
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ })
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER)
+ .setPos(127, 49));
+ for (int i = 0; i < 4; i++) {
+ builder.widget(new SlotWidget(circuitsInventoryHandler, i)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT)
+ .setPos(151, 4 + i * 18));
+ }
+
+ final DynamicPositionedColumn screenElements = new DynamicPositionedColumn();
+ drawTexts(screenElements);
+ builder.widget(screenElements);
+
+ builder.widget(new DrawableWidget()
+ .setDrawable(BW_UITextures.PICTURE_STORED_EU_FRAME)
+ .setPos(7, 72)
+ .setSize(118, 7))
+ .widget(new ProgressBar()
+ .setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(BW_UITextures.PROGRESSBAR_STORED_EU_116, 116)
+ .setPos(8, 73)
+ .setSize(116, 5));
+ }
+
+ private void drawTexts(DynamicPositionedColumn screenElements) {
+ screenElements.setSpace(0).setPos(11, 8);
+
+ screenElements
+ .widget(TextWidget.dynamicString(() -> "EU: "
+ + GT_Utility.formatNumbers(
+ getBaseMetaTileEntity().getStoredEU()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(TextWidget.dynamicString(() -> "MAX: "
+ + (getBaseMetaTileEntity().isActive()
+ ? GT_Utility.formatNumbers(
+ getBaseMetaTileEntity().getOutputVoltage())
+ + String.valueOf(ConfigHandler.energyPerCell)
+ .substring(1)
+ : Integer.toString(0)))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(TextWidget.dynamicString(() -> "MAX EU/t IN: "
+ + GT_Utility.formatNumbers(
+ getBaseMetaTileEntity().getInputVoltage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(TextWidget.dynamicString(() -> "EU/t OUT: "
+ + GT_Utility.formatNumbers(
+ getBaseMetaTileEntity().getOutputVoltage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(TextWidget.dynamicString(() -> "AMP/t IN/OUT: "
+ + GT_Utility.formatNumbers(
+ getBaseMetaTileEntity().getInputAmperage()))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()))
+ .widget(new TextWidget(Text.localised("tooltip.LESU.0.name"))
+ .setDefaultColor(Color.YELLOW.getRGB())
+ .setEnabled(widget -> maxEUStore() >= Long.MAX_VALUE - 1))
+ .widget(new TextWidget(Text.localised("tooltip.LESU.1.name"))
+ .setDefaultColor(Color.RED.getRGB())
+ .setEnabled(widget -> !getBaseMetaTileEntity().isActive()));
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
index 83075e48e0..93b003e1b8 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java
@@ -26,24 +26,37 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.MULTI
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.GT_Values.V;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_Windmill;
import com.github.bartimaeusnek.bartworks.common.items.BW_Stonage_Rotors;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock;
-import com.github.bartimaeusnek.bartworks.server.container.BW_Container_Windmill;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
-import com.gtnewhorizon.structurelib.structure.*;
+import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+import com.gtnewhorizon.structurelib.structure.IStructureElementNoPlacement;
+import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizons.modularui.api.drawable.ItemDrawable;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+import com.gtnewhorizons.modularui.common.widget.TextWidget;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
+import gregtech.api.gui.modularui.GUITextureSet;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.modularui.IGetTitleColor;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
import gregtech.api.objects.XSTR;
@@ -52,6 +65,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gregtech.common.items.GT_MetaGenerated_Tool_01;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
@@ -59,7 +73,6 @@ import java.util.List;
import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -70,7 +83,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_Windmill>
- implements ISurvivalConstructable {
+ implements ISurvivalConstructable, IGetTitleColor {
private static final IIcon[] iIcons = new IIcon[2];
private static final IIconContainer[] iIconContainers = new IIconContainer[2];
@@ -336,16 +349,6 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new BW_GUIContainer_Windmill(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new BW_Container_Windmill(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
public void stopMachine() {
getBaseMetaTileEntity().disableWorking();
}
@@ -576,4 +579,75 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_EnhancedMultiBlock
rotorBlock.rotorSlot.damage(damage, false);
}
}
+
+ @Override
+ public GUITextureSet getGUITextureSet() {
+ return new GUITextureSet()
+ .setMainBackground(BW_UITextures.BACKGROUND_BROWN)
+ .setItemSlot(BW_UITextures.SLOT_BROWN)
+ .setTitleTab(
+ BW_UITextures.TAB_TITLE_BROWN,
+ BW_UITextures.TAB_TITLE_DARK_BROWN,
+ BW_UITextures.TAB_TITLE_ANGULAR_BROWN);
+ }
+
+ @Override
+ public void addGregTechLogo(ModularWindow.Builder builder) {
+ builder.widget(new DrawableWidget()
+ .setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setSize(47, 21)
+ .setPos(123, 59));
+ }
+
+ @Override
+ public int getTitleColor() {
+ return COLOR_TITLE_WHITE.get();
+ }
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ builder.widget(new SlotWidget(inventoryHandler, 1)
+ .setBackground(getGUITextureSet().getItemSlot())
+ .setPos(59, 35))
+ .widget(
+ new DrawableWidget() {
+ private static final int DIVIDER = 125;
+
+ @Override
+ public void onScreenUpdate() {
+ super.onScreenUpdate();
+ if (mMaxProgresstime > 0) {
+ if (System.currentTimeMillis() / DIVIDER % 40 == 30)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[3]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 20)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[2]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 10)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[1]);
+ else if (System.currentTimeMillis() / DIVIDER % 40 == 0)
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_ROTATING[0]);
+ } else {
+ setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY);
+ }
+ }
+ }.setDrawable(BW_UITextures.PICTURE_WINDMILL_EMPTY)
+ .setPos(85, 27)
+ .setSize(32, 32))
+ .widget(new FakeSyncWidget.IntegerSyncer(() -> mMaxProgresstime, val -> mMaxProgresstime = val))
+ .widget(new ItemDrawable(
+ () -> mMachine && !getBaseMetaTileEntity().isActive()
+ ? GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SOFTMALLET, 1, null, null, null)
+ : null)
+ .asWidget()
+ .setPos(66, 66))
+ .widget(new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(new TextWidget(GT_Utility.trans("138", "Incomplete Structure."))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setMaxWidth(150)
+ .setEnabled(widget -> !mMachine)
+ .setPos(92, 22))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val));
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
index 67dc33c702..3a116ce85b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java
@@ -48,7 +48,6 @@ import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.Materials;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -61,7 +60,6 @@ import java.util.*;
import java.util.stream.Collectors;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
@@ -344,12 +342,6 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png");
- }
-
- @Override
public boolean checkRecipe(ItemStack itemStack) {
ItemStack[] tInputs = null;
FluidStack[] tFluids = this.getStoredFluids().toArray(new FluidStack[0]);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
index b65ff1697c..5fe08809ff 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java
@@ -43,7 +43,6 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -57,7 +56,6 @@ import java.util.ArrayList;
import java.util.Collection;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
@@ -151,12 +149,6 @@ public class GT_TileEntity_MegaChemicalReactor
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png");
- }
-
- @Override
public boolean supportsSingleRecipeLocking() {
return false;
} // TO IMPLEMENT
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
index c7e5c9b934..25d21399f8 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java
@@ -45,7 +45,6 @@ import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -59,7 +58,6 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -421,12 +419,6 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png");
- }
-
- @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return GT_Recipe.GT_Recipe_Map.sDistillationRecipes;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
index 47666a18d8..a12f177545 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java
@@ -44,7 +44,6 @@ import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -60,7 +59,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -267,12 +265,6 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OilCrackingUnit.png");
- }
-
- @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return GT_Recipe.GT_Recipe_Map.sCrackingRecipes;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
index c77a0a7af9..5057280257 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java
@@ -42,7 +42,6 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.common.Optional;
import gregtech.api.GregTech_API;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -53,7 +52,6 @@ import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
@@ -401,12 +399,6 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_TileEntity_MegaMultiBloc
return GT_Recipe.GT_Recipe_Map.sVacuumRecipes;
}
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png");
- }
-
private boolean mUseMultiparallelMode = false;
@Override
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
index 28fa80e963..851e49e3e4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
@@ -24,36 +24,57 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.tiered;
import static gregtech.api.enums.GT_Values.ticksBetweenSounds;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_RadioHatch;
-import com.github.bartimaeusnek.bartworks.server.container.GT_Container_RadioHatch;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference;
import com.github.bartimaeusnek.bartworks.util.MathUtils;
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.drawable.ItemDrawable;
+import com.gtnewhorizons.modularui.api.drawable.shapes.Rectangle;
+import com.gtnewhorizons.modularui.api.math.Alignment;
+import com.gtnewhorizons.modularui.api.math.Color;
+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.api.screen.UIBuildContext;
+import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
+import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
+import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+import com.gtnewhorizons.modularui.common.widget.ProgressBar.Direction;
+import com.gtnewhorizons.modularui.common.widget.TextWidget;
+import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
+import gregtech.api.gui.modularui.GT_UIInfos;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.gui.modularui.GUITextureSet;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.modularui.IAddGregtechLogo;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gregtech.common.items.GT_MetaGenerated_Tool_01;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
-public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
+public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch implements IAddGregtechLogo {
private final int cap;
public int sievert;
private long timer = 1;
private long decayTime = 1;
- private short[] colorForGUI;
+ private short[] colorForGUI = {0x02, 0x02, 0x02};
private byte mass;
private String material;
private byte coverage;
@@ -90,7 +111,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
public short[] getColorForGUI() {
if (this.colorForGUI != null) return this.colorForGUI;
- return new short[] {0xFA, 0xFA, 0xFF};
+ return colorForGUI = new short[] {0xFA, 0xFA, 0xFF};
}
public byte getMass() {
@@ -101,10 +122,6 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
return this.coverage;
}
- public long getDecayTime() {
- return this.decayTime;
- }
-
public void setCoverage(short coverage) {
byte nu;
if (coverage > 100) nu = 100;
@@ -113,10 +130,12 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
this.coverage = nu;
}
+ @Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return new ITexture[] {aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN)};
}
+ @Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] {aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN)};
}
@@ -127,20 +146,8 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
}
@Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aPlayer.openGui(
- MainMod.MOD_ID,
- 2,
- this.getBaseMetaTileEntity().getWorld(),
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord());
- }
-
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (!aBaseMetaTileEntity.isClientSide()) {
- aBaseMetaTileEntity.openGUI(aPlayer);
- }
+ GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
return true;
}
@@ -148,6 +155,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
if (this.mInventory[0] != null && this.mInventory[0].stackSize <= 0) this.mInventory[0] = null;
}
+ @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
BaseMetaTileEntity myMetaTileEntity = ((BaseMetaTileEntity) this.getBaseMetaTileEntity());
if (myMetaTileEntity.isServerSide()) {
@@ -178,7 +186,11 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
ItemStack lStack = this.mInventory[0];
if (lStack == null) {
+ this.colorForGUI = new short[] {0x37, 0x37, 0x37};
return;
+ } else {
+ Materials mat = GT_OreDictUnificator.getAssociation(lStack).mMaterial.mMaterial;
+ this.colorForGUI = new short[] {mat.getRGBA()[0], mat.getRGBA()[1], mat.getRGBA()[2]};
}
if (this.lastFail && GT_Utility.areStacksEqual(this.lastUsedItem, lStack, true)) {
@@ -217,11 +229,6 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
this.mass = (byte) this.lastRecipe.mDuration;
this.decayTime = this.lastRecipe.mSpecialValue;
this.sievert = this.lastRecipe.mEUt;
- this.colorForGUI = new short[] {
- (short) this.lastRecipe.mChances[0],
- (short) this.lastRecipe.mChances[1],
- (short) this.lastRecipe.mChances[2]
- };
this.material = lStack.getDisplayName();
lStack.stackSize--;
updateSlots();
@@ -266,39 +273,37 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
};
}
+ @Override
public boolean isSimpleMachine() {
return true;
}
+ @Override
public boolean isFacingValid(byte aFacing) {
return true;
}
+ @Override
public boolean isAccessAllowed(EntityPlayer aPlayer) {
return true;
}
+ @Override
public boolean isValidSlot(int aIndex) {
return true;
}
+ @Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return false;
}
+ @Override
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return aSide == this.getBaseMetaTileEntity().getFrontFacing()
&& BWRecipes.instance.getMappingsFor(BWRecipes.RADHATCH).containsInput(aStack);
}
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_RadioHatch(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_RadioHatch(aPlayerInventory, aBaseMetaTileEntity, this.mName);
- }
-
@Override
public void saveNBTData(NBTTagCompound aNBT) {
aNBT.setByte("mMass", this.mass);
@@ -311,10 +316,6 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
super.saveNBTData(aNBT);
}
- public long getTimer() {
- return this.timer;
- }
-
@Override
public void loadNBTData(NBTTagCompound aNBT) {
this.timer = aNBT.getLong("timer");
@@ -335,4 +336,127 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
GT_Utility.doSoundAtClient(rl, 10, 1.0F, aX, aY, aZ);
}
}
+
+ private static final int RADIATION_SHUTTER_WINDOW_ID = 999;
+
+ @Override
+ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
+ buildContext.addSyncedWindow(RADIATION_SHUTTER_WINDOW_ID, this::createShutterWindow);
+
+ getBaseMetaTileEntity().add1by1Slot(builder);
+ builder.widget(new DrawableWidget()
+ .setBackground(BW_UITextures.PICTURE_SIEVERT_CONTAINER)
+ .setPos(61, 9)
+ .setSize(56, 24))
+ .widget(new ProgressBar()
+ .setProgress(() -> getSievert() / 148f)
+ .setDirection(Direction.RIGHT)
+ .setTexture(BW_UITextures.PROGRESSBAR_SIEVERT, 24)
+ .setPos(65, 13)
+ .setSize(48, 16))
+ .widget(new DrawableWidget()
+ .setBackground(BW_UITextures.PICTURE_DECAY_TIME_INSIDE)
+ .setPos(124, 18)
+ .setSize(16, 48))
+ .widget(
+ new DrawableWidget() {
+ @Override
+ public void draw(float partialTicks) {
+ if (decayTime > 0) {
+ int height = MathUtils.ceilInt(
+ 48 * ((decayTime - timer % decayTime) / (float) decayTime));
+ new Rectangle()
+ .setColor(Color.argb(colorForGUI[0], colorForGUI[1], colorForGUI[2], 255))
+ .draw(new Pos2d(0, 48 - height), new Size(16, height), partialTicks);
+ }
+ }
+ }.setPos(124, 18).setSize(16, 48))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[0], val -> colorForGUI[0] = val))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[1], val -> colorForGUI[1] = val))
+ .widget(new FakeSyncWidget.ShortSyncer(() -> colorForGUI[2], val -> colorForGUI[2] = val))
+ .widget(new DrawableWidget()
+ .setBackground(BW_UITextures.PICTURE_DECAY_TIME_CONTAINER)
+ .setPos(120, 14)
+ .setSize(24, 56))
+ .widget(new FakeSyncWidget.LongSyncer(() -> decayTime, val -> decayTime = val))
+ .widget(new FakeSyncWidget.LongSyncer(() -> timer, val -> timer = val))
+ .widget(TextWidget.dynamicString(
+ () -> StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", mass))
+ .setTextAlignment(Alignment.Center)
+ .setPos(65, 62))
+ .widget(TextWidget.dynamicString(
+ () -> StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", sievert))
+ .setTextAlignment(Alignment.Center)
+ .setPos(60, 72))
+ .widget(new ButtonWidget()
+ .setOnClick((clickData, widget) -> {
+ if (!widget.isClient()) {
+ widget.getContext().openSyncedWindow(RADIATION_SHUTTER_WINDOW_ID);
+ }
+ })
+ .addTooltip("Radiation Shutter")
+ .setBackground(GT_UITextures.BUTTON_STANDARD)
+ .setPos(153, 5)
+ .setSize(18, 18))
+ .widget(new ItemDrawable(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, null, null, null))
+ .asWidget()
+ .setPos(154, 6));
+ }
+
+ private ModularWindow createShutterWindow(EntityPlayer player) {
+ ModularWindow.Builder builder = ModularWindow.builder(176, 107);
+ builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
+ builder.setGuiTint(getGUIColorization());
+
+ builder.widget(new TextWidget("Radiation Shutter Control")
+ .setDefaultColor(COLOR_TITLE.get())
+ .setPos(10, 9))
+ .widget(new DrawableWidget()
+ .setDrawable(BW_UITextures.PICTURE_RADIATION_SHUTTER_FRAME)
+ .setPos(14, 27)
+ .setSize(55, 54))
+ .widget(new DrawableWidget()
+ .setDrawable(() -> coverage < 100 ? BW_UITextures.PICTURE_RADIATION_SHUTTER_INSIDE : null)
+ .setPos(16, 29)
+ .setSize(51, 50)
+ .attachSyncer(
+ new FakeSyncWidget.ByteSyncer(this::getCoverage, this::setCoverage),
+ builder,
+ (widget, val) ->
+ widget.setPos(16, 29 + coverage / 2).setSize(51, 50 - coverage / 2)))
+ .widget(new TextFieldWidget()
+ .setSetterInt(val -> coverage = val.byteValue())
+ .setGetterInt(() -> (int) coverage)
+ .setNumbers(0, 100)
+ .setTextColor(Color.WHITE.dark(1))
+ .setOnScrollNumbers(1, 5, 50)
+ .setTextAlignment(Alignment.CenterLeft)
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2))
+ .setPos(86, 27)
+ .setSize(30, 12))
+ .widget(ButtonWidget.closeWindowButton(true).setPos(176 - 15, 3));
+
+ return builder.build();
+ }
+
+ @Override
+ public void addGregTechLogo(ModularWindow.Builder builder) {
+ builder.widget(new DrawableWidget()
+ .setDrawable(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setSize(47, 21)
+ .setPos(10, 53));
+ }
+
+ @Override
+ public GUITextureSet getGUITextureSet() {
+ return new GUITextureSet()
+ .setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT)
+ .setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT);
+ }
+
+ @Override
+ public boolean useModularUI() {
+ return true;
+ }
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
index fb1ce389df..2a2e2102ca 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java
@@ -61,7 +61,7 @@ public class BW_NEI_BioVatHandler extends GT_NEI_DefaultHandler {
}
public void drawExtras(int aRecipeIndex) {
- int base = 70;
+ int base = getDescriptionYOffset() - 2;
int[] lines = {base, base + 8, base + 16, base + 24, base + 32, base + 40, base + 48, base + 56, base + 64};
int tEUt = ((GT_NEI_DefaultHandler.CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt;
int tDuration = ((GT_NEI_DefaultHandler.CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_RadHatchHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_RadHatchHandler.java
index 8c3a8f66f6..0ae2453934 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_RadHatchHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_RadHatchHandler.java
@@ -35,11 +35,14 @@ public class BW_NEI_RadHatchHandler extends GT_NEI_DefaultHandler {
int radioLevel = recipe.mEUt;
int amount = recipe.mDuration;
long time = recipe.mSpecialValue;
- drawText(10, 73, StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", radioLevel), -16777216);
- drawText(10, 83, StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", amount), -16777216);
+ int y = getDescriptionYOffset();
+ drawText(10, y, StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.0", radioLevel), -16777216);
+ y += 10;
+ drawText(10, y, StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.1", amount), -16777216);
+ y += 10;
drawText(
10,
- 93,
+ y,
StatCollector.translateToLocalFormatted("BW.NEI.display.radhatch.2", time * amount / 20.0),
-16777216);
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java
deleted file mode 100644
index 0d9cd5731b..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_TileEntity_HeatedWaterPump;
-import com.github.bartimaeusnek.bartworks.server.container.Slots.BW_FuelSlot;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_Slot_Render;
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class BW_Container_HeatedWaterPump extends Container {
-
- final BW_TileEntity_HeatedWaterPump TILE;
- final IInventory INVENTORY;
- public int fuel, water, awater, maxfuel;
- long timer;
- byte[] anetfuel, netfuel, anetmaxfuel, netmaxfuel;
-
- public BW_Container_HeatedWaterPump(BW_TileEntity_HeatedWaterPump TILE, EntityPlayer INVENTORY) {
- this.TILE = TILE;
- this.INVENTORY = INVENTORY.inventory;
-
- this.addSlotToContainer(new BW_FuelSlot(TILE, 0, 56, 53));
- this.addSlotToContainer(new GT_Slot_Render(TILE, 1, 86, 33));
- int i;
-
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(this.INVENTORY, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(this.INVENTORY, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
- Slot slot = this.getSlot(p_82846_2_);
- if (p_82846_2_ == 0 && slot.getStack() != null) {
- for (int i = 25; i < this.inventorySlots.size(); i++) {
- if (((Slot) this.inventorySlots.get(i)).getStack() == null) {
- ((Slot) this.inventorySlots.get(i)).putStack(slot.getStack());
- slot.putStack(null);
- }
- }
- } else if (p_82846_2_ > 1
- && slot.getStack() != null
- && ((Slot) this.inventorySlots.get(0)).getStack() == null
- && ((Slot) this.inventorySlots.get(0)).isItemValid(slot.getStack())) {
- ((Slot) this.inventorySlots.get(0)).putStack(slot.getStack());
- slot.putStack(null);
- }
- return null;
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (this.TILE.getWorldObj().isRemote) return;
-
- this.fuel = this.TILE.fuel;
- this.maxfuel = this.TILE.maxfuel;
- this.water = this.TILE.outputstack.amount;
- this.netfuel = ByteBuffer.allocate(8).putInt(this.fuel).array();
- this.netmaxfuel = ByteBuffer.allocate(8).putInt(this.maxfuel).array();
- ++this.timer;
- Iterator var2 = this.crafters.iterator();
- if (this.timer >= Long.MAX_VALUE - 1) this.timer = 0;
- while (true) {
- do {
- if (!var2.hasNext()) {
- this.netfuel = this.anetfuel;
- this.netmaxfuel = this.anetmaxfuel;
- this.water = this.awater;
- return;
- }
- ICrafting var1 = (ICrafting) var2.next();
- if (this.timer % 500 == 10 || this.water != this.awater)
- var1.sendProgressBarUpdate(this, 0, this.water);
- if (this.timer % 500 == 10 || this.netfuel != this.anetfuel)
- for (int i = 0; i < this.netfuel.length; i++) {
- var1.sendProgressBarUpdate(this, i + 1, this.netfuel[i]);
- }
- if (this.timer % 500 == 10 || this.netmaxfuel != this.anetmaxfuel)
- for (int i = 0; i < this.netmaxfuel.length; i++) {
- var1.sendProgressBarUpdate(this, i + 9, this.netmaxfuel[i]);
- }
- } while (this.timer % 500 != 10 && this.water != this.awater);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int packetID, int valure) {
- if (this.netfuel == null) this.netfuel = new byte[8];
- if (this.netmaxfuel == null) this.netmaxfuel = new byte[8];
- switch (packetID) {
- case 0: {
- this.water = valure;
- this.getSlot(1).putStack(this.getSlot(1).getStack().setStackDisplayName(this.water + "L Water"));
- break;
- }
- case 1:
- this.netfuel[0] = (byte) valure;
- break;
- case 2:
- this.netfuel[1] = (byte) valure;
- break;
- case 3:
- this.netfuel[2] = (byte) valure;
- break;
- case 4:
- this.netfuel[3] = (byte) valure;
- break;
- case 5:
- this.netfuel[4] = (byte) valure;
- break;
- case 6:
- this.netfuel[5] = (byte) valure;
- break;
- case 7:
- this.netfuel[6] = (byte) valure;
- break;
- case 8:
- this.netfuel[7] = (byte) valure;
- break;
- case 9:
- this.netmaxfuel[0] = (byte) valure;
- break;
- case 10:
- this.netmaxfuel[1] = (byte) valure;
- break;
- case 11:
- this.netmaxfuel[2] = (byte) valure;
- break;
- case 12:
- this.netmaxfuel[3] = (byte) valure;
- break;
- case 13:
- this.netmaxfuel[4] = (byte) valure;
- break;
- case 14:
- this.netmaxfuel[5] = (byte) valure;
- break;
- case 15:
- this.netmaxfuel[6] = (byte) valure;
- break;
- case 16:
- this.netmaxfuel[7] = (byte) valure;
- break;
- default:
- break;
- }
- if (packetID > 0 && packetID < 9)
- this.fuel = ByteBuffer.wrap(this.netfuel).getInt();
- if (packetID > 8 && packetID < 17)
- this.maxfuel = ByteBuffer.wrap(this.netmaxfuel).getInt();
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java
deleted file mode 100644
index b53e3301db..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class BW_Container_RadioHatch extends Container {
-
- public byte coverage, dcoverage;
- long timer;
- private final GT_MetaTileEntity_RadioHatch iGregTechTileEntity;
-
- public BW_Container_RadioHatch(InventoryPlayer inventory, IMetaTileEntity iGregTechTileEntity) {
- this.iGregTechTileEntity = (GT_MetaTileEntity_RadioHatch) iGregTechTileEntity;
-
- IInventory inv = new IInventory() {
- @Override
- public int getSizeInventory() {
- return 0;
- }
-
- @Override
- public ItemStack getStackInSlot(int p_70301_1_) {
- return null;
- }
-
- @Override
- public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
- return null;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
- return null;
- }
-
- @Override
- public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {}
-
- @Override
- public String getInventoryName() {
- return null;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return false;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 0;
- }
-
- @Override
- public void markDirty() {}
-
- @Override
- public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
- return false;
- }
-
- @Override
- public void openInventory() {}
-
- @Override
- public void closeInventory() {}
-
- @Override
- public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
- return false;
- }
- };
-
- for (int i = 0; i < 12; i++) {
- this.addSlotToContainer(new GT_Slot_Holo(inv, i, -64 + i * 18, 22, false, false, 1));
- }
-
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
- for (int i = 0; i < 9; i++) {
- this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- @SuppressWarnings("rawtypes")
- public void detectAndSendChanges() {
- if (!this.iGregTechTileEntity.getBaseMetaTileEntity().isClientSide()
- && this.iGregTechTileEntity.getBaseMetaTileEntity().getMetaTileEntity() != null) {
- this.coverage = this.iGregTechTileEntity.getCoverage();
- ++this.timer;
- Iterator var2 = this.crafters.iterator();
- if (this.timer >= Long.MAX_VALUE - 1) this.timer = 0;
- while (true) {
- do {
- if (!var2.hasNext()) {
- this.dcoverage = this.coverage;
- return;
- }
- ICrafting var1 = (ICrafting) var2.next();
- if (this.timer % 500 == 10 || this.dcoverage != this.coverage)
- var1.sendProgressBarUpdate(this, 0, this.coverage);
- } while (this.timer % 500 != 10 && this.dcoverage != this.coverage);
- }
- }
- }
-
- @Override
- public void updateProgressBar(int p_75137_1_, int p_75137_2_) {
- if (p_75137_1_ == 0) this.coverage = (byte) p_75137_2_;
- }
-
- @Override
- public ItemStack slotClick(int slot, int button, int aShifthold, EntityPlayer entityPlayer) {
- if (slot >= 0 && slot < 12) {
- byte setto;
- switch (slot) {
- case 0:
- setto = -100;
- break;
- case 1:
- setto = -75;
- break;
- case 2:
- setto = -50;
- break;
- case 3:
- setto = -25;
- break;
- case 4:
- setto = -10;
- break;
- case 5:
- setto = -1;
- break;
- case 6:
- setto = 1;
- break;
- case 7:
- setto = 10;
- break;
- case 8:
- setto = 25;
- break;
- case 9:
- setto = 50;
- break;
- case 10:
- setto = 75;
- break;
- case 11:
- setto = 100;
- break;
- default:
- setto = 0;
- }
- this.iGregTechTileEntity.setCoverage((short) (this.iGregTechTileEntity.getCoverage() + setto));
- this.detectAndSendChanges();
- return null;
- }
- return super.slotClick(slot, button, aShifthold, entityPlayer);
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int SlotNR) {
- return null;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_Windmill.java
deleted file mode 100644
index f80986f198..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_Windmill.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class BW_Container_Windmill extends GT_Container_MultiMachine {
-
- public BW_Container_Windmill(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new Slot(this.mTileEntity, 1, 60, 36));
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java
deleted file mode 100644
index bbb09a2c2a..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import com.github.bartimaeusnek.bartworks.MainMod;
-import com.github.bartimaeusnek.bartworks.common.items.Circuit_Programmer;
-import com.github.bartimaeusnek.bartworks.common.net.CircuitProgrammerPacket;
-import com.github.bartimaeusnek.bartworks.util.BW_Util;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.gui.GT_Slot_Render;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.ForgeHooks;
-
-public class GT_Container_CircuitProgrammer extends Container {
-
- EntityPlayer player;
-
- public GT_Container_CircuitProgrammer(InventoryPlayer inventory) {
-
- this.player = inventory.player;
-
- IInventory inv = new pinv(this.player);
-
- this.addSlotToContainer(new Slot(inv, 0, 44, 61)); // -45, 84));
-
- for (int i = 1; i < 13; i++) {
- this.addSlotToContainer(new GT_Slot_Holo(inv, i, -64 + i * 18, 22, false, false, 1));
- }
- for (int i = 0; i < 12; i++) {
- this.addSlotToContainer(new GT_Slot_Holo(inv, i + 12, -46 + i * 18, 40, false, false, 1));
- }
-
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (int i = 0; i < 9; i++) {
- if (GT_Utility.isStackValid(inventory.getStackInSlot(i))
- && inventory.getStackInSlot(i).getItem() instanceof Circuit_Programmer)
- this.addSlotToContainer(new GT_Slot_Render(inventory, i, 8 + i * 18, 142));
- else this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack slotClick(int slot, int button, int aShifthold, EntityPlayer entityPlayer) {
- if (slot > 0 && slot < 25 && ((Slot) this.inventorySlots.get(0)).getStack() != null) {
- ItemStack iCircuit = GT_Utility.getIntegratedCircuit(slot);
- iCircuit.stackSize = 1;
- ((Slot) this.inventorySlots.get(0)).putStack(iCircuit);
- this.detectAndSendChanges();
- return ((Slot) this.inventorySlots.get(0)).getStack();
- }
- this.detectAndSendChanges();
- return super.slotClick(slot, button, aShifthold, entityPlayer);
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int SlotNR) {
- Slot chipslot = (Slot) this.inventorySlots.get(0);
- if (SlotNR > 24) {
- Slot slot = (Slot) this.inventorySlots.get(SlotNR);
- if (slot != null
- && slot.getStack() != null
- && slot.getStack()
- .getItem()
- .equals(GT_Utility.getIntegratedCircuit(0).getItem())) {
- if (chipslot.getStack() == null) {
- chipslot.putStack(slot.getStack().copy());
- slot.decrStackSize(1);
- }
- }
- } else if (SlotNR == 0 && chipslot.getStack() != null) {
- for (int i = 25; i < this.inventorySlots.size(); i++) {
- if (((Slot) this.inventorySlots.get(i)).getStack() == null) {
- Slot empty = ((Slot) this.inventorySlots.get(i));
- empty.putStack(chipslot.getStack().copy());
- chipslot.decrStackSize(1);
- break;
- }
- }
- }
- this.detectAndSendChanges();
- return null;
- }
-
- class pinv implements IInventory {
-
- ItemStack toBind;
- EntityPlayer Player;
- ItemStack Slot;
- NBTTagCompound tag;
-
- public pinv(EntityPlayer Player) {
- this.Player = Player;
- this.toBind = Player.inventory.getCurrentItem();
- this.tag = this.toBind.getTagCompound();
- if (this.tag.getBoolean("HasChip")) {
- this.Slot = GT_Utility.getIntegratedCircuit(this.tag.getByte("ChipConfig"));
- this.Slot.stackSize = 1;
- }
- }
-
- @Override
- public int getSizeInventory() {
- return 1;
- }
-
- @Override
- public ItemStack getStackInSlot(int slot) {
- return slot == 0 ? this.Slot : null;
- }
-
- @Override
- public ItemStack decrStackSize(int slotNR, int count) {
- ItemStack ret = this.Slot.copy();
- this.Slot = null;
- this.tag = this.toBind.getTagCompound();
- this.tag.setBoolean("HasChip", false);
- this.toBind.setTagCompound(this.tag);
- this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind);
- return ret;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
- return this.Slot;
- }
-
- @Override
- public void setInventorySlotContents(int slotNR, ItemStack itemStack) {
- if (itemStack != null
- && itemStack.getItem() != null
- && itemStack
- .getItem()
- .equals(GT_Utility.getIntegratedCircuit(0).getItem())) {
- this.Slot = BW_Util.setStackSize(itemStack.copy(), 1);
- itemStack.stackSize--;
- this.tag = this.toBind.getTagCompound();
- this.tag.setBoolean("HasChip", true);
- this.tag.setByte("ChipConfig", (byte) itemStack.getItemDamage());
- this.toBind.setTagCompound(this.tag);
- this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind);
- if (!this.Player.isClientWorld())
- MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(
- this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), true, (byte)
- itemStack.getItemDamage()));
- } else if (BW_Util.checkStackAndPrefix(itemStack)
- && GT_OreDictUnificator.getAssociation(itemStack).mPrefix.equals(OrePrefixes.circuit)
- && GT_OreDictUnificator.getAssociation(itemStack)
- .mMaterial
- .mMaterial
- .equals(Materials.Basic)) {
- this.Slot = GT_Utility.getIntegratedCircuit(0);
- this.Slot.stackSize = 1;
- itemStack.stackSize--;
- this.tag = this.toBind.getTagCompound();
- this.tag.setBoolean("HasChip", true);
- this.tag.setByte("ChipConfig", (byte) 0);
- this.toBind.setTagCompound(this.tag);
- this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind);
- if (!this.Player.isClientWorld())
- MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(
- this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), true, (byte) 0));
- } /* else if (GT_Utility.isStackValid(itemStack) && itemStack.getItem() instanceof Circuit_Programmer) {
- ForgeHooks.onPlayerTossEvent(Player, itemStack, false);
- this.closeInventory();
- Player.closeScreen();
- }*/ else {
- ForgeHooks.onPlayerTossEvent(this.Player, itemStack, false);
- this.tag = this.toBind.getTagCompound();
- this.tag.setBoolean("HasChip", false);
- this.toBind.setTagCompound(this.tag);
- this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind);
- if (!this.Player.isClientWorld())
- MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(
- this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), false, (byte) 0));
- }
- }
-
- @Override
- public String getInventoryName() {
- return null;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return false;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 1;
- }
-
- @Override
- public void markDirty() {}
-
- @Override
- public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
- return true;
- }
-
- @Override
- public void openInventory() {}
-
- @Override
- public void closeInventory() {}
-
- @Override
- public boolean isItemValidForSlot(int p_94041_1_, ItemStack itemStack) {
- return itemStack != null
- && itemStack
- .getItem()
- .equals(GT_Utility.getIntegratedCircuit(0).getItem());
- }
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java
deleted file mode 100644
index 60f849e766..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import com.github.bartimaeusnek.bartworks.server.container.Slots.BW_DelSlot;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_Item_Destructopack extends Container {
-
- public GT_Container_Item_Destructopack(InventoryPlayer inventory) {
-
- this.addSlotToContainer(new BW_DelSlot());
-
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
- for (int i = 0; i < 9; i++) {
- this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int aSlotIndex) {
- Slot slotObject = (Slot) this.inventorySlots.get(aSlotIndex);
- slotObject.putStack(null);
- return null;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @Override
- public void onCraftMatrixChanged(IInventory p_75130_1_) {
- Slot slotObject = (Slot) this.inventorySlots.get(0);
- slotObject.decrStackSize(0);
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java
deleted file mode 100644
index 198ff69c23..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class GT_Container_LESU extends GT_Container_MultiMachine {
-
- public GT_Container_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public GT_Container_LESU(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new Slot(this.mTileEntity, 1, 128, 14));
- this.addSlotToContainer(new Slot(this.mTileEntity, 0, 128, 50));
- this.addSlotToContainer(new Slot(this.mTileEntity, 2, 152, 5));
- this.addSlotToContainer(new Slot(this.mTileEntity, 3, 152, 23));
- this.addSlotToContainer(new Slot(this.mTileEntity, 4, 152, 41));
- this.addSlotToContainer(new Slot(this.mTileEntity, 5, 152, 59));
- }
-
- public int getSlotCount() {
- return 6;
- }
-
- public int getShiftClickSlotCount() {
- return 6;
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java
deleted file mode 100644
index 7d1f887200..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container;
-
-import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch;
-import com.github.bartimaeusnek.bartworks.util.BWRecipes;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_Container_1by1;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import java.nio.ByteBuffer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_RadioHatch extends GT_Container_1by1 {
-
- public byte mass;
- public short sv, sievert, r, g, b;
- public long teTimer, decayTime;
- GT_MetaTileEntity_RadioHatch TE;
- private long timer;
- private static final int packetSize = Byte.BYTES + Short.BYTES * 5 + Long.BYTES * 2;
-
- private ByteBuffer buffer;
-
- public GT_Container_RadioHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new RadioSlot(this.mTileEntity, 0, 80, 35));
- }
-
- @SuppressWarnings("rawtypes")
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (this.buffer == null) {
- this.buffer = ByteBuffer.allocate(128);
- }
- if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) {
- this.TE = (GT_MetaTileEntity_RadioHatch) this.mTileEntity.getMetaTileEntity();
- this.mass = this.TE.getMass();
- this.sievert = (short) this.TE.sievert;
- short[] rgb = this.TE.getColorForGUI();
- this.r = rgb[0];
- this.g = rgb[1];
- this.b = rgb[2];
- this.sv = (short) this.TE.getSievert();
- this.teTimer = this.TE.getTimer();
- this.decayTime = this.TE.getDecayTime();
- ++this.timer;
- if (this.timer >= Long.MAX_VALUE - 1) this.timer = 0;
- this.buffer.put(0, mass);
- this.buffer.putShort(Byte.BYTES, sv);
- this.buffer.putShort(Byte.BYTES + Short.BYTES, sievert);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 2, r);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 3, g);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 4, b);
- this.buffer.putLong(Byte.BYTES + Short.BYTES * 5, teTimer);
- this.buffer.putLong(Byte.BYTES + Short.BYTES * 5 + Long.BYTES, decayTime);
- for (Object clientHandle : this.crafters) {
- sendStateUpdate((ICrafting) clientHandle);
- }
- }
- }
-
- private void sendStateUpdate(ICrafting clientHandle) {
- for (int i = 0; i < packetSize; i++) {
- clientHandle.sendProgressBarUpdate(this, i + 300, buffer.get(i));
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting clientHandle) {
- super.addCraftingToCrafters(clientHandle);
- this.buffer.put(0, mass);
- this.buffer.putShort(Byte.BYTES, sv);
- this.buffer.putShort(Byte.BYTES + Short.BYTES, sievert);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 2, r);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 3, g);
- this.buffer.putShort(Byte.BYTES + Short.BYTES * 4, b);
- this.buffer.putLong(Byte.BYTES + Short.BYTES * 5, teTimer);
- this.buffer.putLong(Byte.BYTES + Short.BYTES * 5 + Long.BYTES, decayTime);
- sendStateUpdate(clientHandle);
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int index, int value) {
- super.updateProgressBar(index, value);
- index = index - 300;
- if (index >= 0 && index < buffer.capacity()) {
- this.buffer.put(index, (byte) value);
- }
- if (index >= packetSize - 1) {
- this.mass = this.buffer.get(0);
- this.sv = this.buffer.getShort(Byte.BYTES);
- this.sievert = this.buffer.getShort(Byte.BYTES + Short.BYTES);
- this.r = this.buffer.getShort(Byte.BYTES + Short.BYTES * 2);
- this.g = this.buffer.getShort(Byte.BYTES + Short.BYTES * 3);
- this.b = this.buffer.getShort(Byte.BYTES + Short.BYTES * 4);
- this.teTimer = this.buffer.getLong(Byte.BYTES + Short.BYTES * 5);
- this.decayTime = this.buffer.getLong(Byte.BYTES + Short.BYTES * 5 + Long.BYTES);
- }
- }
-
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
-
- // Handle shift-clicking
- @Override
- public ItemStack transferStackInSlot(EntityPlayer player, int id) {
- Slot slot = (Slot) this.inventorySlots.get(id);
- ItemStack stack = slot.getStack();
- if (stack == null) return null;
- if (slot instanceof RadioSlot) return super.transferStackInSlot(player, id);
- else if (BWRecipes.instance.getMappingsFor(BWRecipes.RADHATCH).containsInput(stack))
- return super.transferStackInSlot(player, id);
- else return null;
- }
-
- private static class RadioSlot extends Slot {
- public RadioSlot(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) {
- super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
- }
-
- @Override
- public boolean isItemValid(ItemStack stack) {
- return BWRecipes.instance.getMappingsFor(BWRecipes.RADHATCH).containsInput(stack);
- }
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java
deleted file mode 100644
index 1ebf203610..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container.Slots;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class BW_DelSlot extends Slot {
- public BW_DelSlot() {
- super(new InventoryPlayer(null), 0, 80, 17);
- }
-
- @SuppressWarnings("ALL")
- public void putStack(ItemStack p_75215_1_) {
- p_75215_1_ = null;
- this.onSlotChanged();
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java
deleted file mode 100644
index 0cc1cf956b..0000000000
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.github.bartimaeusnek.bartworks.server.container.Slots;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntityFurnace;
-
-public class BW_FuelSlot extends Slot {
- public BW_FuelSlot(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) {
- super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
- }
-
- @Override
- public boolean isItemValid(ItemStack itemStack) {
- return TileEntityFurnace.getItemBurnTime(itemStack) > 0;
- }
-}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
index a0e2f1ae4b..1b95d363df 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
@@ -25,11 +25,17 @@ package com.github.bartimaeusnek.bartworks.util;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.calculateSv;
import static com.github.bartimaeusnek.bartworks.util.BW_Util.specialToByte;
+import com.github.bartimaeusnek.bartworks.API.modularUI.BW_UITextures;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
+import com.gtnewhorizons.modularui.api.drawable.IDrawable;
+import com.gtnewhorizons.modularui.api.math.Pos2d;
+import com.gtnewhorizons.modularui.api.screen.ModularWindow;
+import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
+import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_OreDictUnificator;
@@ -38,6 +44,7 @@ import gregtech.api.util.GT_Utility;
import ic2.core.Ic2Items;
import ic2.core.item.ItemFluidCell;
import java.util.*;
+import java.util.function.Supplier;
import javax.annotation.Nonnegative;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
@@ -45,6 +52,7 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
+import org.jetbrains.annotations.Nullable;
public class BWRecipes {
@@ -71,57 +79,88 @@ public class BWRecipes {
"",
true,
false // special handler
- );
- private final BacteriaVatRecipeMap sBacteriaVat = new BacteriaVatRecipeMap(
- new HashSet<>(50),
- "bw.recipe.BacteriaVat",
- StatCollector.translateToLocal("tile.biovat.name"),
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 6,
- 2,
- 0,
- 1,
- 1,
- " Sievert: ",
- 1,
- " Sv",
- true,
- false // special handler
- );
- private final BW_Recipe_Map_LiquidFuel sAcidGenFuels = new BW_Recipe_Map_LiquidFuel(
- new HashSet<>(10),
- "bw.fuels.acidgens",
- StatCollector.translateToLocal("tile.acidgenerator.name"),
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 1,
- 1,
- 1,
- 1,
- 1,
- "EU generated: ",
- 1000,
- "",
- false,
- true);
- private final BWRecipes.SpecialObjectSensitiveMap sCircuitAssemblyLineMap = new SpecialObjectSensitiveMap(
- new HashSet<>(60),
- "bw.recipe.cal",
- "Circuit Assembly Line",
- null,
- "gregtech:textures/gui/basicmachines/Default",
- 6,
- 6,
- 1,
- 1,
- 1,
- "",
- 1,
- "",
- true,
- true // special handler
- );
+ ) {
+ @Nullable
+ @Override
+ public IDrawable getOverlayForSlot(boolean isFluid, boolean isOutput, int index, boolean isSpecial) {
+ if (!isFluid && !isOutput && !isSpecial) {
+ switch (index) {
+ case 0:
+ return BW_UITextures.OVERLAY_SLOT_DISH;
+ case 1:
+ return BW_UITextures.OVERLAY_SLOT_DNA_FLASK;
+ case 2:
+ return GT_UITextures.OVERLAY_SLOT_CIRCUIT;
+ case 3:
+ return GT_UITextures.OVERLAY_SLOT_MOLECULAR_1;
+ case 4:
+ return GT_UITextures.OVERLAY_SLOT_MOLECULAR_2;
+ case 5:
+ return GT_UITextures.OVERLAY_SLOT_DATA_ORB;
+ }
+ } else if (isFluid && !isOutput) {
+ return GT_UITextures.OVERLAY_SLOT_VIAL_2;
+ } else if (isSpecial) {
+ return BW_UITextures.OVERLAY_SLOT_MODULE;
+ }
+ return super.getOverlayForSlot(isFluid, isOutput, index, false);
+ }
+ }.setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
+ .setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setLogoPos(125, 3)
+ .setLogoSize(47, 21);
+ private final GT_Recipe.GT_Recipe_Map sBacteriaVat = new BacteriaVatRecipeMap(
+ new HashSet<>(50),
+ "bw.recipe.BacteriaVat",
+ StatCollector.translateToLocal("tile.biovat.name"),
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 6,
+ 2,
+ 0,
+ 1,
+ 1,
+ " Sievert: ",
+ 1,
+ " Sv",
+ true,
+ false // special handler
+ )
+ .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE);
+ private final GT_Recipe.GT_Recipe_Map sAcidGenFuels = new BW_Recipe_Map_LiquidFuel(
+ new HashSet<>(10),
+ "bw.fuels.acidgens",
+ StatCollector.translateToLocal("tile.acidgenerator.name"),
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ "EU generated: ",
+ 1000,
+ "",
+ false,
+ true)
+ .useModularUI(true);
+ private final GT_Recipe.GT_Recipe_Map sCircuitAssemblyLineMap = new SpecialObjectSensitiveMap(
+ new HashSet<>(60),
+ "bw.recipe.cal",
+ "Circuit Assembly Line",
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 6,
+ 1,
+ 1,
+ 1,
+ 1,
+ "",
+ 1,
+ "",
+ true,
+ true)
+ .setProgressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER);
private final GT_Recipe.GT_Recipe_Map sRadHatch = new GT_Recipe.GT_Recipe_Map(
new HashSet<>(150),
"bw.recipe.radhatch",
@@ -138,7 +177,19 @@ public class BWRecipes {
"",
false,
false // special handler
- );
+ ) {
+ @Override
+ public void addProgressBarUI(
+ ModularWindow.Builder builder, Supplier<Float> progressSupplier, Pos2d windowOffset) {
+ builder.widget(new DrawableWidget()
+ .setDrawable(BW_UITextures.PICTURE_RADIATION)
+ .setPos(new Pos2d(74, 20).add(windowOffset))
+ .setSize(29, 27));
+ }
+ }.setSlotOverlay(false, false, BW_UITextures.OVERLAY_SLOT_ROD)
+ .setLogo(BW_UITextures.PICTURE_BW_LOGO_47X21)
+ .setLogoPos(118, 55)
+ .setLogoSize(47, 21);
/**
* @param machine 0 = biolab; 1 = BacterialVat; 2 = sAcidGenFuels; 3 = circuitAssemblyLine
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
index fd69d50483..80c52c56a3 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/TileEntity_GTDataServer.java
@@ -24,7 +24,6 @@ package com.github.bartimaeusnek.crossmod.openComputers;
import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation;
import com.github.bartimaeusnek.bartworks.API.ITileHasDifferentTextureSides;
-import com.github.bartimaeusnek.bartworks.API.ITileWithGUI;
import com.github.bartimaeusnek.bartworks.API.SideReference;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
@@ -47,7 +46,7 @@ import net.minecraft.tileentity.TileEntity;
@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")
public class TileEntity_GTDataServer extends TileEntity
- implements ISidedInventory, ITileWithGUI, ITileAddsInformation, ITileHasDifferentTextureSides, SimpleComponent {
+ implements ISidedInventory, ITileAddsInformation, ITileHasDifferentTextureSides, SimpleComponent {
private final BiMap<Long, GT_NBT_DataBase> OrbDataBase = HashBiMap.create();
@@ -135,11 +134,6 @@ public class TileEntity_GTDataServer extends TileEntity
public void registerBlockIcons(IIconRegister par1IconRegister) {}
@Override
- public int getGUIID() {
- return 0;
- }
-
- @Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
return new int[0];
}
diff --git a/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png b/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png
deleted file mode 100644
index 7c30308cc5..0000000000
--- a/src/main/resources/assets/bartworks/textures/GT2/gui/Destructopack.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png b/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png
deleted file mode 100644
index 837692be60..0000000000
--- a/src/main/resources/assets/bartworks/textures/GT2/gui/LESU.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/GUI_CircuitP.png b/src/main/resources/assets/bartworks/textures/GUI/GUI_CircuitP.png
deleted file mode 100644
index 6ec05f5f55..0000000000
--- a/src/main/resources/assets/bartworks/textures/GUI/GUI_CircuitP.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/GUI_RSC.png b/src/main/resources/assets/bartworks/textures/GUI/GUI_RSC.png
deleted file mode 100644
index dd561b81dd..0000000000
--- a/src/main/resources/assets/bartworks/textures/GUI/GUI_RSC.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/GUI_Windmill.png b/src/main/resources/assets/bartworks/textures/GUI/GUI_Windmill.png
deleted file mode 100644
index 9a340eca30..0000000000
--- a/src/main/resources/assets/bartworks/textures/GUI/GUI_Windmill.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/GUIheatedPump.png b/src/main/resources/assets/bartworks/textures/GUI/GUIheatedPump.png
deleted file mode 100644
index 62deeffa50..0000000000
--- a/src/main/resources/assets/bartworks/textures/GUI/GUIheatedPump.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/RadHatch.png b/src/main/resources/assets/bartworks/textures/GUI/RadHatch.png
deleted file mode 100644
index 12922890d2..0000000000
--- a/src/main/resources/assets/bartworks/textures/GUI/RadHatch.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/background/brown.png b/src/main/resources/assets/bartworks/textures/GUI/background/brown.png
new file mode 100644
index 0000000000..2db03dff22
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/background/brown.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png b/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png
new file mode 100644
index 0000000000..c14cfb78ae
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/background/circuit_programmer.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png
new file mode 100644
index 0000000000..4244b6256b
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/cross.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png
new file mode 100644
index 0000000000..d051681c1e
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dish.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png
new file mode 100644
index 0000000000..fb7483a9a7
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/dna_flask.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png
new file mode 100644
index 0000000000..5dc78c8271
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/module.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png
new file mode 100644
index 0000000000..ca3b11d69d
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/overlay_slot/rod.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png b/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png
new file mode 100644
index 0000000000..34b2b59e0e
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/bw_logo_47x21.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png b/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png
new file mode 100644
index 0000000000..de259fc32a
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_container.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png b/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png
new file mode 100644
index 0000000000..8b6425b8cf
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/decay_time_inside.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png
new file mode 100644
index 0000000000..c2f1271f62
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png
new file mode 100644
index 0000000000..e5cf55abd4
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_frame.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png
new file mode 100644
index 0000000000..eb908f863a
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/radiation_shutter_inside.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png b/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png
new file mode 100644
index 0000000000..fc6478c29f
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/sievert_container.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png b/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png
new file mode 100644
index 0000000000..4a54ac5781
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/stored_eu_frame.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png b/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png
new file mode 100644
index 0000000000..f9e55beeb9
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_empty.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png b/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png
new file mode 100644
index 0000000000..3840d7fd45
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/picture/windmill_rotating.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png b/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png
new file mode 100644
index 0000000000..0dfe303cf0
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/progressbar/fuel.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png b/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png
new file mode 100644
index 0000000000..7a324ebf38
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/progressbar/sievert.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png b/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png
new file mode 100644
index 0000000000..b302f4e89e
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/progressbar/stored_eu_116.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png b/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png
new file mode 100644
index 0000000000..4d8405e02c
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/slot/brown.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png b/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png
new file mode 100644
index 0000000000..73893b9036
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/tab/title_angular_brown.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png b/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png
new file mode 100644
index 0000000000..d5c9ae0825
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/tab/title_brown.png
Binary files differ
diff --git a/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png b/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png
new file mode 100644
index 0000000000..5b3c3edec0
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/GUI/tab/title_dark_brown.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.BioLab.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.BioLab.png
deleted file mode 100644
index eb72a755d6..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.BioLab.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.Radioactive.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.Radioactive.png
deleted file mode 100644
index 9c6f03f8ed..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/basicmachines/BW.GUI.Radioactive.png
+++ /dev/null
Binary files differ