From 568783052da2bdf04f99bdfce31463e4bf943068 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Thu, 31 Jan 2019 06:49:16 +0100 Subject: hughe code refractor and hughe multis +added tooltip for Vat glas +enhanched code quality +moved glass from biolab -> new stuff +fixed diodes not working after restart +added MEBF and MVFZ +version number increase Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 379ceb4f37b53cb27be2f6882acf965a141d7591 --- .../bartworks/API/BioVatLogicAdder.java | 2 +- .../github/bartimaeusnek/bartworks/GuiHandler.java | 24 +- .../github/bartimaeusnek/bartworks/MainMod.java | 35 +- .../ClientEventHandler/ClientEventHandler.java | 62 ++ .../client/gui/BW_GUIContainer_RadLevel.java | 2 +- .../client/gui/BW_GUIContainer_RotorBlock.java | 2 +- .../client/gui/BW_GUIContainer_Windmill.java | 5 +- .../gui/GT_GUIContainer_CircuitProgrammer.java | 5 +- .../client/gui/GT_GUIContainer_Destructopack.java | 5 +- .../bartworks/client/gui/GT_GUIContainer_LESU.java | 7 +- .../client/gui/GT_GUIContainer_RadioHatch.java | 17 +- .../client/renderer/RendererGlasBlock.java | 7 +- .../renderer/RendererSwitchingColorFluid.java | 4 +- .../common/blocks/BW_TileEntityContainer.java | 2 +- .../bartworks/common/blocks/BioFluidBlock.java | 2 +- .../bartworks/common/configs/ConfigHandler.java | 4 +- .../bartworks/common/items/BW_ItemBlocks.java | 6 + .../bartworks/common/items/BW_SimpleWindMeter.java | 2 +- .../bartworks/common/items/BW_Stonage_Rotors.java | 2 +- .../bartworks/common/items/LabModule.java | 2 +- .../bartworks/common/items/LabParts.java | 2 +- .../bartworks/common/items/SimpleSubItemClass.java | 2 +- .../bartworks/common/loaders/BioItemList.java | 46 +- .../bartworks/common/loaders/BioRecipeLoader.java | 41 +- .../bartworks/common/loaders/FluidLoader.java | 2 +- .../bartworks/common/loaders/GTNHBlocks.java | 2 +- .../bartworks/common/loaders/ItemRegistry.java | 72 ++- .../bartworks/common/loaders/RecipeLoader.java | 45 +- .../bartworks/common/net/RendererPacket.java | 4 +- .../tileentities/BWTileEntityDimIDBridge.java | 28 - .../common/tileentities/BW_RotorBlock.java | 49 -- .../GT_MetaTileEntity_AcidGenerator.java | 114 ---- .../tileentities/GT_MetaTileEntity_BioLab.java | 262 -------- .../tileentities/GT_MetaTileEntity_Diode.java | 64 -- .../GT_MetaTileEntity_EnergyDistributor.java | 76 --- .../tileentities/GT_MetaTileEntity_RadioHatch.java | 317 ---------- .../common/tileentities/GT_TileEntity_BioVat.java | 674 --------------------- .../common/tileentities/GT_TileEntity_DEHP.java | 271 --------- .../common/tileentities/GT_TileEntity_LESU.java | 428 ------------- .../tileentities/GT_TileEntity_ManualTrafo.java | 458 -------------- .../tileentities/GT_TileEntity_Windmill.java | 657 -------------------- .../classic/BWTileEntityDimIDBridge.java | 28 + .../common/tileentities/classic/BW_RotorBlock.java | 49 ++ .../tileentities/multis/GT_TileEntity_BioVat.java | 625 +++++++++++++++++++ .../tileentities/multis/GT_TileEntity_DEHP.java | 270 +++++++++ .../tileentities/multis/GT_TileEntity_LESU.java | 428 +++++++++++++ .../multis/GT_TileEntity_ManualTrafo.java | 457 ++++++++++++++ .../multis/GT_TileEntity_Windmill.java | 658 ++++++++++++++++++++ .../mega/GT_TileEntity_MegaBlastFurnace.java | 303 +++++++++ .../mega/GT_TileEntity_MegaVacuumFreezer.java | 131 ++++ .../tiered/GT_MetaTileEntity_AcidGenerator.java | 114 ++++ .../tiered/GT_MetaTileEntity_BioLab.java | 262 ++++++++ .../tiered/GT_MetaTileEntity_Diode.java | 94 +++ .../GT_MetaTileEntity_EnergyDistributor.java | 76 +++ .../tiered/GT_MetaTileEntity_RadioHatch.java | 317 ++++++++++ .../tiered/GT_MetaTileEntity_Transistor.java | 153 +++++ .../server/container/BW_Container_RadioHatch.java | 2 +- .../server/container/GT_Container_RadioHatch.java | 2 +- .../bartimaeusnek/bartworks/util/BW_Util.java | 185 +++++- .../bartimaeusnek/bartworks/util/BioCulture.java | 2 +- .../bartworks/util/NEIbartworksConfig.java | 7 +- 61 files changed, 4393 insertions(+), 3581 deletions(-) create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/BWTileEntityDimIDBridge.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/BW_RotorBlock.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_BioLab.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_BioVat.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java (limited to 'src/main') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java index 483b4a67e2..81b0d894af 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java @@ -94,7 +94,7 @@ public final class BioVatLogicAdder { if (ret) BioVatGlass.glasses.put(new BlockMetaPair(block, (byte) meta), (byte) tier); else - MainMod.logger.warn("Block: " + sUnlocBlockName + " of the Mod: " + sModname + " was NOT found!"); + MainMod.LOGGER.warn("Block: " + sUnlocBlockName + " of the Mod: " + sModname + " was NOT found!"); block = null; return ret; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java index f45ac86579..00b9317d5a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java @@ -28,6 +28,7 @@ import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_Destructopa 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.FMLCommonHandler; import cpw.mods.fml.common.network.IGuiHandler; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; @@ -54,18 +55,21 @@ public class GuiHandler implements IGuiHandler { @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - 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())); + if (FMLCommonHandler.instance().getSide().isClient()) { + 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())); + } } } - } + } else + return getServerGuiElement(ID, player, world, x, y, z); return null; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index a0364772af..52b282646f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -23,6 +23,8 @@ package com.github.bartimaeusnek.bartworks; +import com.github.bartimaeusnek.bartworks.API.API_REFERENCE; +import com.github.bartimaeusnek.bartworks.client.ClientEventHandler.ClientEventHandler; import com.github.bartimaeusnek.bartworks.client.creativetabs.BioTab; import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab; import com.github.bartimaeusnek.bartworks.client.creativetabs.bartworksTab; @@ -30,6 +32,7 @@ import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.loaders.GTNHBlocks; import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry; import com.github.bartimaeusnek.bartworks.common.net.BW_Network; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -37,37 +40,40 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SubTag; import net.minecraft.creativetab.CreativeTabs; +import net.minecraftforge.common.MinecraftForge; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import static com.github.bartimaeusnek.bartworks.API.API_REFERENCE.VERSION; - @Mod( - modid = MainMod.modID, name = MainMod.name, version = MainMod.version, + modid = MainMod.MOD_ID, name = MainMod.NAME, version = MainMod.VERSION, dependencies = "required-after:IC2; " + "required-after:gregtech; " ) public final class MainMod { - public static final String name = "BartWorks"; - public static final String version = "@version@"; - public static final String modID = "bartworks"; - public static final Logger logger = LogManager.getLogger(name); + public static final String NAME = "BartWorks"; + public static final String VERSION = "@version@"; + public static final String MOD_ID = "bartworks"; + public static final Logger LOGGER = LogManager.getLogger(NAME); public static final CreativeTabs GT2 = new GT2Tab("GT2C"); - public static final CreativeTabs BioTab = new BioTab("BioTab"); + public static final CreativeTabs BIO_TAB = new BioTab("BioTab"); public static final CreativeTabs BWT = new bartworksTab("bartworks"); public static final IGuiHandler GH = new GuiHandler(); public static boolean GTNH = false; - @Mod.Instance(modID) + @Mod.Instance(MOD_ID) public static MainMod instance; public static ConfigHandler CHandler; public static BW_Network BW_Network_instance = new BW_Network(); @Mod.EventHandler public void preInit(FMLPreInitializationEvent preinit) { - if (!(VERSION.equals(version))) { - logger.error("Something has loaded an old API. Please contact the Mod authors to update!"); + //fixing BorosilicateGlass... -_-' + Materials.BorosilicateGlass.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_RECYCLING, SubTag.SMELTING_TO_FLUID); + if (!(API_REFERENCE.VERSION.equals(VERSION))) { + LOGGER.error("Something has loaded an old API. Please contact the Mod authors to update!"); } if (Loader.isModLoaded("dreamcraft")) { @@ -75,14 +81,14 @@ public final class MainMod { } CHandler = new ConfigHandler(preinit); if (GTNH) - logger.info("GTNH-Detected . . . ACTIVATE HARDMODE."); - + LOGGER.info("GTNH-Detected . . . ACTIVATE HARDMODE."); } @Mod.EventHandler public void init(FMLInitializationEvent init) { + if (FMLCommonHandler.instance().getSide().isClient() && ConfigHandler.BioLab) + MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); new LoaderRegistry().run(); - } @Mod.EventHandler @@ -91,5 +97,4 @@ public final class MainMod { if (ConfigHandler.BioLab) new GTNHBlocks().run(); } - } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java new file mode 100644 index 0000000000..377632c4ba --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2019 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.ClientEventHandler; + +import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder; +import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks; +import com.github.bartimaeusnek.bartworks.util.BW_Util; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +import java.util.HashMap; + +@SideOnly(Side.CLIENT) +public class ClientEventHandler { + + @SideOnly(Side.CLIENT) + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void getTooltip(ItemTooltipEvent event) { + if (event.itemStack == null || event.itemStack.getItem() == null || Block.getBlockFromItem(event.itemStack.getItem()) == null || event.itemStack.getItemDamage() > 127) + return; + + final Block BLOCK = Block.getBlockFromItem(event.itemStack.getItem()); + if (BLOCK instanceof BW_Blocks) { + return; + } + final BioVatLogicAdder.BlockMetaPair PAIR = new BioVatLogicAdder.BlockMetaPair(BLOCK, (byte) event.itemStack.getItemDamage()); + final HashMap GLASSMAP = BioVatLogicAdder.BioVatGlass.getGlassMap(); + if (GLASSMAP.containsKey(PAIR)) { + int tier = GLASSMAP.get(PAIR); + event.toolTip.add("Glass-Tier: " + BW_Util.getColorForTier(tier) + GT_Values.VN[tier] + ChatColorHelper.RESET); + } else if (BLOCK.getMaterial().equals(Material.glass)) { + event.toolTip.add("Glass-Tier: " + BW_Util.getColorForTier(3) + GT_Values.VN[3] + ChatColorHelper.RESET); + } + } +} \ No newline at end of file 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 index 91dfa14c28..bdffce07ee 100644 --- 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 @@ -44,7 +44,7 @@ public class BW_GUIContainer_RadLevel extends GuiContainer { @Override protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor3f(1, 1, 1); - this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID, "textures/GUI/GUI_RSC.png")); + this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUI_RSC.png")); drawTexturedModalRect(guiLeft - 79, guiTop, 0, 0, 256, 165); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java index 61b87019e3..0ad5c5982f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java @@ -64,7 +64,7 @@ public class BW_GUIContainer_RotorBlock extends GuiWindKineticGenerator { protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { GL11.glColor3f(0.5f, 0.25f, 0.07f); - this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID, "textures/GUI/GUIPrimitiveKUBox.png")); + this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID, "textures/GUI/GUIPrimitiveKUBox.png")); int j = (this.width - this.xSize) / 2; int k = (this.height - this.ySize) / 2; this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); 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 index 09dec26e2b..df4d721b02 100644 --- 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 @@ -23,6 +23,8 @@ package com.github.bartimaeusnek.bartworks.client.gui; import com.github.bartimaeusnek.bartworks.MainMod; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -30,6 +32,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +@SideOnly(Side.CLIENT) public class BW_GUIContainer_Windmill extends GT_GUIContainer_MultiMachine { public BW_GUIContainer_Windmill(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { @@ -46,7 +49,7 @@ public class BW_GUIContainer_Windmill extends GT_GUIContainer_MultiMachine { protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor3f(0.5f, 0.25f, 0.07f); - this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID, "textures/GUI/GUI_Windmill.png")); + 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; 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 index 2a699035f4..34574929db 100644 --- 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 @@ -24,15 +24,18 @@ 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.modID, "textures/GUI/GUI_CircuitP.png"); + 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_)); 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 index feaf22fcc1..c1998f4bfe 100644 --- 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 @@ -24,14 +24,17 @@ 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.modID, "textures/GT2/gui/Destructopack.png"); + 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)); 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 index 1378d9e943..8b96ba44fb 100644 --- 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 @@ -24,8 +24,10 @@ 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.GT_TileEntity_LESU; +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 net.minecraft.client.Minecraft; @@ -35,9 +37,10 @@ import org.lwjgl.opengl.GL11; import java.awt.*; +@SideOnly(Side.CLIENT) public class GT_GUIContainer_LESU extends GT_GUIContainer { - public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GT2/gui/LESU.png"); + public static final ResourceLocation texture = new ResourceLocation(MainMod.MOD_ID, "textures/GT2/gui/LESU.png"); protected GT_Container_LESU mContainer; private GT_TileEntity_LESU c; 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 index 220d88d7a9..3cdaddc85b 100644 --- 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 @@ -24,9 +24,10 @@ 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.common.tileentities.GT_MetaTileEntity_RadioHatch; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_RadioHatch; -import com.github.bartimaeusnek.bartworks.util.BW_Util; +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; @@ -35,12 +36,13 @@ import org.lwjgl.opengl.GL11; import java.nio.ByteBuffer; +@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.modID + ":textures/GUI/RadHatch.png"); + super(new GT_Container_RadioHatch(aInventoryPlayer, aTileEntity), MainMod.MOD_ID + ":textures/GUI/RadHatch.png"); this.mName = "Radio Hatch"; this.mContainer.detectAndSendChanges(); maxSv = BioVatLogicAdder.RadioHatch.getMaxSv(); @@ -52,7 +54,7 @@ public class GT_GUIContainer_RadioHatch extends GT_GUIContainerMetaTile_Machine double rem = maxT - timer % maxT; this.fontRendererObj.drawString(this.mName, 8, 4, 4210752); - this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.modID + ":textures/GUI/RadHatch.png")); + this.mc.getTextureManager().bindTexture(new ResourceLocation(MainMod.MOD_ID + ":textures/GUI/RadHatch.png")); if (((GT_Container_RadioHatch) mContainer).mass > 0) { GL11.glColor3f(((GT_Container_RadioHatch) mContainer).r / 255f, ((GT_Container_RadioHatch) mContainer).g / 255f, ((GT_Container_RadioHatch) mContainer).b / 255f); this.drawTexturedModalRect(124, 18, 124, 18, 16, 48); @@ -61,9 +63,10 @@ public class GT_GUIContainer_RadioHatch extends GT_GUIContainerMetaTile_Machine this.drawTexturedModalRect(124, 18, 176, 0, 16, 48 - (int) Math.ceil(48 * (rem / maxT))); this.drawTexturedModalRect(65, 13, 192, 0, (48 * (((GT_Container_RadioHatch) mContainer).sv)) / (maxSv), 16); - this.fontRendererObj.drawString("Sv: " + ((GT_Container_RadioHatch) mContainer).sievert, 8, 50, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); - this.fontRendererObj.drawString("Kg: " + ((GT_Container_RadioHatch) mContainer).mass, 8, 68, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); - this.fontRendererObj.drawString("Time: " + timer, 8, 76, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); + +// this.fontRendererObj.drawString("Sv: " + ((GT_Container_RadioHatch) mContainer).sievert, 8, 50, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); +// this.fontRendererObj.drawString("Kg: " + ((GT_Container_RadioHatch) mContainer).mass, 8, 68, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); +// this.fontRendererObj.drawString("Time: " + timer, 8, 76, BW_Util.getColorFromArray(new short[]{((GT_Container_RadioHatch) mContainer).r, ((GT_Container_RadioHatch) mContainer).g, ((GT_Container_RadioHatch) mContainer).b})); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java index 25f5c9220e..423fb20468 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java @@ -23,15 +23,18 @@ package com.github.bartimaeusnek.bartworks.client.renderer; import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks; -import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList; +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; +@SideOnly(Side.CLIENT) public class RendererGlasBlock implements ISimpleBlockRenderingHandler { public static final int RID = RenderingRegistry.getNextAvailableRenderId(); @@ -74,7 +77,7 @@ public class RendererGlasBlock implements ISimpleBlockRenderingHandler { @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { //renderer.setRenderBounds(0.001,0.001,0.001,0.999,0.999,0.999); - renderer.renderStandardBlock(BioItemList.bw_fake_glasses, x, y, z); + renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses, x, y, z); //renderer.setRenderBounds(0,0,0,1,1,1); renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f); return true; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java index 4f7a19e0c6..0a2bf2d99c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java @@ -24,7 +24,7 @@ package com.github.bartimaeusnek.bartworks.client.renderer; import com.github.bartimaeusnek.bartworks.common.blocks.BioFluidBlock; import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_BioVat; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat; import com.github.bartimaeusnek.bartworks.util.Coords; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.relauncher.Side; @@ -40,7 +40,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.IFluidBlock; - +@SideOnly(Side.CLIENT) public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler { private static final float LIGHT_Y_NEG = 0.5f; private static final float LIGHT_Y_POS = 1f; 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 b0be51a5c0..b9d59c2294 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 @@ -44,7 +44,7 @@ public class BW_TileEntityContainer extends BlockContainer { this.tileEntity = tileEntity; this.setCreativeTab(MainMod.BWT); this.setBlockName(blockName); - this.setBlockTextureName(MainMod.modID + ":" + blockName); + this.setBlockTextureName(MainMod.MOD_ID + ":" + blockName); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java index 3a17a3759b..ea1b074c69 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.blocks; import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader; -import com.github.bartimaeusnek.bartworks.common.tileentities.BWTileEntityDimIDBridge; +import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BWTileEntityDimIDBridge; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.ITileEntityProvider; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java index 0db716071e..01af8ef53f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java @@ -40,10 +40,11 @@ public class ConfigHandler { public static boolean BioLab = true; public static Configuration c; public static boolean DEHPDirectSteam = false; + public static int megaMachinesMax = 256; private static boolean ezmode = false; public ConfigHandler(@Nonnull FMLPreInitializationEvent e) { - c = new Configuration(new File(e.getModConfigurationDirectory().toString() + "/" + MainMod.modID + ".cfg")); + c = new Configuration(new File(e.getModConfigurationDirectory().toString() + "/" + MainMod.MOD_ID + ".cfg")); IDOffset = c.get("System", "ID Offset", 12600, "ID Offset for this mod. This Mod uses " + IDU + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12600); energyPerCell = c.get("Multiblocks", "energyPerLESUCell", 1000000, "This will set Up the Energy per LESU Cell", 1000000, Integer.MAX_VALUE).getInt(1000000); @@ -53,6 +54,7 @@ public class ConfigHandler { newStuff = !c.get("System", "Disable non-original-GT-stuff", false, "This switch disables my new content, that is not part of the GT2 compat").getBoolean(false); BioLab = !c.get("System", "Disable BioLab", false, "This switch disables the BioLab, BioVat etc. If you use GT5.08 or equivalent, this needs to be turned off!").getBoolean(false); DEHPDirectSteam = c.get("Multiblocks", "DEHP Direct Steam Mode", false, "This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant").getBoolean(false); + megaMachinesMax = c.get("Multiblocks", "Mega Machines Maximum Recipes per Operation", 256, "This changes the Maximum Recipes per Operation to the specified Valure").getInt(256); if (ConfigHandler.IDOffset == 0) { ConfigHandler.IDOffset = 12600; c.get("System", "ID Offset", 12600, "ID Offset for this mod. This Mod uses " + IDU + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").set(12600); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java index 2066ac3b8e..1b631cc5fe 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java @@ -23,9 +23,12 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks; +import com.github.bartimaeusnek.bartworks.util.BW_Util; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_LanguageManager; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -58,7 +61,10 @@ public class BW_ItemBlocks extends ItemBlock { } @Override + @SideOnly(Side.CLIENT) public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + if (this.field_150939_a instanceof BW_GlasBlocks) + aList.add("Glass-Tier: " + BW_Util.getColorForTier(BW_Util.getTierFromGlasMeta(aStack.getItemDamage())) + GT_Values.VN[BW_Util.getTierFromGlasMeta(aStack.getItemDamage())]); aList.add(this.mNoMobsToolTip); aList.add(this.mNoTileEntityToolTip); aList.add("Added by" + ChatColorHelper.DARKGREEN + " BartWorks"); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java index f526e5a601..d4184dfc08 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java @@ -49,7 +49,7 @@ public class BW_SimpleWindMeter extends Item { @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister p_94581_1_) { - this.itemIcon = p_94581_1_.registerIcon(MainMod.modID + ":BW_SimpleWindMeter"); + this.itemIcon = p_94581_1_.registerIcon(MainMod.MOD_ID + ":BW_SimpleWindMeter"); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java index 2227cae93e..cbe4ce0b23 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java @@ -65,7 +65,7 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(MainMod.modID + ":" + itemTex); + this.itemIcon = iconRegister.registerIcon(MainMod.MOD_ID + ":" + itemTex); } public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java index f434fd5d5f..9f18e6c457 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java @@ -31,7 +31,7 @@ import java.util.List; public class LabModule extends SimpleSubItemClass { public LabModule(String[] tex) { super(tex); - this.setCreativeTab(MainMod.BioTab); + this.setCreativeTab(MainMod.BIO_TAB); } public String getUnlocalizedName(ItemStack p_77667_1_) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java index da80a83eb3..67c1222a28 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java @@ -40,7 +40,7 @@ public class LabParts extends SimpleSubItemClass { public LabParts(String[] tex) { super(tex); - this.setCreativeTab(MainMod.BioTab); + this.setCreativeTab(MainMod.BIO_TAB); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java index 365efb5c81..d2c2e17478 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java @@ -50,7 +50,7 @@ public class SimpleSubItemClass extends Item { public void registerIcons(IIconRegister iconRegister) { itemIcon = new IIcon[tex.length]; for (int i = 0; i < tex.length; i++) { - itemIcon[i] = iconRegister.registerIcon(MainMod.modID + ":" + tex[i]); + itemIcon[i] = iconRegister.registerIcon(MainMod.MOD_ID + ":" + tex[i]); } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java index 0c7b559b03..590cc6048d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java @@ -22,9 +22,6 @@ package com.github.bartimaeusnek.bartworks.common.loaders; -import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks; -import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks; import com.github.bartimaeusnek.bartworks.common.items.LabModule; import com.github.bartimaeusnek.bartworks.common.items.LabParts; import com.github.bartimaeusnek.bartworks.util.BioCulture; @@ -32,11 +29,6 @@ import com.github.bartimaeusnek.bartworks.util.BioDNA; import com.github.bartimaeusnek.bartworks.util.BioData; import com.github.bartimaeusnek.bartworks.util.BioPlasmid; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.util.GT_OreDictUnificator; -import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -47,47 +39,13 @@ import java.util.HashSet; public class BioItemList { - public static final Block[] bw_glasses = { - new BW_GlasBlocks( - "BW_GlasBlocks", - new String[]{ - MainMod.modID + ":BoronSilicateGlassBlock", - MainMod.modID + ":NickelReinforcedBoronSilicateGlassBlock", - MainMod.modID + ":TungstenReinforcedBoronSilicateGlassBlock", - MainMod.modID + ":ChromeReinforcedBoronSilicateGlassBlock", - MainMod.modID + ":IridiumReinforcedBoronSilicateGlassBlock", - MainMod.modID + ":OsmiumReinforcedBoronSilicateGlassBlock", - MainMod.modID + ":ColoredBoronSilicateGlassBlock1", - MainMod.modID + ":ColoredBoronSilicateGlassBlock2", - MainMod.modID + ":ColoredBoronSilicateGlassBlock3", - MainMod.modID + ":ColoredBoronSilicateGlassBlock4", - MainMod.modID + ":ColoredBoronSilicateGlassBlock5", - MainMod.modID + ":ColoredBoronSilicateGlassBlock6", - }, - new short[][]{Materials.BorosilicateGlass.getRGBA(), Materials.Nickel.getRGBA(), Materials.Tungsten.getRGBA(), Materials.Chrome.getRGBA(), Materials.Iridium.getRGBA(), Materials.Osmium.getRGBA(), new short[]{0xff, 0, 0}, new short[]{0, 0xff, 0}, new short[]{0x80, 0, 0xff}, new short[]{0xff, 0xff, 0}, new short[]{0, 0xff, 0x80}, new short[]{0x80, 0x33, 0}}, - MainMod.BioTab, - true, false - ) - }; - - public static final Block bw_fake_glasses = - new BW_GlasBlocks("BW_GlasBlocks", new String[]{ - MainMod.modID + ":BoronSilicateGlassBlockRandlos" - }, null, null, true, true); - - - private static final Item mItemBioLabParts = new LabModule(new String[]{"DNAExtractionModule", "PCRThermoclyclingModule", "PlasmidSynthesisModule", "TransformationModule", "ClonalCellularSynthesisModule" }); + private static final Item mItemBioLabParts = new LabModule(new String[]{"DNAExtractionModule", "PCRThermoclyclingModule", "PlasmidSynthesisModule", "TransformationModule", "ClonalCellularSynthesisModule"}); public static final ItemStack[] mBioLabParts = {new ItemStack(mItemBioLabParts), new ItemStack(mItemBioLabParts, 1, 1), new ItemStack(mItemBioLabParts, 1, 2), new ItemStack(mItemBioLabParts, 1, 3), new ItemStack(mItemBioLabParts, 1, 4)}; - private static final Item vanillaBioLabParts = new LabParts(new String[]{"petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose", "IncubationModule", "PlasmaMembrane" }); + private static final Item vanillaBioLabParts = new LabParts(new String[]{"petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose", "IncubationModule", "PlasmaMembrane"}); public BioItemList() { GameRegistry.registerItem(mItemBioLabParts, "BioLabModules"); GameRegistry.registerItem(vanillaBioLabParts, "BioLabParts"); - GameRegistry.registerBlock(bw_glasses[0], BW_ItemBlocks.class, "BW_GlasBlocks"); - GameRegistry.registerBlock(bw_fake_glasses, "BW_FakeGlasBlock"); - //fixing BorosilicateGlass... -_-' - Materials.BorosilicateGlass.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.NO_RECYCLING, SubTag.SMELTING_TO_FLUID); - GT_OreDictUnificator.add(OrePrefixes.block, Materials.BorosilicateGlass, new ItemStack(bw_glasses[0], 1, 0)); } public static Collection getAllPetriDishes() { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java index 0987005a7f..05c63ef0cb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioRecipeLoader.java @@ -23,14 +23,17 @@ package com.github.bartimaeusnek.bartworks.common.loaders; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_BioLab; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_RadioHatch; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_BioVat; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_BioLab; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_RadioHatch; import com.github.bartimaeusnek.bartworks.util.BWRecipes; import com.github.bartimaeusnek.bartworks.util.BW_Util; import com.github.bartimaeusnek.bartworks.util.BioCulture; import cpw.mods.fml.common.Loader; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -197,7 +200,7 @@ public class BioRecipeLoader extends RecipeLoader { "GCG", "KHK", "GCG", - 'G', new ItemStack(BioItemList.bw_glasses[0], 1, 1), + 'G', new ItemStack(ItemRegistry.bw_glasses[0], 1, 1), 'C', "circuit" + Materials.Data, 'K', GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Silver, 1L), 'H', ItemList.MACHINE_HULLS[3].get(1L) @@ -354,33 +357,5 @@ public class BioRecipeLoader extends RecipeLoader { 400, BW_Util.getMachineVoltageFromTier(1) ); - - GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Materials.Nickel.getMolten(5184), new ItemStack(BioItemList.bw_glasses[0], 1, 1), 800, BW_Util.getMachineVoltageFromTier(3)); - GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 1), Materials.Tungsten.getMolten(1296), new ItemStack(BioItemList.bw_glasses[0], 1, 2), 800, BW_Util.getMachineVoltageFromTier(5)); - GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 2), Materials.Chrome.getMolten(1296), new ItemStack(BioItemList.bw_glasses[0], 1, 3), 800, BW_Util.getMachineVoltageFromTier(6)); - GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 3), Materials.Iridium.getMolten(3888), new ItemStack(BioItemList.bw_glasses[0], 1, 4), 800, BW_Util.getMachineVoltageFromTier(7)); - GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 4), Materials.Osmium.getMolten(1296), new ItemStack(BioItemList.bw_glasses[0], 1, 5), 800, BW_Util.getMachineVoltageFromTier(8)); - - for (int i = 0; i < Dyes.dyeBrown.getSizeOfFluidList(); ++i) { - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyeRed.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 6), null, null, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyeGreen.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 7), null, null, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyePurple.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 8), null, null, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyeYellow.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 9), null, null, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyeLime.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 10), null, null, null, 64, 2); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 0), Dyes.dyeBrown.getFluidDye(i, 36), new ItemStack(BioItemList.bw_glasses[0], 1, 11), null, null, null, 64, 2); - } - //and reverse recipes... cause im nice :P - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 1), new ItemStack[]{Materials.BorosilicateGlass.getDust(9), Materials.Nickel.getDust(36)}, null, 800, BW_Util.getMachineVoltageFromTier(3)); - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 2), new ItemStack[]{Materials.BorosilicateGlass.getDust(9), Materials.Nickel.getDust(36), Materials.Tungsten.getDust(9)}, null, 800, BW_Util.getMachineVoltageFromTier(5)); - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 3), new ItemStack[]{Materials.BorosilicateGlass.getDust(9), Materials.Nichrome.getDust(45), Materials.Tungsten.getDust(9)}, null, 800, BW_Util.getMachineVoltageFromTier(6)); - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 4), new ItemStack[]{Materials.BorosilicateGlass.getDust(9), Materials.Nichrome.getDust(45), Materials.Tungsten.getDust(9), Materials.Iridium.getDust(27)}, null, 800, BW_Util.getMachineVoltageFromTier(7)); - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, 5), new ItemStack[]{Materials.BorosilicateGlass.getDust(9), Materials.Nichrome.getDust(45), Materials.Tungsten.getDust(9), Materials.Osmiridium.getDust(36)}, null, 800, BW_Util.getMachineVoltageFromTier(8)); - - for (int i = 6; i < 11; i++) { - GT_Values.RA.addPulveriserRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, i), new ItemStack[]{Materials.BorosilicateGlass.getDust(9)}, null, 400, BW_Util.getMachineVoltageFromTier(1)); - GT_Values.RA.addChemicalBathRecipe(new ItemStack(BioItemList.bw_glasses[0], 1, i), Materials.Chlorine.getGas(50), new ItemStack(BioItemList.bw_glasses[0], 1, 0), null, null, null, 64, 2); - } - - } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java index 4646d850e0..1f41d225a9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java @@ -25,7 +25,7 @@ package com.github.bartimaeusnek.bartworks.common.loaders; import com.github.bartimaeusnek.bartworks.client.renderer.RendererGlasBlock; import com.github.bartimaeusnek.bartworks.client.renderer.RendererSwitchingColorFluid; import com.github.bartimaeusnek.bartworks.common.blocks.BioFluidBlock; -import com.github.bartimaeusnek.bartworks.common.tileentities.BWTileEntityDimIDBridge; +import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BWTileEntityDimIDBridge; import com.github.bartimaeusnek.bartworks.util.BW_Util; import com.github.bartimaeusnek.bartworks.util.BioCulture; import cpw.mods.fml.client.registry.RenderingRegistry; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java index 8d54f44d8a..095e679dc6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/GTNHBlocks.java @@ -66,7 +66,7 @@ public class GTNHBlocks implements Runnable { if (Loader.isModLoaded("TConstruct")) BioVatLogicAdder.BioVatGlass.addCustomGlass("TConstruct", "GlassBlock", 0, 3); if (Loader.isModLoaded("tectech")) - BioVatLogicAdder.BioVatGlass.addCustomGlass("tectech", "tile.quantumGlass", 0, 5); + BioVatLogicAdder.BioVatGlass.addCustomGlass("tectech", "tile.quantumGlass", 0, 8); if (Loader.isModLoaded("chisel")) BioVatLogicAdder.BioVatGlass.addCustomGlass("chisel", "glass2", 0, 3); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java index 4ca992e984..169655c4a5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java @@ -24,10 +24,17 @@ package com.github.bartimaeusnek.bartworks.common.loaders; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks; +import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks; import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.items.*; -import com.github.bartimaeusnek.bartworks.common.tileentities.*; +import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_DEHP; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaBlastFurnace; +import com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega.GT_TileEntity_MegaVacuumFreezer; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_AcidGenerator; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_Diode; +import com.github.bartimaeusnek.bartworks.common.tileentities.tiered.GT_MetaTileEntity_EnergyDistributor; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -53,33 +60,59 @@ public class ItemRegistry { public static final Item ROCKCUTTER_HV = new GT_Rockcutter_Item(3); public static final Item CIRCUIT_PROGRAMMER = new Circuit_Programmer(); public static final Block ROTORBLOCK = new BW_TileEntityContainer(Material.wood, BW_RotorBlock.class, "BWRotorBlock"); - public static final Item LEATHER_ROTOR = new BW_Stonage_Rotors(5, 0.15f, 15, 30, 2400, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorLeather.png"), "BW_LeatherRotor", "rotors/itemRotorLeather"); - public static final Item WOOL_ROTOR = new BW_Stonage_Rotors(7, 0.18f, 10, 20, 1600, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorWool.png"), "BW_WoolRotor", "rotors/itemRotorWool"); - public static final Item PAPER_ROTOR = new BW_Stonage_Rotors(9, 0.2f, 1, 10, 800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorPaper.png"), "BW_PaperRotor", "rotors/itemRotorPaper"); - public static final Item COMBINED_ROTOR = new BW_Stonage_Rotors(11, 0.22f, 1, 50, 5800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorCombined.png"), "BW_CombinedRotor", "rotors/itemRotorCombined"); - public static final Item CRAFTING_PARTS = new SimpleSubItemClass(new String[]{"grindstone_top", "grindstone_bottom", "completed_grindstone", "rotors/leatherParts", "rotors/woolParts", "rotors/paperParts", "rotors/combinedParts" }); + public static final Item LEATHER_ROTOR = new BW_Stonage_Rotors(5, 0.15f, 15, 30, 2400, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorLeather.png"), "BW_LeatherRotor", "rotors/itemRotorLeather"); + public static final Item WOOL_ROTOR = new BW_Stonage_Rotors(7, 0.18f, 10, 20, 1600, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorWool.png"), "BW_WoolRotor", "rotors/itemRotorWool"); + public static final Item PAPER_ROTOR = new BW_Stonage_Rotors(9, 0.2f, 1, 10, 800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorPaper.png"), "BW_PaperRotor", "rotors/itemRotorPaper"); + public static final Item COMBINED_ROTOR = new BW_Stonage_Rotors(11, 0.22f, 1, 50, 5800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.MOD_ID, "textures/items/rotors/rotorCombined.png"), "BW_CombinedRotor", "rotors/itemRotorCombined"); + public static final Item CRAFTING_PARTS = new SimpleSubItemClass(new String[]{"grindstone_top", "grindstone_bottom", "completed_grindstone", "rotors/leatherParts", "rotors/woolParts", "rotors/paperParts", "rotors/combinedParts"}); public static final Item TAB = new SimpleIconItem("GT2Coin"); public static final Item WINDMETER = new BW_SimpleWindMeter(); - public static ItemStack dehp; + + public static final Block[] bw_glasses = { + new BW_GlasBlocks( + "BW_GlasBlocks", + new String[]{ + MainMod.MOD_ID + ":BoronSilicateGlassBlock", + MainMod.MOD_ID + ":NickelReinforcedBoronSilicateGlassBlock", + MainMod.MOD_ID + ":TungstenReinforcedBoronSilicateGlassBlock", + MainMod.MOD_ID + ":ChromeReinforcedBoronSilicateGlassBlock", + MainMod.MOD_ID + ":IridiumReinforcedBoronSilicateGlassBlock", + MainMod.MOD_ID + ":OsmiumReinforcedBoronSilicateGlassBlock", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock1", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock2", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock3", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock4", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock5", + MainMod.MOD_ID + ":ColoredBoronSilicateGlassBlock6", + }, + new short[][]{Materials.BorosilicateGlass.getRGBA(), Materials.Nickel.getRGBA(), Materials.Tungsten.getRGBA(), Materials.Chrome.getRGBA(), Materials.Iridium.getRGBA(), Materials.Osmium.getRGBA(), new short[]{0xff, 0, 0}, new short[]{0, 0xff, 0}, new short[]{0x80, 0, 0xff}, new short[]{0xff, 0xff, 0}, new short[]{0, 0xff, 0x80}, new short[]{0x80, 0x33, 0}}, + MainMod.BIO_TAB, +