From ddd9040627f1fc7ace5cd7fd1af7e1a9720016bd Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 7 Feb 2023 10:08:13 +0000 Subject: Apply spotless --- src/main/java/client/ClientProxy.java | 2 + .../java/client/gui/Gui_ItemProxyEndpoint.java | 10 +- src/main/java/client/gui/Gui_ItemProxySource.java | 5 +- src/main/java/client/renderer/ConduitRenderer.java | 19 +- .../java/client/renderer/TESR_BeamTransmitter.java | 14 +- .../java/client/renderer/TESR_SECapacitor.java | 9 +- src/main/java/client/renderer/TESR_SETether.java | 7 +- src/main/java/common/Blocks.java | 32 +- src/main/java/common/CommonProxy.java | 8 +- src/main/java/common/Recipes.java | 891 ++++++++------------- src/main/java/common/Researches.java | 67 +- .../java/common/blocks/BaseGTUpdateableBlock.java | 8 +- .../java/common/blocks/Block_BeamTransmitter.java | 6 +- src/main/java/common/blocks/Block_ControlRod.java | 4 +- src/main/java/common/blocks/Block_GDCUnit.java | 4 +- src/main/java/common/blocks/Block_IchorJar.java | 68 +- .../java/common/blocks/Block_ItemProxyCable.java | 16 +- .../common/blocks/Block_ItemProxyEndpoint.java | 12 +- .../java/common/blocks/Block_ItemProxySource.java | 12 +- .../common/blocks/Block_LapotronicEnergyUnit.java | 18 +- .../java/common/blocks/Block_LargeHexPlate.java | 15 +- .../common/blocks/Block_ReactorChamber_OFF.java | 4 +- .../common/blocks/Block_ReactorChamber_ON.java | 4 +- .../java/common/blocks/Block_SpaceElevator.java | 8 +- .../blocks/Block_SpaceElevatorCapacitor.java | 12 +- .../common/blocks/Block_SpaceElevatorTether.java | 5 +- .../java/common/blocks/Block_TFFTStorageField.java | 23 +- .../common/blocks/Block_ThaumiumReinforcedJar.java | 68 +- src/main/java/common/blocks/Block_YSZUnit.java | 4 +- .../container/Container_ModularNuclearReactor.java | 7 +- .../java/common/itemBlocks/IB_ItemProxyCable.java | 3 +- .../common/itemBlocks/IB_ItemProxyEndpoint.java | 3 +- .../java/common/itemBlocks/IB_ItemProxySource.java | 3 +- .../common/itemBlocks/IB_LapotronicEnergyUnit.java | 87 +- .../java/common/itemBlocks/IB_SpaceElevator.java | 1 + .../itemBlocks/IB_SpaceElevatorCapacitor.java | 1 + .../common/itemBlocks/IB_TFFTStorageField.java | 19 +- src/main/java/common/items/ErrorItem.java | 7 +- .../common/items/MetaItem_CraftingComponent.java | 30 +- .../common/items/MetaItem_ReactorComponent.java | 16 +- .../common/reactorItem/AbstractReactorItem.java | 3 +- src/main/java/common/reactorItem/ReactorItem.java | 3 +- .../GTMTE_LapotronicSuperCapacitor.java | 602 +++++++------- .../tileentities/GTMTE_ModularNuclearReactor.java | 114 ++- .../common/tileentities/GTMTE_SOFuelCellMK1.java | 111 +-- .../common/tileentities/GTMTE_SOFuelCellMK2.java | 112 +-- .../common/tileentities/GTMTE_SpaceElevator.java | 106 ++- src/main/java/common/tileentities/GTMTE_TFFT.java | 229 +++--- .../java/common/tileentities/GTMTE_TFFTHatch.java | 46 +- .../common/tileentities/TE_BeamTransmitter.java | 6 +- .../common/tileentities/TE_ItemProxyCable.java | 33 +- .../common/tileentities/TE_ItemProxyEndpoint.java | 26 +- .../common/tileentities/TE_ItemProxySource.java | 3 +- .../tileentities/TE_SpaceElevatorCapacitor.java | 19 +- .../tileentities/TE_SpaceElevatorTether.java | 5 +- src/main/java/kekztech/GuiHandler.java | 8 +- src/main/java/kekztech/Items.java | 63 +- src/main/java/kekztech/KekzCore.java | 14 +- src/main/java/kekztech/ServerProxy.java | 3 +- src/main/java/reactor/items/CoolantCell.java | 4 +- src/main/java/reactor/items/FuelRod.java | 67 +- src/main/java/reactor/items/HeatExchanger.java | 9 +- src/main/java/reactor/items/HeatVent.java | 32 +- src/main/java/reactor/items/NeutronReflector.java | 4 +- src/main/java/util/Util.java | 4 +- 65 files changed, 1461 insertions(+), 1697 deletions(-) diff --git a/src/main/java/client/ClientProxy.java b/src/main/java/client/ClientProxy.java index 9eb07c62a4..1423e34963 100644 --- a/src/main/java/client/ClientProxy.java +++ b/src/main/java/client/ClientProxy.java @@ -3,10 +3,12 @@ package client; import client.renderer.TESR_BeamTransmitter; import client.renderer.TESR_SECapacitor; import client.renderer.TESR_SETether; + import common.CommonProxy; import common.tileentities.TE_BeamTransmitter; import common.tileentities.TE_SpaceElevatorCapacitor; import common.tileentities.TE_SpaceElevatorTether; + import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; diff --git a/src/main/java/client/gui/Gui_ItemProxyEndpoint.java b/src/main/java/client/gui/Gui_ItemProxyEndpoint.java index 4f80e5d7e3..2a673f16db 100644 --- a/src/main/java/client/gui/Gui_ItemProxyEndpoint.java +++ b/src/main/java/client/gui/Gui_ItemProxyEndpoint.java @@ -1,7 +1,7 @@ package client.gui; -import common.container.Container_ItemProxyEndpoint; import kekztech.KekzCore; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; @@ -10,12 +10,16 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import common.container.Container_ItemProxyEndpoint; + public class Gui_ItemProxyEndpoint extends GuiContainer { - private final ResourceLocation texture = - new ResourceLocation(KekzCore.MODID, "textures/gui/ItemTechReceiverNode.png"); + private final ResourceLocation texture = new ResourceLocation( + KekzCore.MODID, + "textures/gui/ItemTechReceiverNode.png"); private final InventoryPlayer inventory; private final IInventory te; diff --git a/src/main/java/client/gui/Gui_ItemProxySource.java b/src/main/java/client/gui/Gui_ItemProxySource.java index a4a4a5c38f..1c1b0171e6 100644 --- a/src/main/java/client/gui/Gui_ItemProxySource.java +++ b/src/main/java/client/gui/Gui_ItemProxySource.java @@ -1,7 +1,7 @@ package client.gui; -import common.container.Container_ItemProxySource; import kekztech.KekzCore; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; @@ -10,8 +10,11 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import common.container.Container_ItemProxySource; + public class Gui_ItemProxySource extends GuiContainer { private final ResourceLocation texture = new ResourceLocation(KekzCore.MODID, "textures/gui/ItemTech4by4.png"); diff --git a/src/main/java/client/renderer/ConduitRenderer.java b/src/main/java/client/renderer/ConduitRenderer.java index 1a653e8896..a9e3436bcc 100644 --- a/src/main/java/client/renderer/ConduitRenderer.java +++ b/src/main/java/client/renderer/ConduitRenderer.java @@ -1,14 +1,16 @@ package client.renderer; -import common.tileentities.TE_ItemProxyCable; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; +import common.tileentities.TE_ItemProxyCable; + +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; + public class ConduitRenderer implements ISimpleBlockRenderingHandler { public static final int RID = RenderingRegistry.getNextAvailableRenderId(); @@ -24,8 +26,8 @@ public class ConduitRenderer implements ISimpleBlockRenderingHandler { public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {} @Override - public boolean renderWorldBlock( - IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, + RenderBlocks renderer) { final TileEntity te = world.getTileEntity(x, y, z); if (te instanceof TE_ItemProxyCable) { final TE_ItemProxyCable cable = (TE_ItemProxyCable) te; @@ -69,7 +71,12 @@ public class ConduitRenderer implements ISimpleBlockRenderingHandler { } block.setBlockBounds( - xOffset, yOffset, zOffset, xOffset + xThickness, yOffset + yThickness, zOffset + zThickness); + xOffset, + yOffset, + zOffset, + xOffset + xThickness, + yOffset + yThickness, + zOffset + zThickness); renderer.setRenderBoundsFromBlock(block); } diff --git a/src/main/java/client/renderer/TESR_BeamTransmitter.java b/src/main/java/client/renderer/TESR_BeamTransmitter.java index 38e588dd43..0028c53476 100644 --- a/src/main/java/client/renderer/TESR_BeamTransmitter.java +++ b/src/main/java/client/renderer/TESR_BeamTransmitter.java @@ -1,19 +1,23 @@ package client.renderer; -import common.tileentities.TE_BeamTransmitter; import kekztech.KekzCore; + import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; +import common.tileentities.TE_BeamTransmitter; + public class TESR_BeamTransmitter extends TileEntitySpecialRenderer { - private static final ResourceLocation beamTexture = - new ResourceLocation(KekzCore.MODID, "textures/effects/Tether_beam.png"); + private static final ResourceLocation beamTexture = new ResourceLocation( + KekzCore.MODID, + "textures/effects/Tether_beam.png"); @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) { @@ -43,8 +47,8 @@ public class TESR_BeamTransmitter extends TileEntitySpecialRenderer { final double height = beamTransmitter.getDistanceFromTarget(); final double uv_x1 = 0.0D; final double uv_x2 = 1.0D; - final double uv_y1 = -1.0D - - streamTextureOffset; // This makes the beam stream upwards if you subtract a time sensitive number + final double uv_y1 = -1.0D - streamTextureOffset; // This makes the beam stream upwards if you subtract a time + // sensitive number // from it final double uv_y2 = height * (0.5D / (halfBeamWidth * 2)) + uv_y1; // Construct mesh with texture diff --git a/src/main/java/client/renderer/TESR_SECapacitor.java b/src/main/java/client/renderer/TESR_SECapacitor.java index 17f10ece83..c4aed65e3d 100644 --- a/src/main/java/client/renderer/TESR_SECapacitor.java +++ b/src/main/java/client/renderer/TESR_SECapacitor.java @@ -1,16 +1,19 @@ package client.renderer; -import common.tileentities.TE_SpaceElevatorCapacitor; import kekztech.KekzCore; + import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; +import common.tileentities.TE_SpaceElevatorCapacitor; + public class TESR_SECapacitor extends TileEntitySpecialRenderer { - private static final ResourceLocation capSide = - new ResourceLocation(KekzCore.MODID, "textures/blocks/SpaceElevatorCapacitor_side_renderbase.png"); + private static final ResourceLocation capSide = new ResourceLocation( + KekzCore.MODID, + "textures/blocks/SpaceElevatorCapacitor_side_renderbase.png"); @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) { diff --git a/src/main/java/client/renderer/TESR_SETether.java b/src/main/java/client/renderer/TESR_SETether.java index a59954ce3e..18672b21c9 100644 --- a/src/main/java/client/renderer/TESR_SETether.java +++ b/src/main/java/client/renderer/TESR_SETether.java @@ -1,17 +1,20 @@ package client.renderer; import kekztech.KekzCore; + import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; + import org.lwjgl.opengl.GL11; public class TESR_SETether extends TileEntitySpecialRenderer { - private static final ResourceLocation tetherBeamTexture = - new ResourceLocation(KekzCore.MODID, "textures/effects/Tether_beam.png"); + private static final ResourceLocation tetherBeamTexture = new ResourceLocation( + KekzCore.MODID, + "textures/effects/Tether_beam.png"); @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) { diff --git a/src/main/java/common/Blocks.java b/src/main/java/common/Blocks.java index 3bc8ddc9f9..16485925c2 100644 --- a/src/main/java/common/Blocks.java +++ b/src/main/java/common/Blocks.java @@ -1,9 +1,11 @@ package common; -import common.blocks.*; import kekztech.KekzCore; + import net.minecraft.block.Block; +import common.blocks.*; + public class Blocks { public static Block yszUnit; @@ -59,17 +61,13 @@ public class Blocks { tfftStorageField = Block_TFFTStorageField.registerBlock(); } - /*private static void registerBlocks_Nuclear() { - reactorChamberOFF = Block_ReactorChamber_OFF.registerBlock(); - reactorChamberON = Block_ReactorChamber_ON.registerBlock(); - reactorControlRod = Block_ControlRod.registerBlock(); - } - - private static void registerBlocks_ItemProxy() { - itemProxyCable = Block_ItemProxyCable.registerBlock(); - itemProxySource = Block_ItemProxySource.registerBlock(); - itemProxyEndpoint = Block_ItemProxyEndpoint.registerBlock(); - }*/ + /* + * private static void registerBlocks_Nuclear() { reactorChamberOFF = Block_ReactorChamber_OFF.registerBlock(); + * reactorChamberON = Block_ReactorChamber_ON.registerBlock(); reactorControlRod = Block_ControlRod.registerBlock(); + * } private static void registerBlocks_ItemProxy() { itemProxyCable = Block_ItemProxyCable.registerBlock(); + * itemProxySource = Block_ItemProxySource.registerBlock(); itemProxyEndpoint = + * Block_ItemProxyEndpoint.registerBlock(); } + */ private static void registerBlocks_Jars() { jarThaumiumReinforced = Block_ThaumiumReinforcedJar.registerBlock(); @@ -81,11 +79,11 @@ public class Blocks { // beamTransmitter = Block_BeamTransmitter.registerBlock(); } - /*private static void registerBlocks_SpaceElevator() { - spaceElevatorStructure = Block_SpaceElevator.registerBlock(); - spaceElevatorCapacitor = Block_SpaceElevatorCapacitor.registerBlock(); - spaceElevatorTether = Block_SpaceElevatorTether.registerBlock(); - }*/ + /* + * private static void registerBlocks_SpaceElevator() { spaceElevatorStructure = + * Block_SpaceElevator.registerBlock(); spaceElevatorCapacitor = Block_SpaceElevatorCapacitor.registerBlock(); + * spaceElevatorTether = Block_SpaceElevatorTether.registerBlock(); } + */ private static void registerBlocks_Cosmetics() { largeHexPlate = Block_LargeHexPlate.registerBlock(); diff --git a/src/main/java/common/CommonProxy.java b/src/main/java/common/CommonProxy.java index 464f8eab49..f04e7052c5 100644 --- a/src/main/java/common/CommonProxy.java +++ b/src/main/java/common/CommonProxy.java @@ -1,17 +1,19 @@ package common; +import kekztech.GuiHandler; +import kekztech.Items; +import kekztech.KekzCore; + import common.items.ErrorItem; import common.items.MetaItem_CraftingComponent; import common.items.MetaItem_ReactorComponent; import common.tileentities.GTMTE_TFFTHatch; + import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkRegistry; import gregtech.api.GregTech_API; -import kekztech.GuiHandler; -import kekztech.Items; -import kekztech.KekzCore; public class CommonProxy { diff --git a/src/main/java/common/Recipes.java b/src/main/java/common/Recipes.java index 12225b8580..f275d1d37a 100644 --- a/src/main/java/common/Recipes.java +++ b/src/main/java/common/Recipes.java @@ -1,23 +1,15 @@ package common; -import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.LuVTierEnhancer; -import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.technus.tectech.recipe.TT_recipeAdder; -import common.items.ErrorItem; -import common.items.MetaItem_CraftingComponent; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; import java.util.HashMap; + import kekztech.Items; import kekztech.KekzCore; + import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; + import thaumcraft.api.ItemApi; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; @@ -25,6 +17,19 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.InfusionRecipe; import util.Util; +import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.LuVTierEnhancer; +import com.github.bartimaeusnek.bartworks.util.BW_Util; +import com.github.technus.tectech.recipe.TT_recipeAdder; +import common.items.ErrorItem; +import common.items.MetaItem_CraftingComponent; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + public class Recipes { public static final HashMap infusionRecipes = new HashMap<>(); @@ -56,32 +61,20 @@ public class Recipes { private static void registerRecipes_TFFT() { // TFFT Controller - GT_ModHandler.addCraftingRecipe(TileEntities.tfft.getStackForm(1), new Object[] { - "ESE", - "FTF", - "CVC", - 'E', - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.EnderEye, 1), - 'S', - ItemList.Cover_Screen.get(1), - 'F', - ItemList.Field_Generator_LV.get(1), - 'T', - new ItemStack(Blocks.tfftStorageField, 1), - 'C', - "circuitData", - 'V', - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.VibrantAlloy, 1), - }); + GT_ModHandler.addCraftingRecipe( + TileEntities.tfft.getStackForm(1), + new Object[] { "ESE", "FTF", "CVC", 'E', + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.EnderEye, 1), 'S', + ItemList.Cover_Screen.get(1), 'F', ItemList.Field_Generator_LV.get(1), 'T', + new ItemStack(Blocks.tfftStorageField, 1), 'C', "circuitData", 'V', + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.VibrantAlloy, 1), }); // TFFT Casing GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DarkSteel, 3), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderPearl, 3), - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DarkSteel, 3), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderPearl, 3), }, Materials.Polytetrafluoroethylene.getMolten(144), new ItemStack(Blocks.tfftStorageField, 1), 100, @@ -89,12 +82,9 @@ public class Recipes { // TFFT Multi Hatch GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Hull_HV.get(1), - ItemList.Cover_FluidStorageMonitor.get(1), - ItemList.Field_Generator_LV.get(4), - GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Polytetrafluoroethylene, 25) - }, + new ItemStack[] { ItemList.Hull_HV.get(1), ItemList.Cover_FluidStorageMonitor.get(1), + ItemList.Field_Generator_LV.get(4), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Polytetrafluoroethylene, 25) }, Materials.Plastic.getMolten(432), TileEntities.tfftHatch.getStackForm(1), 400, @@ -102,13 +92,11 @@ public class Recipes { // TFFTStorageField1 GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CrudeSteel, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrudeSteel, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Steel, 3), - ItemList.FluidRegulator_LV.get(1) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CrudeSteel, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrudeSteel, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Steel, 3), + ItemList.FluidRegulator_LV.get(1) }, Materials.Glass.getMolten(144), new ItemStack(Blocks.tfftStorageField, 1, 1), 100, @@ -116,13 +104,10 @@ public class Recipes { // TFFTStorageField2 GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - ItemList.Casing_Tank_1.get(1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnergeticSilver, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Plastic, 3), - ItemList.FluidRegulator_MV.get(1) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), ItemList.Casing_Tank_1.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnergeticSilver, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Plastic, 3), + ItemList.FluidRegulator_MV.get(1) }, Materials.Plastic.getMolten(288), new ItemStack(Blocks.tfftStorageField, 1, 2), 200, @@ -130,14 +115,10 @@ public class Recipes { // TFFTStorageField3 GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - ItemList.Casing_Tank_3.get(1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.VividAlloy, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.StainlessSteel, 3), - ItemList.Field_Generator_LV.get(1), - ItemList.FluidRegulator_HV.get(1) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), ItemList.Casing_Tank_3.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.VividAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.StainlessSteel, 3), + ItemList.Field_Generator_LV.get(1), ItemList.FluidRegulator_HV.get(1) }, Materials.Plastic.getMolten(432), new ItemStack(Blocks.tfftStorageField, 1, 3), 400, @@ -145,14 +126,10 @@ public class Recipes { // TFFTStorageField4 GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - ItemList.Casing_Tank_5.get(1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Enderium, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Polytetrafluoroethylene, 3), - ItemList.Field_Generator_MV.get(2), - ItemList.FluidRegulator_EV.get(1) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), ItemList.Casing_Tank_5.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Enderium, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Polytetrafluoroethylene, 3), + ItemList.Field_Generator_MV.get(2), ItemList.FluidRegulator_EV.get(1) }, Materials.Epoxid.getMolten(864), new ItemStack(Blocks.tfftStorageField, 1, 4), 400, @@ -160,14 +137,10 @@ public class Recipes { // TFFTStorageField5 GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(6), - ItemList.Casing_Tank_7.get(1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrystallineAlloy, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Enderium, 3), - ItemList.Field_Generator_HV.get(4), - ItemList.FluidRegulator_IV.get(1) - }, + new ItemStack[] { GT_Utility.getIntegratedCircuit(6), ItemList.Casing_Tank_7.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CrystallineAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Enderium, 3), + ItemList.Field_Generator_HV.get(4), ItemList.FluidRegulator_IV.get(1) }, Materials.Epoxid.getMolten(1152), new ItemStack(Blocks.tfftStorageField, 1, 5), 400, @@ -177,17 +150,14 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.tfftStorageField, 1, 5), 40000, - new ItemStack[] { - ItemList.Casing_Tank_7.get(4), - GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.CrystallinePinkSlime, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Naquadah, 3), - GT_ModHandler.getModItem("dreamcraft", "item.ChromeBars", 6), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Quantium, 6), - ItemList.Field_Generator_EV.get(8), - ItemList.FluidRegulator_LuV.get(1), - GT_ModHandler.getModItem("dreamcraft", "item.EngineeringProcessorFluidEmeraldCore", 4) - }, - new FluidStack[] {Materials.Enderium.getMolten(1440), Materials.Polybenzimidazole.getMolten(1584)}, + new ItemStack[] { ItemList.Casing_Tank_7.get(4), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.CrystallinePinkSlime, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Naquadah, 3), + GT_ModHandler.getModItem("dreamcraft", "item.ChromeBars", 6), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Quantium, 6), + ItemList.Field_Generator_EV.get(8), ItemList.FluidRegulator_LuV.get(1), + GT_ModHandler.getModItem("dreamcraft", "item.EngineeringProcessorFluidEmeraldCore", 4) }, + new FluidStack[] { Materials.Enderium.getMolten(1440), Materials.Polybenzimidazole.getMolten(1584) }, new ItemStack(Blocks.tfftStorageField, 1, 6), 600, BW_Util.getMachineVoltageFromTier(6)); @@ -196,20 +166,16 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.tfftStorageField, 1, 6), 80000, - new ItemStack[] { - ItemList.Casing_Tank_10.get(16), - GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.MelodicAlloy, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.NetherStar, 3), - GT_ModHandler.getModItem("dreamcraft", "item.OsmiumBars", 6), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.MysteriousCrystal, 6), - ItemList.Field_Generator_IV.get(16), - ItemList.Field_Generator_LuV.get(4), - ItemList.FluidRegulator_UV.get(1), - GT_ModHandler.getModItem("dreamcraft", "item.EngineeringProcessorFluidEmeraldCore", 16) - }, - new FluidStack[] { - Materials.CrystallineAlloy.getMolten(2880), Materials.Polybenzimidazole.getMolten(2016) - }, + new ItemStack[] { ItemList.Casing_Tank_10.get(16), + GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.MelodicAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.NetherStar, 3), + GT_ModHandler.getModItem("dreamcraft", "item.OsmiumBars", 6), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.MysteriousCrystal, 6), + ItemList.Field_Generator_IV.get(16), ItemList.Field_Generator_LuV.get(4), + ItemList.FluidRegulator_UV.get(1), + GT_ModHandler.getModItem("dreamcraft", "item.EngineeringProcessorFluidEmeraldCore", 16) }, + new FluidStack[] { Materials.CrystallineAlloy.getMolten(2880), + Materials.Polybenzimidazole.getMolten(2016) }, new ItemStack(Blocks.tfftStorageField, 1, 7), 600, BW_Util.getMachineVoltageFromTier(8)); @@ -218,20 +184,18 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.tfftStorageField, 1, 7), 120000, - new ItemStack[] { - ItemList.Quantum_Tank_IV.get(1), - GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 1), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.StellarAlloy, 6), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.StellarAlloy, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.DraconiumAwakened, 3), - GT_ModHandler.getModItem("dreamcraft", "item.NeutroniumBars", 6), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.InfinityCatalyst, 6), - ItemList.Field_Generator_ZPM.get(16), - ItemList.Field_Generator_UV.get(4), - GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 2), - GT_ModHandler.getModItem("universalsingularities", "universal.tinkersConstruct.singularity", 1, 4) - }, - new FluidStack[] {Materials.CrystallinePinkSlime.getMolten(4320), new FluidStack(radoxPoly, 2880)}, + new ItemStack[] { ItemList.Quantum_Tank_IV.get(1), + GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 1), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.StellarAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.StellarAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.DraconiumAwakened, 3), + GT_ModHandler.getModItem("dreamcraft", "item.NeutroniumBars", 6), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.InfinityCatalyst, 6), + ItemList.Field_Generator_ZPM.get(16), ItemList.Field_Generator_UV.get(4), + GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 2), + GT_ModHandler + .getModItem("universalsingularities", "universal.tinkersConstruct.singularity", 1, 4) }, + new FluidStack[] { Materials.CrystallinePinkSlime.getMolten(4320), new FluidStack(radoxPoly, 2880) }, new ItemStack(Blocks.tfftStorageField, 1, 8), 600, BW_Util.getMachineVoltageFromTier(10)); @@ -240,20 +204,18 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.tfftStorageField, 1, 8), 160000, - new ItemStack[] { - ItemList.Quantum_Tank_IV.get(4), - GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 2), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.TranscendentMetal, 6), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.TranscendentMetal, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Infinity, 3), - ItemList.EnergisedTesseract.get(1), - GT_ModHandler.getModItem("miscutils", "itemRotorHypogen", 6), - ItemList.Field_Generator_UHV.get(16), - ItemList.Field_Generator_UEV.get(4), - GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 3), - GT_ModHandler.getModItem("universalsingularities", "universal.tinkersConstruct.singularity", 1, 4) - }, - new FluidStack[] {Materials.MelodicAlloy.getMolten(5760), new FluidStack(radoxPoly, 3456)}, + new ItemStack[] { ItemList.Quantum_Tank_IV.get(4), + GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 2), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.TranscendentMetal, 6), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.TranscendentMetal, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.Infinity, 3), + ItemList.EnergisedTesseract.get(1), + GT_ModHandler.getModItem("miscutils", "itemRotorHypogen", 6), + ItemList.Field_Generator_UHV.get(16), ItemList.Field_Generator_UEV.get(4), + GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 3), + GT_ModHandler + .getModItem("universalsingularities", "universal.tinkersConstruct.singularity", 1, 4) }, + new FluidStack[] { Materials.MelodicAlloy.getMolten(5760), new FluidStack(radoxPoly, 3456) }, new ItemStack(Blocks.tfftStorageField, 1, 9), 600, BW_Util.getMachineVoltageFromTier(12)); @@ -262,22 +224,19 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.tfftStorageField, 1, 9), 200000, - new ItemStack[] { - ItemList.Quantum_Tank_IV.get(16), - GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 4), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.SpaceTime, 6), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.SpaceTime, 6), - GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.SpaceTime, 3), - ItemList.EnergisedTesseract.get(6), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.SpaceTime, 6), - ItemList.Field_Generator_UEV.get(16), - ItemList.Field_Generator_UIV.get(4), - GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 4), - GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 4), - GT_ModHandler.getModItem("EnderIO", "itemBasicCapacitor", 64, 6), - GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1) - }, - new FluidStack[] {Materials.StellarAlloy.getMolten(7200), new FluidStack(radoxPoly, 4608)}, + new ItemStack[] { ItemList.Quantum_Tank_IV.get(16), + GT_ModHandler.getModItem("Avaritia", "Neutronium_Compressor", 4), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.SpaceTime, 6), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.SpaceTime, 6), + GT_OreDictUnificator.get(OrePrefixes.pipeNonuple, Materials.SpaceTime, 3), + ItemList.EnergisedTesseract.get(6), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.SpaceTime, 6), + ItemList.Field_Generator_UEV.get(16), ItemList.Field_Generator_UIV.get(4), + GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 4), + GT_ModHandler.getModItem("GoodGenerator", "huiCircuit", 4, 4), + GT_ModHandler.getModItem("EnderIO", "itemBasicCapacitor", 64, 6), + GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1) }, + new FluidStack[] { Materials.StellarAlloy.getMolten(7200), new FluidStack(radoxPoly, 4608) }, new ItemStack(Blocks.tfftStorageField, 1, 10), 600, BW_Util.getMachineVoltageFromTier(13)); @@ -350,68 +309,50 @@ public class Recipes { final MetaItem_CraftingComponent craftingItem = MetaItem_CraftingComponent.getInstance(); // Controller - final Object[] mk1_recipe = { - "CCC", - "PHP", - "FBL", - 'C', - OrePrefixes.circuit.get(Materials.Advanced), - 'P', - ItemList.Electric_Pump_HV.get(1L), - 'H', - ItemList.Hull_HV.get(1L), - 'F', - GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.StainlessSteel, 1), - 'B', - GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Gold, 1), - 'L', - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 1) - }; + final Object[] mk1_recipe = { "CCC", "PHP", "FBL", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', + ItemList.Electric_Pump_HV.get(1L), 'H', ItemList.Hull_HV.get(1L), 'F', + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.StainlessSteel, 1), 'B', + GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Gold, 1), 'L', + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 1) }; GT_ModHandler.addCraftingRecipe(TileEntities.sofc1.getStackForm(1), mk1_recipe); - final Object[] mk2_recipe = { - "CCC", - "PHP", - "FBL", - 'C', - OrePrefixes.circuit.get(Materials.Master), - 'P', - ItemList.Electric_Pump_IV.get(1L), - 'H', - ItemList.Hull_IV.get(1L), - 'F', - GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1), - 'B', - Util.getStackofAmountFromOreDict("wireGt04SuperconductorEV", 1), - 'L', - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1) - }; + final Object[] mk2_recipe = { "CCC", "PHP", "FBL", 'C', OrePrefixes.circuit.get(Materials.Master), 'P', + ItemList.Electric_Pump_IV.get(1L), 'H', ItemList.Hull_IV.get(1L), 'F', + GT_OreDictUnificator.get(OrePrefixes.pipeSmall, Materials.Ultimate, 1), 'B', + Util.getStackofAmountFromOreDict("wireGt04SuperconductorEV", 1), 'L', + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Ultimate, 1) }; GT_ModHandler.addCraftingRecipe(TileEntities.sofc2.getStackForm(1), mk2_recipe); // Blocks - final ItemStack[] yszUnit = { - GT_Utility.getIntegratedCircuit(6), - craftingItem.getStackOfAmountFromDamage(Items.YSZCeramicPlate.getMetaID(), 4), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Yttrium, 1), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1), - ItemList.Electric_Motor_HV.get(1L), - }; + final ItemStack[] yszUnit = { GT_Utility.getIntegratedCircuit(6), + craftingItem.getStackOfAmountFromDamage(Items.YSZCeramicPlate.getMetaID(), 4), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Yttrium, 1), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 1), + ItemList.Electric_Motor_HV.get(1L), }; GT_Values.RA.addAssemblerRecipe( - yszUnit, Materials.Hydrogen.getGas(4000), new ItemStack(Blocks.yszUnit, 1), 1200, 480); - final ItemStack[] gdcUnit = { - GT_Utility.getIntegratedCircuit(6), - craftingItem.getStackOfAmountFromDamage(Items.GDCCeramicPlate.getMetaID(), 8), - GT_OreDictUnificator.get( - OrePrefixes.frameGt, Materials.Gadolinium, new ItemStack(ErrorItem.getInstance(), 1), 1), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Desh, new ItemStack(ErrorItem.getInstance(), 1), 1), - ItemList.Electric_Motor_IV.get(1L), - }; + yszUnit, + Materials.Hydrogen.getGas(4000), + new ItemStack(Blocks.yszUnit, 1), + 1200, + 480); + final ItemStack[] gdcUnit = { GT_Utility.getIntegratedCircuit(6), + craftingItem.getStackOfAmountFromDamage(Items.GDCCeramicPlate.getMetaID(), 8), + GT_OreDictUnificator + .get(OrePrefixes.frameGt, Materials.Gadolinium, new ItemStack(ErrorItem.getInstance(), 1), 1), + GT_OreDictUnificator + .get(OrePrefixes.rotor, Materials.Desh, new ItemStack(ErrorItem.getInstance(), 1), 1), + ItemList.Electric_Motor_IV.get(1L), }; GT_Values.RA.addAssemblerRecipe( - gdcUnit, Materials.Hydrogen.getGas(16000), new ItemStack(Blocks.gdcUnit, 1), 2400, 1920); + gdcUnit, + Materials.Hydrogen.getGas(16000), + new ItemStack(Blocks.gdcUnit, 1), + 2400, + 1920); // Items GT_Values.RA.addAlloySmelterRecipe( craftingItem.getStackOfAmountFromDamage( - Items.YSZCeramicDust.getMetaID(), Loader.isModLoaded("bartworks") ? 3 : 10), + Items.YSZCeramicDust.getMetaID(), + Loader.isModLoaded("bartworks") ? 3 : 10), ItemList.Shape_Mold_Plate.get(0), craftingItem.getStackOfAmountFromDamage(Items.YSZCeramicPlate.getMetaID(), 1), 400, @@ -464,8 +405,8 @@ public class Recipes { 400, 96); GT_Values.RA.addMixerRecipe( - GT_OreDictUnificator.get( - OrePrefixes.dust, Materials.Gadolinium, new ItemStack(ErrorItem.getInstance(), 1), 1), + GT_OreDictUnificator + .get(OrePrefixes.dust, Materials.Gadolinium, new ItemStack(ErrorItem.getInstance(), 1), 1), craftingItem.getStackOfAmountFromDamage(Items.CeriaDust.getMetaID(), 9), GT_Utility.getIntegratedCircuit(6), null, @@ -476,106 +417,60 @@ public class Recipes { 1920); } - /*private static void registerRecipes_Nuclear() { - - final MetaItem_CraftingComponent craftingItem = MetaItem_CraftingComponent.getInstance(); - - // Controller - - // Blocks - final ItemStack[] controlrod = { - GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Lead, 1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 4), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64) - }; - GT_Values.RA.addAssemblerRecipe( - controlrod, - null, - new ItemStack(Blocks.reactorControlRod, 1), - 800, 480); - final ItemStack[] reactorchamber = { - GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Lead, 1), - GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Lead, 9), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.TungstenSteel, 18), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Steel, 2), - }; - GT_Values.RA.addAssemblerRecipe( - reactorchamber, - FluidRegistry.getFluidStack("wet.concrete", 144), - new ItemStack(Blocks.reactorChamberOFF, 1), - 1600, 480); - - // Items - GT_Values.RA.addMixerRecipe(Materials.Boron.getDust(1), Materials.Arsenic.getDust(1), GT_Utility.getIntegratedCircuit(6), null, - null, null, craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideDust.getMetaID(), 2), - 100, 1920); - GT_Values.RA.addChemicalRecipe( - Materials.Ammonia.getCells(2), - Materials.CarbonDioxide.getCells(1), - null, - null, - craftingItem.getStackOfAmountFromDamage(Items.AmineCarbamiteDust.getMetaID(), 1), - Util.getStackofAmountFromOreDict("cellEmpty", 3), - 400, 30); - GT_Values.RA.addChemicalRecipe( - craftingItem.getStackOfAmountFromDamage(Items.AmineCarbamiteDust.getMetaID(), 1), - Materials.Diamond.getDust(16), - Materials.CarbonDioxide.getGas(1000), - null, - craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondDust.getMetaID(), 1), - null, 1200, 480); - - GT_Values.RA.addAutoclaveRecipe( - craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondDust.getMetaID(), 4), - Materials.CarbonDioxide.getGas(16000), - craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondCrystal.getMetaID(), 1), 10000, 2400, 7680); - GT_Values.RA.addAutoclaveRecipe( - craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideDust.getMetaID(), 4), - Materials.Nitrogen.getGas(4000), - craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideCrystal.getMetaID(), 1), 10000, 2400, 1920); - - GT_Values.RA.addLatheRecipe( - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.AnnealedCopper, 1), - craftingItem.getStackFromDamage(Items.CopperHeatPipe.getMetaID()), - null, 120, 120); - GT_Values.RA.addLatheRecipe( - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Silver, 1), - craftingItem.getStackFromDamage(Items.SilverHeatPipe.getMetaID()), - null, 120, 480); - GT_Values.RA.addLatheRecipe( - craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideCrystal.getMetaID(), 4), - craftingItem.getStackFromDamage(Items.BoronArsenideHeatPipe.getMetaID()), - null, 1200, 1920); - GT_Values.RA.addLatheRecipe( - craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondCrystal.getMetaID(), 4), - craftingItem.getStackFromDamage(Items.DiamondHeatPipe.getMetaID()), - null, 1200, 7680); - }*/ + /* + * private static void registerRecipes_Nuclear() { final MetaItem_CraftingComponent craftingItem = + * MetaItem_CraftingComponent.getInstance(); // Controller // Blocks final ItemStack[] controlrod = { + * GT_Utility.getIntegratedCircuit(6), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Lead, 1), + * GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.dust, + * Materials.Carbon, 64) }; GT_Values.RA.addAssemblerRecipe( controlrod, null, new + * ItemStack(Blocks.reactorControlRod, 1), 800, 480); final ItemStack[] reactorchamber = { + * GT_Utility.getIntegratedCircuit(6), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Lead, 1), + * GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Lead, 9), GT_OreDictUnificator.get(OrePrefixes.ring, + * Materials.TungstenSteel, 18), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Steel, 2), }; + * GT_Values.RA.addAssemblerRecipe( reactorchamber, FluidRegistry.getFluidStack("wet.concrete", 144), new + * ItemStack(Blocks.reactorChamberOFF, 1), 1600, 480); // Items + * GT_Values.RA.addMixerRecipe(Materials.Boron.getDust(1), Materials.Arsenic.getDust(1), + * GT_Utility.getIntegratedCircuit(6), null, null, null, + * craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideDust.getMetaID(), 2), 100, 1920); + * GT_Values.RA.addChemicalRecipe( Materials.Ammonia.getCells(2), Materials.CarbonDioxide.getCells(1), null, null, + * craftingItem.getStackOfAmountFromDamage(Items.AmineCarbamiteDust.getMetaID(), 1), + * Util.getStackofAmountFromOreDict("cellEmpty", 3), 400, 30); GT_Values.RA.addChemicalRecipe( + * craftingItem.getStackOfAmountFromDamage(Items.AmineCarbamiteDust.getMetaID(), 1), Materials.Diamond.getDust(16), + * Materials.CarbonDioxide.getGas(1000), null, + * craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondDust.getMetaID(), 1), null, 1200, 480); + * GT_Values.RA.addAutoclaveRecipe( + * craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondDust.getMetaID(), 4), + * Materials.CarbonDioxide.getGas(16000), + * craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondCrystal.getMetaID(), 1), 10000, 2400, 7680); + * GT_Values.RA.addAutoclaveRecipe( craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideDust.getMetaID(), 4), + * Materials.Nitrogen.getGas(4000), craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideCrystal.getMetaID(), + * 1), 10000, 2400, 1920); GT_Values.RA.addLatheRecipe( GT_OreDictUnificator.get(OrePrefixes.stick, + * Materials.AnnealedCopper, 1), craftingItem.getStackFromDamage(Items.CopperHeatPipe.getMetaID()), null, 120, 120); + * GT_Values.RA.addLatheRecipe( GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Silver, 1), + * craftingItem.getStackFromDamage(Items.SilverHeatPipe.getMetaID()), null, 120, 480); GT_Values.RA.addLatheRecipe( + * craftingItem.getStackOfAmountFromDamage(Items.BoronArsenideCrystal.getMetaID(), 4), + * craftingItem.getStackFromDamage(Items.BoronArsenideHeatPipe.getMetaID()), null, 1200, 1920); + * GT_Values.RA.addLatheRecipe( + * craftingItem.getStackOfAmountFromDamage(Items.IsotopicallyPureDiamondCrystal.getMetaID(), 4), + * craftingItem.getStackFromDamage(Items.DiamondHeatPipe.getMetaID()), null, 1200, 7680); } + */ private static void registerRecipes_Jars() { // Thaumium Reinforced Jar final ItemStack[] recipe_jarthaumiumreinforced = { - GameRegistry.makeItemStack("Thaumcraft:ItemResource", 15, 1, null), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - }; - final AspectList aspects_jarthaumiumreinforced = new AspectList() - .add(Aspect.ARMOR, 64) - .add(Aspect.ORDER, 32) - .add(Aspect.WATER, 32) - .add(Aspect.GREED, 16) - .add(Aspect.VOID, 16) - .add(Aspect.AIR, 8); + GameRegistry.makeItemStack("Thaumcraft:ItemResource", 15, 1, null), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), }; + final AspectList aspects_jarthaumiumreinforced = new AspectList().add(Aspect.ARMOR, 64).add(Aspect.ORDER, 32) + .add(Aspect.WATER, 32).add(Aspect.GREED, 16).add(Aspect.VOID, 16).add(Aspect.AIR, 8); infusionRecipes.put( "THAUMIUMREINFORCEDJAR", ThaumcraftApi.addInfusionCraftingRecipe( @@ -587,16 +482,11 @@ public class Recipes { recipe_jarthaumiumreinforced)); // Thaumium Reinforced Void Jar final ItemStack[] recipe_voidjarupgrade = { - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Obsidian, 1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderEye, 1), - ItemApi.getItem("itemNugget", 5) - }; - final AspectList aspects_voidjarupgrade = new AspectList() - .add(Aspect.VOID, 14) - .add(Aspect.MAGIC, 14) - .add(Aspect.ENTROPY, 14) - .add(Aspect.WATER, 14); + GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Obsidian, 1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Blaze, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderEye, 1), ItemApi.getItem("itemNugget", 5) }; + final AspectList aspects_voidjarupgrade = new AspectList().add(Aspect.VOID, 14).add(Aspect.MAGIC, 14) + .add(Aspect.ENTROPY, 14).add(Aspect.WATER, 14); infusionRecipes.put( "THAUMIUMREINFORCEDVOIDJAR", ThaumcraftApi.addInfusionCraftingRecipe( @@ -607,27 +497,20 @@ public class Recipes { new ItemStack(Blocks.jarThaumiumReinforced, 1, 0), recipe_voidjarupgrade)); - final ItemStack[] recipe_jarichor = { - GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1, 0), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Diamond, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 1), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), - new ItemStack(net.minecraft.init.Blocks.glass_pane), - }; - final AspectList aspects_jarichor = new AspectList() - .add(Aspect.ARMOR, 256) - .add(Aspect.ELDRITCH, 128) - .add(Aspect.ORDER, 128) - .add(Aspect.WATER, 128) - .add(Aspect.GREED, 64) - .add(Aspect.VOID, 64) + final ItemStack[] recipe_jarichor = { GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 1, 0), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Diamond, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1), + new ItemStack(net.minecraft.init.Blocks.glass_pane), }; + final AspectList aspects_jarichor = new AspectList().add(Aspect.ARMOR, 256).add(Aspect.ELDRITCH, 128) + .add(Aspect.ORDER, 128).add(Aspect.WATER, 128).add(Aspect.GREED, 64).add(Aspect.VOID, 64) .add(Aspect.AIR, 32); infusionRecipes.put( "ICHORJAR", @@ -653,107 +536,56 @@ public class Recipes { private static void registerRecipes_LSC() { // Controller - final Object[] lsc_recipe = { - "LPL", - "CBC", - "LPL", - 'L', - ItemList.IC2_LapotronCrystal.getWithCharge(1L, 10000000), - 'P', - ItemList.Circuit_Chip_PIC.get(1L), - 'C', - OrePrefixes.circuit.get(Materials.Master), - 'B', - new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 0), - }; + final Object[] lsc_recipe = { "LPL", "CBC", "LPL", 'L', + ItemList.IC2_LapotronCrystal.getWithCharge(1L, 10000000), 'P', ItemList.Circuit_Chip_PIC.get(1L), 'C', + OrePrefixes.circuit.get(Materials.Master), 'B', new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 0), }; GT_ModHandler.addCraftingRecipe(TileEntities.lsc.getStackForm(1), lsc_recipe); // Blocks - final Object[] lcBase_recipe = { - "WBW", - "RLR", - "WBW", - 'W', - OrePrefixes.plate.get(Materials.Tantalum), - 'B', - OrePrefixes.frameGt.get(Materials.TungstenSteel), - 'R', - OrePrefixes.stickLong.get(Materials.TungstenSteel), - 'L', - OrePrefixes.block.get(Materials.Lapis) - }; + final Object[] lcBase_recipe = { "WBW", "RLR", "WBW", 'W', OrePrefixes.plate.get(Materials.Tantalum), 'B', + OrePrefixes.frameGt.get(Materials.TungstenSteel), 'R', + OrePrefixes.stickLong.get(Materials.TungstenSteel), 'L', OrePrefixes.block.get(Materials.Lapis) }; GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 0), lcBase_recipe); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tantalum, 4), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 2), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 2), - GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lapis, 1) - }, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tantalum, 4), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 2), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 2), + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Lapis, 1) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 0), 100, 480); // Empty Capacitor - final Object[] lcEmpty_recipe = { - "SLS", - "L L", - "SLS", - 'S', - OrePrefixes.screw.get(Materials.Lapis), - 'L', - OrePrefixes.plate.get(Materials.Lapis) - }; + final Object[] lcEmpty_recipe = { "SLS", "L L", "SLS", 'S', OrePrefixes.screw.get(Materials.Lapis), 'L', + OrePrefixes.plate.get(Materials.Lapis) }; GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), lcEmpty_recipe); // EV Capacitor - final Object[] lcEV_recipe = { - "SLS", - "LCL", - "SLS", - 'S', - OrePrefixes.screw.get(Materials.Lapis), - 'L', - OrePrefixes.plate.get(Materials.Lapis), - 'C', - GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W) - }; + final Object[] lcEV_recipe = { "SLS", "LCL", "SLS", 'S', OrePrefixes.screw.get(Materials.Lapis), 'L', + OrePrefixes.plate.get(Materials.Lapis), 'C', + GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W) }; GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 7), lcEV_recipe); // EV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), - GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W), - GT_Utility.getIntegratedCircuit(7) - }, + new ItemStack[] { new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), + GT_ModHandler.getIC2Item("lapotronCrystal", 1L, GT_Values.W), + GT_Utility.getIntegratedCircuit(7) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 7), 200, BW_Util.getMachineVoltageFromTier(3)); // IV Capacitor - final Object[] lcIV_recipe = { - "SLS", - "LOL", - "SLS", - 'S', - OrePrefixes.screw.get(Materials.Lapis), - 'L', - OrePrefixes.plate.get(Materials.Lapis), - 'O', - ItemList.Energy_LapotronicOrb.get(1L) - }; + final Object[] lcIV_recipe = { "SLS", "LOL", "SLS", 'S', OrePrefixes.screw.get(Materials.Lapis), 'L', + OrePrefixes.plate.get(Materials.Lapis), 'O', ItemList.Energy_LapotronicOrb.get(1L) }; GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 1), lcIV_recipe); // IV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), - ItemList.Energy_LapotronicOrb.get(1L), - GT_Utility.getIntegratedCircuit(1) - }, + new ItemStack[] { new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), + ItemList.Energy_LapotronicOrb.get(1L), GT_Utility.getIntegratedCircuit(1) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 1), 400, @@ -763,34 +595,27 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 1), 288000, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmiridium, 24), - ItemList.Circuit_Board_Elite.get(1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NaquadahAlloy, 64), - new Object[] {OrePrefixes.circuit.get(Materials.Master), 4}, - ItemList.Circuit_Parts_Crystal_Chip_Master.get(36), - ItemList.Circuit_Parts_Crystal_Chip_Master.get(36), - ItemList.Circuit_Chip_HPIC.get(64), - ItemList.Circuit_Parts_DiodeASMD.get(8), - ItemList.Circuit_Parts_CapacitorASMD.get(8), - ItemList.Circuit_Parts_ResistorASMD.get(8), - ItemList.Circuit_Parts_TransistorASMD.get(8), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 64) - }, - new FluidStack[] {new FluidStack(solderIndalloy, 720)}, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmiridium, 24), + ItemList.Circuit_Board_Elite.get(1), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NaquadahAlloy, 64), + new Object[] { OrePrefixes.circuit.get(Materials.Master), 4 }, + ItemList.Circuit_Parts_Crystal_Chip_Master.get(36), + ItemList.Circuit_Parts_Crystal_Chip_Master.get(36), ItemList.Circuit_Chip_HPIC.get(64), + ItemList.Circuit_Parts_DiodeASMD.get(8), ItemList.Circuit_Parts_CapacitorASMD.get(8), + ItemList.Circuit_Parts_ResistorASMD.get(8), ItemList.Circuit_Parts_TransistorASMD.get(8), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 64) }, + new FluidStack[] { new FluidStack(solderIndalloy, 720) }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 2), 1000, 80000); // LuV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Energy_LapotronicOrb2.get(1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmiridium, 24), - GT_Utility.getIntegratedCircuit(6) - }, + new ItemStack[] { ItemList.Energy_LapotronicOrb2.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmiridium, 24), + GT_Utility.getIntegratedCircuit(6) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 2), 800, @@ -801,36 +626,29 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 2), 288000, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 24), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 16L), - new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Ultimate), 1}, - ItemList.Energy_LapotronicOrb2.get(8L), - ItemList.Field_Generator_LuV.get(2), - ItemList.Circuit_Wafer_SoC2.get(64), - ItemList.Circuit_Wafer_SoC2.get(64), - ItemList.Circuit_Parts_DiodeASMD.get(8), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 32) - }, - new FluidStack[] { - new FluidStack(solderIndalloy, 2880), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) - }, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 24), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 16L), + new Object[] { OrePrefixes.circuit.get(Materials.Ultimate), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Ultimate), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Ultimate), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Ultimate), 1 }, + ItemList.Energy_LapotronicOrb2.get(8L), ItemList.Field_Generator_LuV.get(2), + ItemList.Circuit_Wafer_SoC2.get(64), ItemList.Circuit_Wafer_SoC2.get(64), + ItemList.Circuit_Parts_DiodeASMD.get(8), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 32) }, + new FluidStack[] { new FluidStack(solderIndalloy, 2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 3), 2000, 100000); // ZPM Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Energy_Module.get(1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 24), - GT_Utility.getIntegratedCircuit(6) - }, + new ItemStack[] { ItemList.Energy_Module.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 24), + GT_Utility.getIntegratedCircuit(6) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 3), 1600, @@ -840,36 +658,29 @@ public class Recipes { GT_Values.RA.addAssemblylineRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 3), 288000, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 24), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 32L), - new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Superconductor), 1}, - ItemList.Energy_Module.get(8L), - ItemList.Field_Generator_ZPM.get(2), - ItemList.Circuit_Wafer_HPIC.get(64), - ItemList.Circuit_Wafer_HPIC.get(64), - ItemList.Circuit_Parts_DiodeASMD.get(16), - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.NaquadahAlloy, 32) - }, - new FluidStack[] { - new FluidStack(solderIndalloy, 2880), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) - }, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 24), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 32L), + new Object[] { OrePrefixes.circuit.get(Materials.Superconductor), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Superconductor), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Superconductor), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Superconductor), 1 }, + ItemList.Energy_Module.get(8L), ItemList.Field_Generator_ZPM.get(2), + ItemList.Circuit_Wafer_HPIC.get(64), ItemList.Circuit_Wafer_HPIC.get(64), + ItemList.Circuit_Parts_DiodeASMD.get(16), + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.NaquadahAlloy, 32) }, + new FluidStack[] { new FluidStack(solderIndalloy, 2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 4), 2000, 200000); // UV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.Energy_Cluster.get(1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 24), - GT_Utility.getIntegratedCircuit(6) - }, + new ItemStack[] { ItemList.Energy_Cluster.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 24), + GT_Utility.getIntegratedCircuit(6) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 4), 3200, @@ -882,40 +693,30 @@ public class Recipes { 16, 300000, 3, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), - new Object[] {OrePrefixes.circuit.get(Materials.Bio), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Bio), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Bio), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Bio), 1}, - ItemList.ZPM2.get(8L), - ItemList.Field_Generator_UHV.get(4), - ItemList.Circuit_Wafer_UHPIC.get(64), - ItemList.Circuit_Wafer_UHPIC.get(64), - ItemList.Circuit_Wafer_SoC2.get(32), - ItemList.Circuit_Parts_DiodeASMD.get(64), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64) - }, - new FluidStack[] { - new FluidStack(solderUEV, 4608), - Materials.Naquadria.getMolten(9216), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 32000) - }, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), + new Object[] { OrePrefixes.circuit.get(Materials.Bio), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Bio), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Bio), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Bio), 1 }, ItemList.ZPM2.get(8L), + ItemList.Field_Generator_UHV.get(4), ItemList.Circuit_Wafer_UHPIC.get(64), + ItemList.Circuit_Wafer_UHPIC.get(64), ItemList.Circuit_Wafer_SoC2.get(32), + ItemList.Circuit_Parts_DiodeASMD.get(64), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64) }, + new FluidStack[] { new FluidStack(solderUEV, 4608), Materials.Naquadria.getMolten(9216), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 32000) }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 5), 4000, 1600000); // UHV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.ZPM3.get(1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), - GT_Utility.getIntegratedCircuit(6) - }, + new ItemStack[] { ItemList.ZPM3.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), + GT_Utility.getIntegratedCircuit(6) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 5), 6400, @@ -928,41 +729,30 @@ public class Recipes { 128, 8000000, 16, - new Object[] { - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), - new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, - new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, - ItemList.ZPM3.get(8L), - ItemList.Field_Generator_UEV.get(4), - ItemList.Circuit_Wafer_PPIC.get(64), - ItemList.Circuit_Wafer_PPIC.get(64), - ItemList.Circuit_Wafer_SoC2.get(64), - ItemList.Circuit_Parts_DiodeXSMD.get(64), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUEV, 64) - }, - new FluidStack[] { - new FluidStack(solderUEV, 9216), - Materials.Quantium.getMolten(18432), - Materials.Naquadria.getMolten(18432), - Materials.SuperCoolant.getFluid(64000) - }, + new Object[] { GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), + new Object[] { OrePrefixes.circuit.get(Materials.Optical), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Optical), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Optical), 1 }, + new Object[] { OrePrefixes.circuit.get(Materials.Optical), 1 }, ItemList.ZPM3.get(8L), + ItemList.Field_Generator_UEV.get(4), ItemList.Circuit_Wafer_PPIC.get(64), + ItemList.Circuit_Wafer_PPIC.get(64), ItemList.Circuit_Wafer_SoC2.get(64), + ItemList.Circuit_Parts_DiodeXSMD.get(64), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUEV, 64) }, + new FluidStack[] { new FluidStack(solderUEV, 9216), Materials.Quantium.getMolten(18432), + Materials.Naquadria.getMolten(18432), Materials.SuperCoolant.getFluid(64000) }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), 250 * 20, (int) TierEU.RECIPE_UEV); // UEV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { - ItemList.ZPM4.get(1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), - GT_Utility.getIntegratedCircuit(6) - }, + new ItemStack[] { ItemList.ZPM4.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + GT_Utility.getIntegratedCircuit(6) }, null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), 640 * 20, @@ -1013,40 +803,25 @@ public class Recipes { (int) TierEU.RECIPE_LV); } - /*private static void registerRecipes_SpaceElevator() { - // Controller - final Object[] se_recipe = { - "BCB", "CPC", "BCB", - 'B', new ItemStack(Blocks.spaceElevatorStructure, 1, 0), - 'C', OrePrefixes.cableGt16.get(Materials.Aluminium), - 'P', OrePrefixes.circuit.get(Materials.Master) - }; - GT_ModHandler.addCraftingRecipe(TileEntities.se.getStackForm(1), se_recipe); - // Blocks - final Object[] seBase_recipe = { - "DRD", "RCR", "DRD", - 'D', OrePrefixes.plate.get(Materials.DarkSteel), - 'R', OrePrefixes.stick.get(Materials.Steel), - 'C', OrePrefixes.block.get(Materials.Concrete), - }; - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.spaceElevatorStructure, 1, 0), seBase_recipe); - final Object[] seCoilHolder_recipe = { - "DRD", "RCR", "DRD", - 'D', OrePrefixes.plate.get(Materials.DarkSteel), - 'R', OrePrefixes.ring.get(Materials.Steel), - 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) - }; - GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.spaceElevatorStructure, 1, 1), seCoilHolder_recipe); - }*/ + /* + * private static void registerRecipes_SpaceElevator() { // Controller final Object[] se_recipe = { "BCB", "CPC", + * "BCB", 'B', new ItemStack(Blocks.spaceElevatorStructure, 1, 0), 'C', + * OrePrefixes.cableGt16.get(Materials.Aluminium), 'P', OrePrefixes.circuit.get(Materials.Master) }; + * GT_ModHandler.addCraftingRecipe(TileEntities.se.getStackForm(1), se_recipe); // Blocks final Object[] + * seBase_recipe = { "DRD", "RCR", "DRD", 'D', OrePrefixes.plate.get(Materials.DarkSteel), 'R', + * OrePrefixes.stick.get(Materials.Steel), 'C', OrePrefixes.block.get(Materials.Concrete), }; + * GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.spaceElevatorStructure, 1, 0), seBase_recipe); final + * Object[] seCoilHolder_recipe = { "DRD", "RCR", "DRD", 'D', OrePrefixes.plate.get(Materials.DarkSteel), 'R', + * OrePrefixes.ring.get(Materials.Steel), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) }; + * GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.spaceElevatorStructure, 1, 1), seCoilHolder_recipe); } + */ private static void registerRecipes_Cosmetics() { // Hex Tiles - final ItemStack[] hexTiles = { - GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.stone, Materials.Concrete, 1), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.DarkSteel, 2) - }; + final ItemStack[] hexTiles = { GT_Utility.getIntegratedCircuit(6), + GT_OreDictUnificator.get(OrePrefixes.stone, Materials.Concrete, 1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.DarkSteel, 2) }; GT_Values.RA.addAssemblerRecipe( hexTiles, FluidRegistry.getFluidStack("molten.plastic", 36), diff --git a/src/main/java/common/Researches.java b/src/main/java/common/Researches.java index 51d9341ff3..76f47bdd9d 100644 --- a/src/main/java/common/Researches.java +++ b/src/main/java/common/Researches.java @@ -1,7 +1,9 @@ package common; import kekztech.KekzCore; + import net.minecraft.item.ItemStack; + import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.research.ResearchItem; @@ -22,45 +24,40 @@ public class Researches { } public static void postInit() { - final AspectList aspects_jarthaumiumreinforced = new AspectList() - .add(Aspect.ARMOR, 3) - .add(Aspect.WATER, 3) - .add(Aspect.GREED, 3) - .add(Aspect.VOID, 3); + final AspectList aspects_jarthaumiumreinforced = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.WATER, 3) + .add(Aspect.GREED, 3).add(Aspect.VOID, 3); @SuppressWarnings("unused") final ResearchItem jar_thaumiumreinforced = new ResearchItem( - "THAUMIUMREINFORCEDJAR", - "ALCHEMY", - aspects_jarthaumiumreinforced, - 3, - -4, - 2, - new ItemStack(Blocks.jarThaumiumReinforced, 1)) - .setPages( - new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.0"), - new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDJAR")), - new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDVOIDJAR")), - new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.1")) - .setConcealed() - .setParents("JARLABEL") - .registerResearchItem(); + "THAUMIUMREINFORCEDJAR", + "ALCHEMY", + aspects_jarthaumiumreinforced, + 3, + -4, + 2, + new ItemStack(Blocks.jarThaumiumReinforced, 1)) + .setPages( + new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.0"), + new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDJAR")), + new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDVOIDJAR")), + new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.1")) + .setConcealed().setParents("JARLABEL").registerResearchItem(); - final AspectList aspects_jarichor = new AspectList() - .add(Aspect.ARMOR, 3) - .add(Aspect.ELDRITCH, 3) - .add(Aspect.WATER, 3) - .add(Aspect.GREED, 5) - .add(Aspect.VOID, 5); + final AspectList aspects_jarichor = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.ELDRITCH, 3) + .add(Aspect.WATER, 3).add(Aspect.GREED, 5).add(Aspect.VOID, 5); @SuppressWarnings("unused") final ResearchItem jar_ichor = new ResearchItem( - "ICHORJAR", "ALCHEMY", aspects_jarichor, 2, -5, 3, new ItemStack(Blocks.jarIchor, 1)) - .setPages( - new ResearchPage("kekztech.research_page.ICHORJAR.0"), - new ResearchPage(Recipes.infusionRecipes.get("ICHORJAR")), - new ResearchPage(Recipes.infusionRecipes.get("ICHORVOIDJAR"))) - .setConcealed() - .setParents("THAUMIUMREINFORCEDJAR") - .setParentsHidden("ICHOR") - .registerResearchItem(); + "ICHORJAR", + "ALCHEMY", + aspects_jarichor, + 2, + -5, + 3, + new ItemStack(Blocks.jarIchor, 1)) + .setPages( + new ResearchPage("kekztech.research_page.ICHORJAR.0"), + new ResearchPage(Recipes.infusionRecipes.get("ICHORJAR")), + new ResearchPage(Recipes.infusionRecipes.get("ICHORVOIDJAR"))) + .setConcealed().setParents("THAUMIUMREINFORCEDJAR").setParentsHidden("ICHOR") + .registerResearchItem(); } } diff --git a/src/main/java/common/blocks/BaseGTUpdateableBlock.java b/src/main/java/common/blocks/BaseGTUpdateableBlock.java index 77ee67469f..ef61327dd7 100644 --- a/src/main/java/common/blocks/BaseGTUpdateableBlock.java +++ b/src/main/java/common/blocks/BaseGTUpdateableBlock.java @@ -1,6 +1,5 @@ package common.blocks; -import gregtech.api.GregTech_API; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -8,10 +7,11 @@ import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import gregtech.api.GregTech_API; + /** - * Any blocks that are used as structure parts for GregTech multi machines - * have to inherit from this class. Otherwise the checkMachine() method - * that verifies a machine's structure won't be called correctly. + * Any blocks that are used as structure parts for GregTech multi machines have to inherit from this class. Otherwise + * the checkMachine() method that verifies a machine's structure won't be called correctly. */ public abstract class BaseGTUpdateableBlock extends Block { diff --git a/src/main/java/common/blocks/Block_BeamTransmitter.java b/src/main/java/common/blocks/Block_BeamTransmitter.java index be29bde3fd..9ed0233322 100644 --- a/src/main/java/common/blocks/Block_BeamTransmitter.java +++ b/src/main/java/common/blocks/Block_BeamTransmitter.java @@ -1,14 +1,16 @@ package common.blocks; -import common.tileentities.TE_BeamTransmitter; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import common.tileentities.TE_BeamTransmitter; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_BeamTransmitter extends Block { private static final Block_BeamTransmitter INSTANCE = new Block_BeamTransmitter(); diff --git a/src/main/java/common/blocks/Block_ControlRod.java b/src/main/java/common/blocks/Block_ControlRod.java index 9849816a2a..3cbd544d50 100644 --- a/src/main/java/common/blocks/Block_ControlRod.java +++ b/src/main/java/common/blocks/Block_ControlRod.java @@ -1,11 +1,13 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_ControlRod extends BaseGTUpdateableBlock { private static final Block_ControlRod instance = new Block_ControlRod(); diff --git a/src/main/java/common/blocks/Block_GDCUnit.java b/src/main/java/common/blocks/Block_GDCUnit.java index c86a55f200..ebf2714d61 100644 --- a/src/main/java/common/blocks/Block_GDCUnit.java +++ b/src/main/java/common/blocks/Block_GDCUnit.java @@ -1,11 +1,13 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_GDCUnit extends BaseGTUpdateableBlock { private static final Block_GDCUnit instance = new Block_GDCUnit(); diff --git a/src/main/java/common/blocks/Block_IchorJar.java b/src/main/java/common/blocks/Block_IchorJar.java index e7cf3c77eb..88449b7e98 100644 --- a/src/main/java/common/blocks/Block_IchorJar.java +++ b/src/main/java/common/blocks/Block_IchorJar.java @@ -1,14 +1,9 @@ package common.blocks; -import common.itemBlocks.IB_IchorJar; -import common.tileentities.TE_IchorJar; -import common.tileentities.TE_IchorVoidJar; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.Collections; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -19,6 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.Explosion; import net.minecraft.world.World; + import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.blocks.BlockJar; @@ -27,6 +23,14 @@ import thaumcraft.common.config.ConfigItems; import thaumcraft.common.items.ItemEssence; import thaumcraft.common.tiles.TileJarFillable; +import common.itemBlocks.IB_IchorJar; +import common.tileentities.TE_IchorJar; +import common.tileentities.TE_IchorVoidJar; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class Block_IchorJar extends BlockJar { private static final Block_IchorJar INSTANCE = new Block_IchorJar(); @@ -60,7 +64,7 @@ public class Block_IchorJar extends BlockJar { @Override @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { par3List.add(new ItemStack(par1, 1, 0)); // Normal jar par3List.add(new ItemStack(par1, 1, 3)); // Void jar @@ -76,8 +80,8 @@ public class Block_IchorJar extends BlockJar { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, float f3) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, + float f3) { // Call parent method to handle jar emptying, labels stuff etc super.onBlockActivated(world, x, y, z, player, side, f1, f2, f3); // Interact with Essentia Phials if the player holds one @@ -96,16 +100,12 @@ public class Block_IchorJar extends BlockJar { /** * Handle compatibility with Essentia Phials - * @param world - * Pass through from onBlockActivated() - * @param player - * Pass through from onBlockActivated() - * @param x - * Pass through from onBlockActivated() - * @param y - * Pass through from onBlockActivated() - * @param z - * Pass through from onBlockActivated() + * + * @param world Pass through from onBlockActivated() + * @param player Pass through from onBlockActivated() + * @param x Pass through from onBlockActivated() + * @param y Pass through from onBlockActivated() + * @param z Pass through from onBlockActivated() * @return Not sure tbh */ private boolean dealWithPhial(World world, EntityPlayer player, int x, int y, int z) { @@ -129,8 +129,13 @@ public class Block_IchorJar extends BlockJar { ((ItemEssence) ConfigItems.itemEssence).setAspects(filledPhial, phialContent); // Drop on ground if there's no inventory space if (!player.inventory.addItemStackToInventory(filledPhial)) { - world.spawnEntityInWorld(new EntityItem( - world, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, filledPhial)); + world.spawnEntityInWorld( + new EntityItem( + world, + (float) x + 0.5F, + (float) y + 0.5F, + (float) z + 0.5F, + filledPhial)); } world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); @@ -154,12 +159,13 @@ public class Block_IchorJar extends BlockJar { heldItem.stackSize--; // Drop on ground if there's no inventory space if (!player.inventory.addItemStackToInventory(new ItemStack(ConfigItems.itemEssence, 1, 0))) { - world.spawnEntityInWorld(new EntityItem( - world, - (float) x + 0.5F, - (float) y + 0.5F, - (float) z + 0.5F, - new ItemStack(ConfigItems.itemEssence, 1, 0))); + world.spawnEntityInWorld( + new EntityItem( + world, + (float) x + 0.5F, + (float) y + 0.5F, + (float) z + 0.5F, + new ItemStack(ConfigItems.itemEssence, 1, 0))); } world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); @@ -186,8 +192,8 @@ public class Block_IchorJar extends BlockJar { super.breakBlock(world, x, y, z, par5, par6); } - private void breakBlockWarpy( - World world, int x, int y, int z, int fillAmount, int iterations, float explosionStrength) { + private void breakBlockWarpy(World world, int x, int y, int z, int fillAmount, int iterations, + float explosionStrength) { if (fillAmount > 0) { // Create a decent explosion in the center of the block (TNT has strength 4.0F) world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, explosionStrength, false); @@ -220,8 +226,8 @@ public class Block_IchorJar extends BlockJar { } @Override - public void onBlockHarvested( - World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) {} + public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, + EntityPlayer par6EntityPlayer) {} @Override public boolean canDropFromExplosion(Explosion e) { diff --git a/src/main/java/common/blocks/Block_ItemProxyCable.java b/src/main/java/common/blocks/Block_ItemProxyCable.java index 57b5fc6138..e693117d9b 100644 --- a/src/main/java/common/blocks/Block_ItemProxyCable.java +++ b/src/main/java/common/blocks/Block_ItemProxyCable.java @@ -1,18 +1,22 @@ package common.blocks; -import client.renderer.ConduitRenderer; -import common.itemBlocks.IB_ItemProxyCable; -import common.tileentities.TE_ItemProxyCable; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import client.renderer.ConduitRenderer; + +import common.itemBlocks.IB_ItemProxyCable; +import common.tileentities.TE_ItemProxyCable; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class Block_ItemProxyCable extends Block { private static Block_ItemProxyCable instance = new Block_ItemProxyCable(); diff --git a/src/main/java/common/blocks/Block_ItemProxyEndpoint.java b/src/main/java/common/blocks/Block_ItemProxyEndpoint.java index 7c7712988d..41ae802b8e 100644 --- a/src/main/java/common/blocks/Block_ItemProxyEndpoint.java +++ b/src/main/java/common/blocks/Block_ItemProxyEndpoint.java @@ -1,10 +1,8 @@ package common.blocks; -import common.itemBlocks.IB_ItemProxyEndpoint; -import common.tileentities.TE_ItemProxyEndpoint; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.GuiHandler; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -12,6 +10,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import common.itemBlocks.IB_ItemProxyEndpoint; +import common.tileentities.TE_ItemProxyEndpoint; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_ItemProxyEndpoint extends Block { private static final Block_ItemProxyEndpoint instance = new Block_ItemProxyEndpoint(); @@ -34,8 +36,8 @@ public class Block_ItemProxyEndpoint extends Block { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, float lz) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, + float lz) { if (world.isRemote) { return true; } diff --git a/src/main/java/common/blocks/Block_ItemProxySource.java b/src/main/java/common/blocks/Block_ItemProxySource.java index cb3c95bec0..65e9d6b0ef 100644 --- a/src/main/java/common/blocks/Block_ItemProxySource.java +++ b/src/main/java/common/blocks/Block_ItemProxySource.java @@ -1,10 +1,8 @@ package common.blocks; -import common.itemBlocks.IB_ItemProxySource; -import common.tileentities.TE_ItemProxySource; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.GuiHandler; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -12,6 +10,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import common.itemBlocks.IB_ItemProxySource; +import common.tileentities.TE_ItemProxySource; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_ItemProxySource extends Block { private static final Block_ItemProxySource instance = new Block_ItemProxySource(); @@ -34,8 +36,8 @@ public class Block_ItemProxySource extends Block { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, float lz) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, + float lz) { if (world.isRemote) { return true; } diff --git a/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java b/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java index ff7e273a7b..2aff14cbf6 100644 --- a/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java +++ b/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java @@ -1,12 +1,7 @@ package common.blocks; -import common.itemBlocks.IB_LapotronicEnergyUnit; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -17,11 +12,20 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; +import common.itemBlocks.IB_LapotronicEnergyUnit; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Utility; + public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { private static final Block_LapotronicEnergyUnit INSTANCE = new Block_LapotronicEnergyUnit(); public enum IconBaseSide implements IIconContainer { + INSTANCE; @Override @@ -107,7 +111,7 @@ public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { } @Override - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { // Multi casing par3List.add(new ItemStack(par1, 1, 0)); diff --git a/src/main/java/common/blocks/Block_LargeHexPlate.java b/src/main/java/common/blocks/Block_LargeHexPlate.java index ab1ebc138e..9af1d22bc4 100644 --- a/src/main/java/common/blocks/Block_LargeHexPlate.java +++ b/src/main/java/common/blocks/Block_LargeHexPlate.java @@ -1,6 +1,5 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -8,6 +7,8 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_LargeHexPlate extends Block { private static final Block_LargeHexPlate INSTANCE = new Block_LargeHexPlate(); @@ -41,12 +42,12 @@ public class Block_LargeHexPlate extends Block { @Override public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { - final int xMod = - x >= 0 ? Math.abs(x % BATCH_SIZE) : Math.abs((Math.abs(x) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; - final int yMod = - y >= 0 ? Math.abs(y % BATCH_SIZE) : Math.abs((Math.abs(y) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; - final int zMod = - z >= 0 ? Math.abs(z % BATCH_SIZE) : Math.abs((Math.abs(z) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; + final int xMod = x >= 0 ? Math.abs(x % BATCH_SIZE) + : Math.abs((Math.abs(x) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; + final int yMod = y >= 0 ? Math.abs(y % BATCH_SIZE) + : Math.abs((Math.abs(y) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; + final int zMod = z >= 0 ? Math.abs(z % BATCH_SIZE) + : Math.abs((Math.abs(z) % BATCH_SIZE) - BATCH_SIZE) % BATCH_SIZE; if (side == 0 || side == 1) { return parts[xMod][zMod]; diff --git a/src/main/java/common/blocks/Block_ReactorChamber_OFF.java b/src/main/java/common/blocks/Block_ReactorChamber_OFF.java index 6f70534a4a..4e3cd89318 100644 --- a/src/main/java/common/blocks/Block_ReactorChamber_OFF.java +++ b/src/main/java/common/blocks/Block_ReactorChamber_OFF.java @@ -1,11 +1,13 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_ReactorChamber_OFF extends BaseGTUpdateableBlock { private static Block_ReactorChamber_OFF instance = new Block_ReactorChamber_OFF(); diff --git a/src/main/java/common/blocks/Block_ReactorChamber_ON.java b/src/main/java/common/blocks/Block_ReactorChamber_ON.java index 66a3452bea..bbdd4179c5 100644 --- a/src/main/java/common/blocks/Block_ReactorChamber_ON.java +++ b/src/main/java/common/blocks/Block_ReactorChamber_ON.java @@ -1,11 +1,13 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_ReactorChamber_ON extends BaseGTUpdateableBlock { private static Block_ReactorChamber_ON instance = new Block_ReactorChamber_ON(); diff --git a/src/main/java/common/blocks/Block_SpaceElevator.java b/src/main/java/common/blocks/Block_SpaceElevator.java index 0e9cec70d7..286735767a 100644 --- a/src/main/java/common/blocks/Block_SpaceElevator.java +++ b/src/main/java/common/blocks/Block_SpaceElevator.java @@ -1,8 +1,7 @@ package common.blocks; -import common.itemBlocks.IB_SpaceElevator; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -11,6 +10,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import common.itemBlocks.IB_SpaceElevator; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_SpaceElevator extends BaseGTUpdateableBlock { private static final Block_SpaceElevator INSTANCE = new Block_SpaceElevator(); @@ -42,7 +44,7 @@ public class Block_SpaceElevator extends BaseGTUpdateableBlock { } @Override - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { par3List.add(new ItemStack(par1, 1, 0)); par3List.add(new ItemStack(par1, 1, 1)); diff --git a/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java b/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java index 509c8a681d..b6816ba7e8 100644 --- a/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java +++ b/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java @@ -1,10 +1,5 @@ package common.blocks; -import common.itemBlocks.IB_SpaceElevatorCapacitor; -import common.tileentities.TE_SpaceElevatorCapacitor; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -14,6 +9,13 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import common.itemBlocks.IB_SpaceElevatorCapacitor; +import common.tileentities.TE_SpaceElevatorCapacitor; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class Block_SpaceElevatorCapacitor extends BaseGTUpdateableBlock { private static final Block_SpaceElevatorCapacitor INSTANCE = new Block_SpaceElevatorCapacitor(); diff --git a/src/main/java/common/blocks/Block_SpaceElevatorTether.java b/src/main/java/common/blocks/Block_SpaceElevatorTether.java index 67a4061d62..e7d8a2e6c1 100644 --- a/src/main/java/common/blocks/Block_SpaceElevatorTether.java +++ b/src/main/java/common/blocks/Block_SpaceElevatorTether.java @@ -1,7 +1,5 @@ package common.blocks; -import common.tileentities.TE_SpaceElevatorTether; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -10,6 +8,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import common.tileentities.TE_SpaceElevatorTether; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_SpaceElevatorTether extends BaseGTUpdateableBlock { private static final Block_SpaceElevatorTether INSTANCE = new Block_SpaceElevatorTether(); diff --git a/src/main/java/common/blocks/Block_TFFTStorageField.java b/src/main/java/common/blocks/Block_TFFTStorageField.java index 36439548af..e36f15b4c6 100644 --- a/src/main/java/common/blocks/Block_TFFTStorageField.java +++ b/src/main/java/common/blocks/Block_TFFTStorageField.java @@ -1,14 +1,9 @@ package common.blocks; -import common.itemBlocks.IB_TFFTStorageField; -import common.tileentities.GTMTE_TFFT; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; import java.util.List; + import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -19,6 +14,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; +import common.itemBlocks.IB_TFFTStorageField; +import common.tileentities.GTMTE_TFFT; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Utility; + public class Block_TFFTStorageField extends BaseGTUpdateableBlock { private static final Block_TFFTStorageField INSTANCE = new Block_TFFTStorageField(); @@ -26,6 +30,7 @@ public class Block_TFFTStorageField extends BaseGTUpdateableBlock { private static final IIcon[] textures = new IIcon[SUB_BLOCK_COUNT]; public enum TFFTCasingIcon implements IIconContainer { + INSTANCE; @Override @@ -48,7 +53,9 @@ public class Block_TFFTStorageField extends BaseGTUpdateableBlock { static { GT_Utility.addTexturePage((byte) 12); Textures.BlockIcons.setCasingTexture( - (byte) 12, (byte) 127, TextureFactory.of(Block_TFFTStorageField.TFFTCasingIcon.INSTANCE)); + (byte) 12, + (byte) 127, + TextureFactory.of(Block_TFFTStorageField.TFFTCasingIcon.INSTANCE)); } private Block_TFFTStorageField() { diff --git a/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java b/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java index 09a50f4b94..5ea0d7c072 100644 --- a/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java +++ b/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java @@ -1,13 +1,8 @@ package common.blocks; -import common.itemBlocks.IB_ThaumiumReinforcedJar; -import common.tileentities.TE_ThaumiumReinforcedJar; -import common.tileentities.TE_ThaumiumReinforcedVoidJar; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -19,6 +14,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.Explosion; import net.minecraft.world.World; + import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.blocks.BlockJar; @@ -27,6 +23,14 @@ import thaumcraft.common.config.ConfigItems; import thaumcraft.common.items.ItemEssence; import thaumcraft.common.tiles.TileJarFillable; +import common.itemBlocks.IB_ThaumiumReinforcedJar; +import common.tileentities.TE_ThaumiumReinforcedJar; +import common.tileentities.TE_ThaumiumReinforcedVoidJar; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class Block_ThaumiumReinforcedJar extends BlockJar { private static final Block_ThaumiumReinforcedJar INSTANCE = new Block_ThaumiumReinforcedJar(); @@ -60,7 +64,7 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { @Override @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { par3List.add(new ItemStack(par1, 1, 0)); // Normal jar par3List.add(new ItemStack(par1, 1, 3)); // Void jar @@ -88,8 +92,8 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { super.breakBlock(world, x, y, z, par5, par6); } - private void breakBlockWarpy( - World world, int x, int y, int z, int fillAmount, int iterations, float explosionStrength) { + private void breakBlockWarpy(World world, int x, int y, int z, int fillAmount, int iterations, + float explosionStrength) { if (fillAmount > 0) { // Create a decent explosion in the center of the block (TNT has strength 4.0F) world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, explosionStrength, false); @@ -117,8 +121,8 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { } @Override - public boolean onBlockActivated( - World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, float f3) { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, + float f3) { // Call parent method to handle jar emptying, labels stuff etc super.onBlockActivated(world, x, y, z, player, side, f1, f2, f3); // Interact with Essentia Phials if the player holds one @@ -137,16 +141,12 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { /** * Handle compatibility with Essentia Phials - * @param world - * Pass through from onBlockActivated() - * @param player - * Pass through from onBlockActivated() - * @param x - * Pass through from onBlockActivated() - * @param y - * Pass through from onBlockActivated() - * @param z - * Pass through from onBlockActivated() + * + * @param world Pass through from onBlockActivated() + * @param player Pass through from onBlockActivated() + * @param x Pass through from onBlockActivated() + * @param y Pass through from onBlockActivated() + * @param z Pass through from onBlockActivated() * @return Not sure tbh */ private boolean dealWithPhial(World world, EntityPlayer player, int x, int y, int z) { @@ -170,8 +170,13 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { ((ItemEssence) ConfigItems.itemEssence).setAspects(filledPhial, phialContent); // Drop on ground if there's no inventory space if (!player.inventory.addItemStackToInventory(filledPhial)) { - world.spawnEntityInWorld(new EntityItem( - world, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, filledPhial)); + world.spawnEntityInWorld( + new EntityItem( + world, + (float) x + 0.5F, + (float) y + 0.5F, + (float) z + 0.5F, + filledPhial)); } world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); @@ -195,12 +200,13 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { heldItem.stackSize--; // Drop on ground if there's no inventory space if (!player.inventory.addItemStackToInventory(new ItemStack(ConfigItems.itemEssence, 1, 0))) { - world.spawnEntityInWorld(new EntityItem( - world, - (float) x + 0.5F, - (float) y + 0.5F, - (float) z + 0.5F, - new ItemStack(ConfigItems.itemEssence, 1, 0))); + world.spawnEntityInWorld( + new EntityItem( + world, + (float) x + 0.5F, + (float) y + 0.5F, + (float) z + 0.5F, + new ItemStack(ConfigItems.itemEssence, 1, 0))); } world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); @@ -242,8 +248,8 @@ public class Block_ThaumiumReinforcedJar extends BlockJar { } @Override - public void onBlockHarvested( - World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) {} + public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, + EntityPlayer par6EntityPlayer) {} @Override public boolean canDropFromExplosion(Explosion e) { diff --git a/src/main/java/common/blocks/Block_YSZUnit.java b/src/main/java/common/blocks/Block_YSZUnit.java index dcfc3a3d09..a02bda9fb3 100644 --- a/src/main/java/common/blocks/Block_YSZUnit.java +++ b/src/main/java/common/blocks/Block_YSZUnit.java @@ -1,11 +1,13 @@ package common.blocks; -import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; +import cpw.mods.fml.common.registry.GameRegistry; + public class Block_YSZUnit extends BaseGTUpdateableBlock { private static Block_YSZUnit instance = new Block_YSZUnit(); diff --git a/src/main/java/common/container/Container_ModularNuclearReactor.java b/src/main/java/common/container/Container_ModularNuclearReactor.java index da96a0b24b..5596e88261 100644 --- a/src/main/java/common/container/Container_ModularNuclearReactor.java +++ b/src/main/java/common/container/Container_ModularNuclearReactor.java @@ -1,11 +1,12 @@ package common.container; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; + import reactor.ButtonSlot; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; public class Container_ModularNuclearReactor extends Container { @@ -23,8 +24,8 @@ public class Container_ModularNuclearReactor extends Container { // Add the reactor chamber for (int x = 0; x < 9; x++) { for (int y = 0; y < 6; y++) { - REACTOR_SLOTS[nextSlotID] = - super.addSlotToContainer(new Slot(te, getNextSlotID(), (16 + 67 * x), (16 + 67 * y))); + REACTOR_SLOTS[nextSlotID] = super.addSlotToContainer( + new Slot(te, getNextSlotID(), (16 + 67 * x), (16 + 67 * y))); } } // Add the configuration slot diff --git a/src/main/java/common/itemBlocks/IB_ItemProxyCable.java b/src/main/java/common/itemBlocks/IB_ItemProxyCable.java index ed73b2ce15..6022194225 100644 --- a/src/main/java/common/itemBlocks/IB_ItemProxyCable.java +++ b/src/main/java/common/itemBlocks/IB_ItemProxyCable.java @@ -1,6 +1,7 @@ package common.itemBlocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -13,7 +14,7 @@ public class IB_ItemProxyCable extends ItemBlock { super(block); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { lines.add(StatCollector.translateToLocal("tile.kekztech_itemproxycable_block.0.desc")); diff --git a/src/main/java/common/itemBlocks/IB_ItemProxyEndpoint.java b/src/main/java/common/itemBlocks/IB_ItemProxyEndpoint.java index db4b41f53d..2cde2c14d3 100644 --- a/src/main/java/common/itemBlocks/IB_ItemProxyEndpoint.java +++ b/src/main/java/common/itemBlocks/IB_ItemProxyEndpoint.java @@ -1,6 +1,7 @@ package common.itemBlocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -13,7 +14,7 @@ public class IB_ItemProxyEndpoint extends ItemBlock { super(block); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { lines.add(StatCollector.translateToLocal("tile.kekztech_itemproxyendpoint_block.0.desc")); diff --git a/src/main/java/common/itemBlocks/IB_ItemProxySource.java b/src/main/java/common/itemBlocks/IB_ItemProxySource.java index 7150336727..42371ab6e6 100644 --- a/src/main/java/common/itemBlocks/IB_ItemProxySource.java +++ b/src/main/java/common/itemBlocks/IB_ItemProxySource.java @@ -1,6 +1,7 @@ package common.itemBlocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -13,7 +14,7 @@ public class IB_ItemProxySource extends ItemBlock { super(block); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { lines.add(StatCollector.translateToLocal("tile:kekztech_itemproxysource_block.0.desc")); diff --git a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java index 8414b34006..c66e6a40de 100644 --- a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java +++ b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java @@ -2,10 +2,9 @@ package common.itemBlocks; import static com.google.common.math.LongMath.pow; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Utility; import java.math.BigInteger; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -13,6 +12,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; + public class IB_LapotronicEnergyUnit extends ItemBlock { public IB_LapotronicEnergyUnit(Block block) { @@ -41,15 +43,15 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { public static BigInteger LSC_wireless_eu_cap = BigInteger.valueOf(60 * pow(10, 12)); // 10 Billion EU/t - private static BigInteger UHV_cap_eu_per_tick = - LSC_wireless_eu_cap.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); + private static BigInteger UHV_cap_eu_per_tick = LSC_wireless_eu_cap + .divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); // 6 Quadrillion EU. public static BigInteger UEV_wireless_eu_cap = BigInteger.valueOf(100 * 60 * pow(10, 12)); // 1 Trillion EU/t - private static BigInteger UEV_cap_eu_per_tick = - UEV_wireless_eu_cap.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); + private static BigInteger UEV_cap_eu_per_tick = UEV_wireless_eu_cap + .divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); public static long EV_cap_storage = 60_000_000L; public static long IV_cap_storage = 600_000_000L; @@ -65,41 +67,74 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { lines.add(StatCollector.translateToLocal("tile.kekztech_lapotronicenergyunit_block.desc")); switch (stack.getItemDamage()) { case 1: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(IV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(IV_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); break; case 2: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(LuV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(LuV_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); break; case 3: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(ZPM_cap_storage) - + EnumChatFormatting.GRAY + "EU"); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(ZPM_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); break; case 4: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UV_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); break; case 5: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UHV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); - lines.add("Supports up to " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UHV_cap_eu_per_tick) - + EnumChatFormatting.GRAY + "EU/t of wireless transfer per " + GT_Values.TIER_COLORS[9] - + GT_Values.VN[9] + EnumChatFormatting.GRAY + " capacitor."); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UHV_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); + lines.add( + "Supports up to " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UHV_cap_eu_per_tick) + + EnumChatFormatting.GRAY + + "EU/t of wireless transfer per " + + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.GRAY + + " capacitor."); break; case 6: lines.add("Capacity: None"); break; case 7: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(EV_cap_storage) - + EnumChatFormatting.GRAY + " EU"); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(EV_cap_storage) + + EnumChatFormatting.GRAY + + " EU"); break; case 8: - lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); - lines.add("Supports up to " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_cap_eu_per_tick) - + EnumChatFormatting.GRAY + "EU/t of wireless transfer per " + GT_Values.TIER_COLORS[10] - + GT_Values.VN[10] + EnumChatFormatting.GRAY + " capacitor."); + lines.add( + "Capacity: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UEV_cap_storage) + + EnumChatFormatting.GRAY + + "EU"); + lines.add( + "Supports up to " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UEV_cap_eu_per_tick) + + EnumChatFormatting.GRAY + + "EU/t of wireless transfer per " + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.GRAY + + " capacitor."); break; } } diff --git a/src/main/java/common/itemBlocks/IB_SpaceElevator.java b/src/main/java/common/itemBlocks/IB_SpaceElevator.java index 5ac22e6875..8b7668207b 100644 --- a/src/main/java/common/itemBlocks/IB_SpaceElevator.java +++ b/src/main/java/common/itemBlocks/IB_SpaceElevator.java @@ -1,6 +1,7 @@ package common.itemBlocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; diff --git a/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java b/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java index 5e3e87f277..fc367ae6a5 100644 --- a/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java +++ b/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java @@ -1,6 +1,7 @@ package common.itemBlocks; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; diff --git a/src/main/java/common/itemBlocks/IB_TFFTStorageField.java b/src/main/java/common/itemBlocks/IB_TFFTStorageField.java index 8e75a881f2..5c54c6a750 100644 --- a/src/main/java/common/itemBlocks/IB_TFFTStorageField.java +++ b/src/main/java/common/itemBlocks/IB_TFFTStorageField.java @@ -1,8 +1,8 @@ package common.itemBlocks; -import common.tileentities.GTMTE_TFFT; import java.text.NumberFormat; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -10,6 +10,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import common.tileentities.GTMTE_TFFT; + public class IB_TFFTStorageField extends ItemBlock { public IB_TFFTStorageField(Block block) { @@ -37,11 +39,16 @@ public class IB_TFFTStorageField extends ItemBlock { int meta = stack.getItemDamage(); if (meta > 0) { lines.add(StatCollector.translateToLocal("tile.kekztech_tfftstoragefield_block.desc")); - lines.add("Capacity: " + EnumChatFormatting.BLUE - + NumberFormat.getNumberInstance().format(GTMTE_TFFT.Field.VALUES[meta - 1].getCapacity()) - + EnumChatFormatting.GRAY + " L"); - lines.add("Power Draw: " + EnumChatFormatting.BLUE + GTMTE_TFFT.Field.VALUES[meta - 1].getCost() - + EnumChatFormatting.GRAY + " EU/t"); + lines.add( + "Capacity: " + EnumChatFormatting.BLUE + + NumberFormat.getNumberInstance().format(GTMTE_TFFT.Field.VALUES[meta - 1].getCapacity()) + + EnumChatFormatting.GRAY + + " L"); + lines.add( + "Power Draw: " + EnumChatFormatting.BLUE + + GTMTE_TFFT.Field.VALUES[meta - 1].getCost() + + EnumChatFormatting.GRAY + + " EU/t"); } } } diff --git a/src/main/java/common/items/ErrorItem.java b/src/main/java/common/items/ErrorItem.java index fb6e4d3c72..6558ababb4 100644 --- a/src/main/java/common/items/ErrorItem.java +++ b/src/main/java/common/items/ErrorItem.java @@ -1,14 +1,17 @@ package common.items; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.List; + import kekztech.KekzCore; + import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import cpw.mods.fml.common.registry.GameRegistry; + public class ErrorItem extends Item { private static final ErrorItem INSTANCE = new ErrorItem(); @@ -29,7 +32,7 @@ public class ErrorItem extends Item { GameRegistry.registerItem(getInstance(), unlocalizedName); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) { list.add("REMINDER: KekzTech recipes are only tested to work in GTNH!"); diff --git a/src/main/java/common/items/MetaItem_CraftingComponent.java b/src/main/java/common/items/MetaItem_CraftingComponent.java index 31c3d797ea..96368a5be0 100644 --- a/src/main/java/common/items/MetaItem_CraftingComponent.java +++ b/src/main/java/common/items/MetaItem_CraftingComponent.java @@ -1,8 +1,9 @@ package common.items; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.List; + import kekztech.KekzCore; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -10,6 +11,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import cpw.mods.fml.common.registry.GameRegistry; + public class MetaItem_CraftingComponent extends Item { private static final MetaItem_CraftingComponent INSTANCE = new MetaItem_CraftingComponent(); @@ -34,17 +37,16 @@ public class MetaItem_CraftingComponent extends Item { public void registerIcons(IIconRegister reg) { int counter = 9; // Raw heat pipes - /*icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "CopperHeatPipe"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "SilverHeatPipe"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "BoronArsenideHeatPipe"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "DiamondHeatPipe"); - // Dust - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "BoronArsenideDust"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "IsotopicallyPureDiamondDust"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "AmineCarbamateDust"); - // Crystal - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "BoronArsenideCrystal"); - icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "IsotopicallyPureDiamondCrystal");*/ + /* + * icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "CopperHeatPipe"); icons[counter++] = + * reg.registerIcon(KekzCore.MODID + ":" + "SilverHeatPipe"); icons[counter++] = reg.registerIcon(KekzCore.MODID + * + ":" + "BoronArsenideHeatPipe"); icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + + * "DiamondHeatPipe"); // Dust icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "BoronArsenideDust"); + * icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "IsotopicallyPureDiamondDust"); icons[counter++] = + * reg.registerIcon(KekzCore.MODID + ":" + "AmineCarbamateDust"); // Crystal icons[counter++] = + * reg.registerIcon(KekzCore.MODID + ":" + "BoronArsenideCrystal"); icons[counter++] = + * reg.registerIcon(KekzCore.MODID + ":" + "IsotopicallyPureDiamondCrystal"); + */ // Ceramics icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "YSZCeramicDust"); icons[counter++] = reg.registerIcon(KekzCore.MODID + ":" + "GDCCeramicDust"); @@ -60,7 +62,7 @@ public class MetaItem_CraftingComponent extends Item { return icons[meta]; } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void getSubItems(Item item, CreativeTabs tab, List list) { for (int i = 9; i < icons.length; i++) { @@ -73,7 +75,7 @@ public class MetaItem_CraftingComponent extends Item { return super.getUnlocalizedName() + "." + stack.getItemDamage(); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) { list.add("Crafting component for KekzTech things"); diff --git a/src/main/java/common/items/MetaItem_ReactorComponent.java b/src/main/java/common/items/MetaItem_ReactorComponent.java index ff1520b586..11955a1d34 100644 --- a/src/main/java/common/items/MetaItem_ReactorComponent.java +++ b/src/main/java/common/items/MetaItem_ReactorComponent.java @@ -1,7 +1,9 @@ package common.items; import java.util.List; + import kekztech.KekzCore; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -10,7 +12,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; + import org.lwjgl.input.Keyboard; + import reactor.items.CoolantCell; import reactor.items.FuelRod; import reactor.items.HeatExchanger; @@ -65,7 +69,7 @@ public class MetaItem_ReactorComponent extends Item { return icons[meta]; } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void getSubItems(Item item, CreativeTabs tab, List list) { for (int i = 0; i < icons.length; i++) { @@ -78,15 +82,19 @@ public class MetaItem_ReactorComponent extends Item { return super.getUnlocalizedName() + "." + stack.getItemDamage(); } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) { if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { list.add("Property = 1"); } else { list.add("Part for the Modular Nuclear Reactor"); - list.add("Hold " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY - + " to display properties"); + list.add( + "Hold " + EnumChatFormatting.BOLD + + "[LSHIFT]" + + EnumChatFormatting.RESET + + EnumChatFormatting.GRAY + + " to display properties"); } } diff --git a/src/main/java/common/reactorItem/AbstractReactorItem.java b/src/main/java/common/reactorItem/AbstractReactorItem.java index 0d02de40f1..876d8b4811 100644 --- a/src/main/java/common/reactorItem/AbstractReactorItem.java +++ b/src/main/java/common/reactorItem/AbstractReactorItem.java @@ -19,8 +19,7 @@ public abstract class AbstractReactorItem extends Item { @Override public final String getUnlocalizedName(ItemStack stack) { - return super.hasSubtypes - ? (super.getUnlocalizedName() + "." + stack.getItemDamage()) + return super.hasSubtypes ? (super.getUnlocalizedName() + "." + stack.getItemDamage()) : super.getUnlocalizedName(); } diff --git a/src/main/java/common/reactorItem/ReactorItem.java b/src/main/java/common/reactorItem/ReactorItem.java index 3d1c8ade32..8e69e40e95 100644 --- a/src/main/java/common/reactorItem/ReactorItem.java +++ b/src/main/java/common/reactorItem/ReactorItem.java @@ -1,11 +1,12 @@ package common.reactorItem; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import cpw.mods.fml.common.registry.GameRegistry; + public class ReactorItem extends AbstractReactorItem { private static final ReactorItem INSTANCE = new ReactorItem(); diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index bd7788b768..e22ac806b6 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -7,6 +7,22 @@ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.filterByMTEClass; import static java.lang.Math.min; +import java.math.BigInteger; +import java.text.NumberFormat; +import java.util.*; +import java.util.function.Consumer; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoTunnel; @@ -24,6 +40,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult; import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode; import common.Blocks; + import gregtech.api.enums.Dyes; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures.BlockIcons; @@ -37,24 +54,11 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; -import java.math.BigInteger; -import java.text.NumberFormat; -import java.util.*; -import java.util.function.Consumer; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_EnhancedMultiBlockBase implements IGlobalWirelessEnergy, ISurvivalConstructable { + private enum TopState { MayBeTop, Top, @@ -72,6 +76,7 @@ public class GTMTE_LapotronicSuperCapacitor private long max_passive_drain_eu_per_tick_per_uev_cap = 100_000_000; private enum Capacitor { + IV(2, BigInteger.valueOf(IV_cap_storage)), LuV(3, BigInteger.valueOf(LuV_cap_storage)), ZPM(4, BigInteger.valueOf(ZPM_cap_storage)), @@ -79,15 +84,13 @@ public class GTMTE_LapotronicSuperCapacitor UHV(6, MAX_LONG), None(0, BigInteger.ZERO), EV(1, BigInteger.valueOf(EV_cap_storage)), - UEV(7, MAX_LONG), - ; + UEV(7, MAX_LONG),; private final int minimalGlassTier; private final BigInteger providedCapacity; static final Capacitor[] VALUES = values(); static final Capacitor[] VALUES_BY_TIER = Arrays.stream(values()) - .sorted(Comparator.comparingInt(Capacitor::getMinimalGlassTier)) - .toArray(Capacitor[]::new); + .sorted(Comparator.comparingInt(Capacitor::getMinimalGlassTier)).toArray(Capacitor[]::new); Capacitor(int minimalGlassTier, BigInteger providedCapacity) { this.minimalGlassTier = minimalGlassTier; @@ -128,169 +131,128 @@ public class GTMTE_LapotronicSuperCapacitor // height channel for height. // glass channel for glass // capacitor channel for capacitor, but it really just pick whatever capacitor it can find in survival - private static final IStructureDefinition STRUCTURE_DEFINITION = - IStructureDefinition.builder() - .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { - { - "bbbbb", "bbbbb", "bbbbb", "bbbbb", "bbbbb", - }, - { - "bb~bb", "bbbbb", "bbbbb", "bbbbb", "bbbbb", - }, - })) - .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { - { - "ggggg", "gcccg", "gcccg", "gcccg", "ggggg", - }, - })) - .addShape(STRUCTURE_PIECE_TOP, transpose(new String[][] { - { - "ggggg", "ggggg", "ggggg", "ggggg", "ggggg", - }, - })) - .addShape(STRUCTURE_PIECE_MID, transpose(new String[][] { - { - "ggggg", "gCCCg", "gCCCg", "gCCCg", "ggggg", - }, - })) - .addElement( - 'b', - buildHatchAdder(GTMTE_LapotronicSuperCapacitor.class) - .atLeast(LSCHatchElement.Energy, LSCHatchElement.Dynamo, Maintenance) - .hatchItemFilterAnd((t, h) -> ChannelDataAccessor.getChannelData(h, "glass") < 6 - ? filterByMTEClass(ImmutableList.of( + private static final IStructureDefinition STRUCTURE_DEFINITION = IStructureDefinition + .builder() + .addShape( + STRUCTURE_PIECE_BASE, + transpose( + new String[][] { { "bbbbb", "bbbbb", "bbbbb", "bbbbb", "bbbbb", }, + { "bb~bb", "bbbbb", "bbbbb", "bbbbb", "bbbbb", }, })) + .addShape( + STRUCTURE_PIECE_LAYER, + transpose(new String[][] { { "ggggg", "gcccg", "gcccg", "gcccg", "ggggg", }, })) + .addShape( + STRUCTURE_PIECE_TOP, + transpose(new String[][] { { "ggggg", "ggggg", "ggggg", "ggggg", "ggggg", }, })) + .addShape( + STRUCTURE_PIECE_MID, + transpose(new String[][] { { "ggggg", "gCCCg", "gCCCg", "gCCCg", "ggggg", }, })) + .addElement( + 'b', + buildHatchAdder(GTMTE_LapotronicSuperCapacitor.class) + .atLeast(LSCHatchElement.Energy, LSCHatchElement.Dynamo, Maintenance) + .hatchItemFilterAnd( + (t, h) -> ChannelDataAccessor.getChannelData(h, "glass") < 6 + ? filterByMTEClass( + ImmutableList.of( GT_MetaTileEntity_Hatch_EnergyTunnel.class, - GT_MetaTileEntity_Hatch_DynamoTunnel.class)) - .negate() + GT_MetaTileEntity_Hatch_DynamoTunnel.class)).negate() : s -> true) - .casingIndex(CASING_TEXTURE_ID) - .dot(1) - .buildAndChain( - onElementPass(te -> te.casingAmount++, ofBlock(LSC_PART, CASING_META)))) - .addElement( - 'g', - withChannel( - "glass", - BorosilicateGlass.ofBoroGlass( - (byte) GLASS_TIER_UNSET, (te, t) -> te.glassTier = t, te -> te.glassTier))) - .addElement( - 'c', - ofChain( - onlyIf( - te -> te.topState != TopState.NotTop, - onElementPass( - te -> te.topState = TopState.Top, - withChannel( - "glass", - BorosilicateGlass.ofBoroGlass( - (byte) GLASS_TIER_UNSET, - (te, t) -> te.glassTier = t, - te -> te.glassTier)))), - onlyIf( - te -> te.topState != TopState.Top, - onElementPass( - te -> te.topState = TopState.NotTop, - new IStructureElement() { - @Override - public boolean check( - GTMTE_LapotronicSuperCapacitor t, - World world, - int x, - int y, - int z) { - Block worldBlock = world.getBlock(x, y, z); - int meta = worldBlock.getDamageValue(world, x, y, z); - if (LSC_PART != worldBlock || meta == 0) return false; - t.capacitors[meta - 1]++; - return true; - } - - private int getHint(ItemStack stack) { - return Capacitor.VALUES_BY_TIER[ - Math.min( - Capacitor.VALUES_BY_TIER - .length, - ChannelDataAccessor - .getChannelData( - stack, - "capacitor")) - - 1] - .getMinimalGlassTier() - + 1; - } - - @Override - public boolean spawnHint( - GTMTE_LapotronicSuperCapacitor t, - World world, - int x, - int y, - int z, - ItemStack trigger) { - StructureLibAPI.hintParticle( - world, x, y, z, LSC_PART, getHint(trigger)); - return true; - } - - @Override - public boolean placeBlock( - GTMTE_LapotronicSuperCapacitor t, - World world, - int x, - int y, - int z, - ItemStack trigger) { - world.setBlock(x, y, z, LSC_PART, getHint(trigger), 3); - return true; - } - - @Override - public PlaceResult survivalPlaceBlock( - GTMTE_LapotronicSuperCapacitor t, - World world, - int x, - int y, - int z, - ItemStack trigger, - IItemSource source, - EntityPlayerMP actor, - Consumer chatter) { - if (check(t, world, x, y, z)) return PlaceResult.SKIP; - int glassTier = - ChannelDataAccessor.getChannelData(trigger, "glass") - + 2; - ItemStack targetStack = source.takeOne( - s -> s != null - && s.stackSize >= 0 - && s.getItem() == LSC_PART_ITEM - && Capacitor.VALUES[ - Math.min( - s - .getItemDamage(), - Capacitor - .VALUES - .length) - - 1] - .getMinimalGlassTier() - > glassTier, - true); - if (targetStack == null) return PlaceResult.REJECT; - return StructureUtility.survivalPlaceBlock( - targetStack, - NBTMode.EXACT, - targetStack.stackTagCompound, - true, - world, - x, - y, - z, - source, - actor, - chatter); - } - })))) - .addElement('C', ofBlock(LSC_PART, 1)) - .build(); + .casingIndex(CASING_TEXTURE_ID).dot(1) + .buildAndChain(onElementPass(te -> te.casingAmount++, ofBlock(LSC_PART, CASING_META)))) + .addElement( + 'g', + withChannel( + "glass", + BorosilicateGlass.ofBoroGlass( + (byte) GLASS_TIER_UNSET, + (te, t) -> te.glassTier = t, + te -> te.glassTier))) + .addElement( + 'c', + ofChain( + onlyIf( + te -> te.topState != TopState.NotTop, + onElementPass( + te -> te.topState = TopState.Top, + withChannel( + "glass", + BorosilicateGlass.ofBoroGlass( + (byte) GLASS_TIER_UNSET, + (te, t) -> te.glassTier = t, + te -> te.glassTier)))), + onlyIf( + te -> te.topState != TopState.Top, + onElementPass( + te -> te.topState = TopState.NotTop, + new IStructureElement() { + + @Override + public boolean check(GTMTE_LapotronicSuperCapacitor t, World world, + int x, int y, int z) { + Block worldBlock = world.getBlock(x, y, z); + int meta = worldBlock.getDamageValue(world, x, y, z); + if (LSC_PART != worldBlock || meta == 0) return false; + t.capacitors[meta - 1]++; + return true; + } + + private int getHint(ItemStack stack) { + return Capacitor.VALUES_BY_TIER[Math.min( + Capacitor.VALUES_BY_TIER.length, + ChannelDataAccessor.getChannelData(stack, "capacitor")) - 1] + .getMinimalGlassTier() + + 1; + } + + @Override + public boolean spawnHint(GTMTE_LapotronicSuperCapacitor t, World world, + int x, int y, int z, ItemStack trigger) { + StructureLibAPI + .hintParticle(world, x, y, z, LSC_PART, getHint(trigger)); + return true; + } + + @Override + public boolean placeBlock(GTMTE_LapotronicSuperCapacitor t, World world, + int x, int y, int z, ItemStack trigger) { + world.setBlock(x, y, z, LSC_PART, getHint(trigger), 3); + return true; + } + + @Override + public PlaceResult survivalPlaceBlock(GTMTE_LapotronicSuperCapacitor t, + World world, int x, int y, int z, ItemStack trigger, + IItemSource source, EntityPlayerMP actor, + Consumer chatter) { + if (check(t, world, x, y, z)) return PlaceResult.SKIP; + int glassTier = ChannelDataAccessor.getChannelData(trigger, "glass") + + 2; + ItemStack targetStack = source.takeOne( + s -> s != null && s.stackSize >= 0 + && s.getItem() == LSC_PART_ITEM + && Capacitor.VALUES[Math.min( + s.getItemDamage(), + Capacitor.VALUES.length) - 1] + .getMinimalGlassTier() + > glassTier, + true); + if (targetStack == null) return PlaceResult.REJECT; + return StructureUtility.survivalPlaceBlock( + targetStack, + NBTMode.EXACT, + targetStack.stackTagCompound, + true, + world, + x, + y, + z, + source, + actor, + chatter); + } + })))) + .addElement('C', ofBlock(LSC_PART, 1)).build(); private static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE); @@ -299,8 +261,7 @@ public class GTMTE_LapotronicSuperCapacitor private final Set mEnergyTunnelsTT = new HashSet<>(); private final Set mDynamoTunnelsTT = new HashSet<>(); /** - * Count the amount of capacitors of each tier in each slot. - * Index = meta - 1 + * Count the amount of capacitors of each tier in each slot. Index = meta - 1 */ private final int[] capacitors = new int[8]; @@ -357,8 +318,8 @@ public class GTMTE_LapotronicSuperCapacitor if (!(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch)) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return GTMTE_LapotronicSuperCapacitor.this.mMaintenanceHatches.add( - (GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + return GTMTE_LapotronicSuperCapacitor.this.mMaintenanceHatches + .add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { // Add GT hatches final GT_MetaTileEntity_Hatch_Energy tHatch = ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); @@ -366,8 +327,7 @@ public class GTMTE_LapotronicSuperCapacitor return mEnergyHatches.add(tHatch); } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyTunnel) { // Add TT Laser hatches - final GT_MetaTileEntity_Hatch_EnergyTunnel tHatch = - ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity); + final GT_MetaTileEntity_Hatch_EnergyTunnel tHatch = ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity); processInputHatch(tHatch, aBaseCasingIndex); return mEnergyTunnelsTT.add(tHatch); } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) { @@ -405,85 +365,121 @@ public class GTMTE_LapotronicSuperCapacitor @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Energy Storage") - .addInfo("Loses energy equal to 1% of the total capacity every 24 hours.") - .addInfo("Capped at " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uhv_cap) + EnumChatFormatting.GRAY - + " EU/t passive loss per " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] - + EnumChatFormatting.GRAY + " capacitor and ") - .addInfo(EnumChatFormatting.RED + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uev_cap) - + EnumChatFormatting.GRAY + " EU/t passive loss per " + GT_Values.TIER_COLORS[10] - + GT_Values.VN[10] + EnumChatFormatting.GRAY + " capacitor.") - .addInfo("Passive loss is multiplied by the number of maintenance issues present.") - .addSeparator() + tt.addMachineType("Energy Storage").addInfo("Loses energy equal to 1% of the total capacity every 24 hours.") + .addInfo( + "Capped at " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uhv_cap) + + EnumChatFormatting.GRAY + + " EU/t passive loss per " + + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.GRAY + + " capacitor and ") + .addInfo( + EnumChatFormatting.RED + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uev_cap) + + EnumChatFormatting.GRAY + + " EU/t passive loss per " + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.GRAY + + " capacitor.") + .addInfo("Passive loss is multiplied by the number of maintenance issues present.").addSeparator() .addInfo("Glass shell has to be Tier - 3 of the highest capacitor tier.") - .addInfo(GT_Values.TIER_COLORS[8] + GT_Values.VN[8] + EnumChatFormatting.GRAY - + "-tier glass required for " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE - + "Tech" + EnumChatFormatting.GRAY + " Laser Hatches.") - .addInfo("Add more or better capacitors to increase capacity.") - .addSeparator() + .addInfo( + GT_Values.TIER_COLORS[8] + GT_Values.VN[8] + + EnumChatFormatting.GRAY + + "-tier glass required for " + + EnumChatFormatting.BLUE + + "Tec" + + EnumChatFormatting.DARK_BLUE + + "Tech" + + EnumChatFormatting.GRAY + + " Laser Hatches.") + .addInfo("Add more or better capacitors to increase capacity.").addSeparator() .addInfo("Wireless mode can be enabled by right clicking with a screwdriver.") - .addInfo("This mode can only be enabled if you have a " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] - + EnumChatFormatting.GRAY + " or " + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] - + EnumChatFormatting.GRAY + " capacitor in the multiblock.") - .addInfo("When enabled every " + EnumChatFormatting.BLUE - + GT_Utility.formatNumbers(LSC_time_between_wireless_rebalance_in_ticks) - + EnumChatFormatting.GRAY + " ticks the LSC will attempt to re-balance against your") + .addInfo( + "This mode can only be enabled if you have a " + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.GRAY + + " or " + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.GRAY + + " capacitor in the multiblock.") + .addInfo( + "When enabled every " + EnumChatFormatting.BLUE + + GT_Utility.formatNumbers(LSC_time_between_wireless_rebalance_in_ticks) + + EnumChatFormatting.GRAY + + " ticks the LSC will attempt to re-balance against your") .addInfo("wireless EU network.") - .addInfo("If there is less than " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" - + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " - + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_wireless_eu_cap) - + EnumChatFormatting.GRAY + "(" + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] - + EnumChatFormatting.GRAY + ")" + " EU in the LSC") + .addInfo( + "If there is less than " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + + EnumChatFormatting.GRAY + + "(" + + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.GRAY + + ")" + + " or " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(UEV_wireless_eu_cap) + + EnumChatFormatting.GRAY + + "(" + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.GRAY + + ")" + + " EU in the LSC") .addInfo("it will withdraw from the network and add to the LSC. If there is more it will add") - .addInfo("the EU to the network and remove it from the LSC.") - .addSeparator() + .addInfo("the EU to the network and remove it from the LSC.").addSeparator() .beginVariableStructureBlock(5, 5, 4, 50, 5, 5, false) - .addStructureInfo("Modular height of 4-50 blocks.") - .addController("Front center bottom") + .addStructureInfo("Modular height of 4-50 blocks.").addController("Front center bottom") .addOtherStructurePart("Lapotronic Super Capacitor Casing", "5x2x5 base (at least 17x)") .addOtherStructurePart( - "Lapotronic Capacitor (" + GT_Values.TIER_COLORS[4] + GT_Values.VN[4] + EnumChatFormatting.GRAY - + "-" + GT_Values.TIER_COLORS[8] + GT_Values.VN[8] + EnumChatFormatting.GRAY - + "), Ultimate Capacitor (" + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] - + EnumChatFormatting.GRAY + "-" + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] - + EnumChatFormatting.GRAY + ")", + "Lapotronic Capacitor (" + GT_Values.TIER_COLORS[4] + + GT_Values.VN[4] + + EnumChatFormatting.GRAY + + "-" + + GT_Values.TIER_COLORS[8] + + GT_Values.VN[8] + + EnumChatFormatting.GRAY + + "), Ultimate Capacitor (" + + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.GRAY + + "-" + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.GRAY + + ")", "Center 3x(1-47)x3 above base (9-423 blocks)") .addStructureInfo( "You can also use the Empty Capacitor to save materials if you use it for less than half the blocks") .addOtherStructurePart("Borosilicate Glass (any)", "41-265x, Encase capacitor pillar") - .addEnergyHatch("Any casing") - .addDynamoHatch("Any casing") + .addEnergyHatch("Any casing").addDynamoHatch("Any casing") .addOtherStructurePart( "Laser Target/Source Hatches", - "Any casing, must be using " + GT_Values.TIER_COLORS[8] + GT_Values.VN[8] - + EnumChatFormatting.GRAY + "-tier glass") + "Any casing, must be using " + GT_Values.TIER_COLORS[8] + + GT_Values.VN[8] + + EnumChatFormatting.GRAY + + "-tier glass") .addStructureInfo("You can have several I/O Hatches") .addSubChannelUsage("glass", "Borosilicate Glass Tier") .addSubChannelUsage("capacitor", "Maximum Capacitor Tier") - .addSubChannelUsage("height", "Height of structure") - .addMaintenanceHatch("Any casing") + .addSubChannelUsage("height", "Height of structure").addMaintenanceHatch("Any casing") .toolTipFinisher("KekzTech"); return tt; } @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { ITexture[] sTexture = new ITexture[] { - TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) - }; + TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; if (aSide == aFacing && aActive) { - sTexture = new ITexture[] { - TextureFactory.of( - BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) - }; + sTexture = new ITexture[] { TextureFactory + .of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } return sTexture; } @@ -567,14 +563,13 @@ public class GTMTE_LapotronicSuperCapacitor } // Check if enough (more than 50%) non-empty caps - if (capacitors[6] - > capacitors[0] - + capacitors[1] - + capacitors[2] - + capacitors[3] - + getUHVCapacitorCount() - + capacitors[6] - + getUEVCapacitorCount()) return false; + if (capacitors[6] > capacitors[0] + capacitors[1] + + capacitors[2] + + capacitors[3] + + getUHVCapacitorCount() + + capacitors[6] + + getUEVCapacitorCount()) + return false; // Calculate total capacity capacity = BigInteger.ZERO; @@ -601,14 +596,40 @@ public class GTMTE_LapotronicSuperCapacitor int layer = Math.min(ChannelDataAccessor.getChannelData(stackSize, "height") + 3, 50); int built; built = survivialBuildPiece( - STRUCTURE_PIECE_BASE, stackSize, 2, 1, 0, elementBudget, source, actor, false, true); + STRUCTURE_PIECE_BASE, + stackSize, + 2, + 1, + 0, + elementBudget, + source, + actor, + false, + true); if (built >= 0) return built; - for (int i = 2; i < layer - 1; i++) - built = survivialBuildPiece( - STRUCTURE_PIECE_MID, stackSize, 2, i, 0, elementBudget, source, actor, false, true); + for (int i = 2; i < layer - 1; i++) built = survivialBuildPiece( + STRUCTURE_PIECE_MID, + stackSize, + 2, + i, + 0, + elementBudget, + source, + actor, + false, + true); if (built >= 0) return built; return survivialBuildPiece( - STRUCTURE_PIECE_TOP, stackSize, 2, layer - 1, 0, elementBudget, source, actor, false, true); + STRUCTURE_PIECE_TOP, + stackSize, + 2, + layer - 1, + 0, + elementBudget, + source, + actor, + false, + true); } @Override @@ -660,8 +681,7 @@ public class GTMTE_LapotronicSuperCapacitor // Output energy to TT hatches for (GT_MetaTileEntity_Hatch_DynamoMulti eDynamo : mDynamoHatchesTT) { - if (eDynamo == null - || eDynamo.getBaseMetaTileEntity() == null + if (eDynamo == null || eDynamo.getBaseMetaTileEntity() == null || eDynamo.getBaseMetaTileEntity().isInvalidTileEntity()) { continue; } @@ -713,8 +733,8 @@ public class GTMTE_LapotronicSuperCapacitor counter = 1; // Find difference. - BigInteger transferred_eu = - stored.subtract((LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount()))) + BigInteger transferred_eu = stored.subtract( + (LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount()))) .add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount())))); if (transferred_eu.signum() == 1) { @@ -766,16 +786,15 @@ public class GTMTE_LapotronicSuperCapacitor /** * To be called whenever the maintenance status changes or the capacity was recalculated - * @param repairStatus - * This machine's repair status + * + * @param repairStatus This machine's repair status * @return new BigInteger instance for passiveDischargeAmount */ private long recalculateLossWithMaintenance(int repairStatus) { repairStatusCache = repairStatus; // This cannot overflow because there is a 135 capacitor maximum per LSC. - long temp_capacity_divided = - capacity.divide(BigInteger.valueOf(100L * 86400L * 20L)).longValue(); + long temp_capacity_divided = capacity.divide(BigInteger.valueOf(100L * 86400L * 20L)).longValue(); // Passive loss is multiplied by number of UHV/UEV caps. Minimum of 1 otherwise loss is 0 for non-UHV/UEV caps // calculations. @@ -794,8 +813,8 @@ public class GTMTE_LapotronicSuperCapacitor /** * Calculate how much EU to draw from an Energy Hatch - * @param hatchWatts - * Hatch amperage * voltage + * + * @param hatchWatts Hatch amperage * voltage * @return EU amount */ private long getPowerToDraw(long hatchWatts) { @@ -806,8 +825,8 @@ public class GTMTE_LapotronicSuperCapacitor /** * Calculate how much EU to push into a Dynamo Hatch - * @param hatchWatts - * Hatch amperage * voltage + * + * @param hatchWatts Hatch amperage * voltage * @return EU amount */ private long getPowerToPush(long hatchWatts) { @@ -845,20 +864,26 @@ public class GTMTE_LapotronicSuperCapacitor ll.add("EU OUT: " + GT_Utility.formatNumbers(outputLastTick) + "EU/t"); ll.add("Avg EU IN: " + nf.format(getAvgIn()) + " (last " + secInterval + " seconds)"); ll.add("Avg EU OUT: " + nf.format(getAvgOut()) + " (last " + secInterval + " seconds)"); - ll.add("Maintenance Status: " - + ((super.getRepairStatus() == super.getIdealStatus()) + ll.add( + "Maintenance Status: " + ((super.getRepairStatus() == super.getIdealStatus()) ? EnumChatFormatting.GREEN + "Working perfectly" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "Has Problems" + EnumChatFormatting.RESET)); - ll.add("Wireless mode: " - + (wireless_mode - ? EnumChatFormatting.GREEN + "enabled" + EnumChatFormatting.RESET + ll.add( + "Wireless mode: " + (wireless_mode ? EnumChatFormatting.GREEN + "enabled" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "disabled" + EnumChatFormatting.RESET)); - ll.add(GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + EnumChatFormatting.RESET + " Capacitors detected: " - + getUHVCapacitorCount()); - ll.add(GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.RESET + " Capacitors detected: " - + getUEVCapacitorCount()); - ll.add("Total wireless EU: " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(getUserEU(global_energy_user_uuid))); + ll.add( + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + + EnumChatFormatting.RESET + + " Capacitors detected: " + + getUHVCapacitorCount()); + ll.add( + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + + EnumChatFormatting.RESET + + " Capacitors detected: " + + getUEVCapacitorCount()); + ll.add( + "Total wireless EU: " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(getUserEU(global_energy_user_uuid))); ll.add("---------------------------------------------"); final String[] a = new String[ll.size()]; @@ -924,9 +949,9 @@ public class GTMTE_LapotronicSuperCapacitor return stored.longValue(); } - /* all of these are needed for the injectEnergyUnits() and drainEnergyUnits() - in IGregTechTileEntity - */ + /* + * all of these are needed for the injectEnergyUnits() and drainEnergyUnits() in IGregTechTileEntity + */ @Override public long maxEUInput() { return mMaxEUIn; @@ -965,27 +990,34 @@ public class GTMTE_LapotronicSuperCapacitor } else { GT_Utility.sendChatToPlayer( aPlayer, - "Wireless mode cannot be enabled without at least 1 " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] - + EnumChatFormatting.RESET + " or " + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] - + EnumChatFormatting.RESET + " capacitor."); + "Wireless mode cannot be enabled without at least 1 " + GT_Values.TIER_COLORS[9] + + GT_Values.VN[9] + + EnumChatFormatting.RESET + + " or " + + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + + EnumChatFormatting.RESET + + " capacitor."); wireless_mode = false; } } private enum LSCHatchElement implements IHatchElement { + Energy(GT_MetaTileEntity_Hatch_EnergyMulti.class, GT_MetaTileEntity_Hatch_Energy.class) { + @Override public long count(GTMTE_LapotronicSuperCapacitor t) { return t.mEnergyHatches.size() + t.mEnergyHatchesTT.size() + t.mEnergyTunnelsTT.size(); } }, Dynamo(GT_MetaTileEntity_Hatch_DynamoMulti.class, GT_MetaTileEntity_Hatch_Dynamo.class) { + @Override public long count(GTMTE_LapotronicSuperCapacitor t) { return t.mDynamoHatches.size() + t.mDynamoHatchesTT.size() + t.mDynamoTunnelsTT.size(); } - }, - ; + },; private final List> mteClasses; diff --git a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java index ee9c0550b0..428913a029 100644 --- a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java +++ b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java @@ -1,6 +1,13 @@ package common.tileentities; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + +import org.joml.Vector3i; + import common.Blocks; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -8,10 +15,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import org.joml.Vector3i; public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBase { @@ -40,56 +43,38 @@ public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBas @Override public String[] getDescription() { - return new String[] {"Disabled"}; + return new String[] { "Disabled" }; /* - final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - b.addInfo("Can be built, BUT DOES NOT WORK") - .addInfo("Converts fissile material and outputs power or heat") - .addSeparator() - .addInfo("EU-MODE:") - .addInfo(" Directly outputs electricity depending on inserted fuel rods") - .addSeparator() - .addInfo("COOLANT-MODE:") - .addInfo(" Requires coolant to be pumped into the reactor.") - .addInfo(" Coolant is heated and should be drained and converted to electricity by other means.") - .addSeparator() - .addInfo("NOTES:") - .addInfo(" Does NOT use Industrialcraft 2 reactor components!") - .addInfo(" Consult controller GUI on how to arrange the outer casings.") - .addSeparator() - .beginStructureBlock(7, 6, 7) - .addController("Front bottom Center") - .addCasingInfo("Radiation Proof Machine Casing", 100) - .addOtherStructurePart("Control Rods", "Four pillars, four blocks high each. Diagonal to the inner edges of the shell") - .addOtherStructurePart("Nuclear Reactor Chamber", "17 of them to fill out the rest of the floor inside the shell") - .addDynamoHatch("ONLY in EU-mode, at least one") - .addOtherStructurePart("Input Bus, Output Bus", "Optional but required for automation") - .addOtherStructurePart("Input Hatch, Output Hatch", "ONLY in Coolant-Mode, at least one each") - .signAndFinalize("Kekzdealer"); - if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); - } else { - return b.getStructureInformation(); - }*/ + * final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); + * b.addInfo("Can be built, BUT DOES NOT WORK") .addInfo("Converts fissile material and outputs power or heat") + * .addSeparator() .addInfo("EU-MODE:") + * .addInfo(" Directly outputs electricity depending on inserted fuel rods") .addSeparator() + * .addInfo("COOLANT-MODE:") .addInfo(" Requires coolant to be pumped into the reactor.") + * .addInfo(" Coolant is heated and should be drained and converted to electricity by other means.") + * .addSeparator() .addInfo("NOTES:") .addInfo(" Does NOT use Industrialcraft 2 reactor components!") + * .addInfo(" Consult controller GUI on how to arrange the outer casings.") .addSeparator() + * .beginStructureBlock(7, 6, 7) .addController("Front bottom Center") + * .addCasingInfo("Radiation Proof Machine Casing", 100) .addOtherStructurePart("Control Rods", + * "Four pillars, four blocks high each. Diagonal to the inner edges of the shell") + * .addOtherStructurePart("Nuclear Reactor Chamber", + * "17 of them to fill out the rest of the floor inside the shell") + * .addDynamoHatch("ONLY in EU-mode, at least one") .addOtherStructurePart("Input Bus, Output Bus", + * "Optional but required for automation") .addOtherStructurePart("Input Hatch, Output Hatch", + * "ONLY in Coolant-Mode, at least one each") .signAndFinalize("Kekzdealer"); + * if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return b.getInformation(); } else { return + * b.getStructureInformation(); } + */ } @Override - public ITexture[] getTexture( - final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, - final byte aFacing, - final byte aColorIndex, - final boolean aActive, - final boolean aRedstone) { + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { return aSide == aFacing - ? new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - new GT_RenderedTexture( - aActive - ? Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER) - } - : new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + ? new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + new GT_RenderedTexture( + aActive ? Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE + : Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER) } + : new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; } @Override @@ -123,51 +108,50 @@ public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBas // Determine the ground level center of the structure final Vector3i center = new Vector3i( - thisController.getXCoord(), thisController.getYCoord(), thisController.getZCoord()) - .add(dirX * 3, 0, dirZ * 3); + thisController.getXCoord(), + thisController.getYCoord(), + thisController.getZCoord()).add(dirX * 3, 0, dirZ * 3); // Scan for outer tube - // - Scan sides + // - Scan sides for (int x = -3; x <= 3; x++) { for (int z = -3; z <= 3; z++) { // Only scan the three wide even sides, skip rest if ((Math.abs(x) <= 1 && Math.abs(z) == 3) || (Math.abs(z) <= 1 && Math.abs(x) == 3)) { for (int h = 0; h < 6; h++) { final Vector3i pos = new Vector3i(center.x() + x, center.y() + h, center.z() + z); - if (h == 0 - && pos.x() == thisController.getXCoord() + if (h == 0 && pos.x() == thisController.getXCoord() && pos.y() == thisController.getYCoord() && pos.z() == thisController.getZCoord()) { // Ignore controller continue; } else if (thisController.getBlock(pos.x(), pos.y(), pos.z()) == CASING && thisController.getMetaID(pos.x(), pos.y(), pos.z()) == CASING_META) { - minCasingAmount--; - } else { - checklist = false; - } + minCasingAmount--; + } else { + checklist = false; + } } } } } - // - Scan corners of tube + // - Scan corners of tube for (int x = -2; x <= 2; x++) { for (int z = -2; z <= 2; z++) { // Only scan the four corners, skip rest if (Math.abs(x) + Math.abs(z) == 4) { for (int h = 0; h < 6; h++) { final Vector3i pos = new Vector3i(center.x() + x, center.y() + h, center.z() + z); - if (h == 0 - && pos.x() == thisController.getXCoord() + if (h == 0 && pos.x() == thisController.getXCoord() && pos.y() == thisController.getYCoord() && pos.z() == thisController.getZCoord()) { // Ignore controller continue; } else if (thisController.getBlock(pos.x(), pos.y(), pos.z()) == CASING && thisController.getMetaID(pos.x(), pos.y(), pos.z()) == CASING_META) { - minCasingAmount--; - } else { - checklist = false; - } + minCasingAmount--; + } else { + checklist = false; + } } } } diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java index 11e941584f..a915f07287 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java @@ -4,8 +4,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import common.Blocks; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -20,11 +28,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_EnhancedMultiBlockBase { @@ -49,25 +52,23 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_EnhancedMultiBlockBas private static final int CASING_TEXTURE_ID = 49; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = - IStructureDefinition.builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { - {"ccc", "ccc", "ccc", "ccc", "ccc"}, - {"c~c", "geg", "geg", "geg", "cdc"}, - {"ccc", "ccc", "ccc", "ccc", "ccc"} - })) - .addElement( - 'c', - ofChain( - onElementPass(te -> te.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)), - ofHatchAdder(GTMTE_SOFuelCellMK1::addInputToMachineList, CASING_TEXTURE_ID, 1), - ofHatchAdder( - GTMTE_SOFuelCellMK1::addMaintenanceToMachineList, CASING_TEXTURE_ID, 1), - ofHatchAdder(GTMTE_SOFuelCellMK1::addOutputToMachineList, CASING_TEXTURE_ID, 1))) - .addElement('d', ofHatchAdder(GTMTE_SOFuelCellMK1::addDynamoToMachineList, CASING_TEXTURE_ID, 1)) - .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) - .addElement('e', ofBlockAnyMeta(Blocks.yszUnit)) - .build(); + private static final IStructureDefinition STRUCTURE_DEFINITION = IStructureDefinition + .builder() + .addShape( + STRUCTURE_PIECE_MAIN, + transpose( + new String[][] { { "ccc", "ccc", "ccc", "ccc", "ccc" }, + { "c~c", "geg", "geg", "geg", "cdc" }, { "ccc", "ccc", "ccc", "ccc", "ccc" } })) + .addElement( + 'c', + ofChain( + onElementPass(te -> te.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 1)), + ofHatchAdder(GTMTE_SOFuelCellMK1::addInputToMachineList, CASING_TEXTURE_ID, 1), + ofHatchAdder(GTMTE_SOFuelCellMK1::addMaintenanceToMachineList, CASING_TEXTURE_ID, 1), + ofHatchAdder(GTMTE_SOFuelCellMK1::addOutputToMachineList, CASING_TEXTURE_ID, 1))) + .addElement('d', ofHatchAdder(GTMTE_SOFuelCellMK1::addDynamoToMachineList, CASING_TEXTURE_ID, 1)) + .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) + .addElement('e', ofBlockAnyMeta(Blocks.yszUnit)).build(); @Override public IStructureDefinition getStructureDefinition() { @@ -79,62 +80,34 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_EnhancedMultiBlockBas final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Gas Turbine") .addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") - .addInfo("Consumes up to" + (EU_PER_TICK * 20) - + "EU worth of fuel with up to 100% efficiency each second") + .addInfo( + "Consumes up to" + (EU_PER_TICK * 20) + + "EU worth of fuel with up to 100% efficiency each second") .addInfo("Steam production requires the SOFC to heat up completely first") .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") - .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") - .addSeparator() - .beginStructureBlock(3, 3, 5, false) - .addController("Front center") + .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas").addSeparator() + .beginStructureBlock(3, 3, 5, false).addController("Front center") .addCasingInfo("Clean Stainless Steel Casing", 12) .addOtherStructurePart("YSZ Ceramic Electrolyte Unit", "3x, Center 1x1x3") .addOtherStructurePart("Reinforced Glass", "6x, touching the electrolyte units on the horizontal sides") - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Any casing") - .addInputHatch("Fuel, any casing") - .addInputHatch("Oxygen, any casing") - .addOutputHatch("Steam, any casing") - .toolTipFinisher("KekzTech"); + .addDynamoHatch("Back center", 1).addMaintenanceHatch("Any casing").addInputHatch("Fuel, any casing") + .addInputHatch("Oxygen, any casing").addOutputHatch("Steam, any casing").toolTipFinisher("KekzTech"); return tt; } @Override - public ITexture[] getTexture( - final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, - final byte aFacing, - final byte aColorIndex, - final boolean aActive, - final boolean aRedstone) { + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { - if (aActive) - return new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW) - .extFacing() - .glow() - .build() - }; - return new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW) - .extFacing() - .glow() - .build() - }; + if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow() + .build() }; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() }; } - return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; } @Override diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java index a7b806add9..8c1aee14ef 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java @@ -6,8 +6,17 @@ import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import common.Blocks; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -21,12 +30,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_EnhancedMultiBlockBase { @@ -51,25 +54,23 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_EnhancedMultiBlockBas private static final int CASING_TEXTURE_ID = 48; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = - IStructureDefinition.builder() - .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { - {"ccc", "ccc", "ccc", "ccc", "ccc"}, - {"c~c", "geg", "geg", "geg", "cdc"}, - {"ccc", "ccc", "ccc", "ccc", "ccc"} - })) - .addElement( - 'c', - ofChain( - onElementPass(te -> te.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 0)), - ofHatchAdder(GTMTE_SOFuelCellMK2::addInputToMachineList, CASING_TEXTURE_ID, 1), - ofHatchAdder( - GTMTE_SOFuelCellMK2::addMaintenanceToMachineList, CASING_TEXTURE_ID, 1), - ofHatchAdder(GTMTE_SOFuelCellMK2::addOutputToMachineList, CASING_TEXTURE_ID, 1))) - .addElement('d', ofHatchAdder(GTMTE_SOFuelCellMK2::addDynamoToMachineList, CASING_TEXTURE_ID, 1)) - .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) - .addElement('e', ofBlockAnyMeta(Blocks.gdcUnit)) - .build(); + private static final IStructureDefinition STRUCTURE_DEFINITION = IStructureDefinition + .builder() + .addShape( + STRUCTURE_PIECE_MAIN, + transpose( + new String[][] { { "ccc", "ccc", "ccc", "ccc", "ccc" }, + { "c~c", "geg", "geg", "geg", "cdc" }, { "ccc", "ccc", "ccc", "ccc", "ccc" } })) + .addElement( + 'c', + ofChain( + onElementPass(te -> te.mCasing++, ofBlock(GregTech_API.sBlockCasings4, 0)), + ofHatchAdder(GTMTE_SOFuelCellMK2::addInputToMachineList, CASING_TEXTURE_ID, 1), + ofHatchAdder(GTMTE_SOFuelCellMK2::addMaintenanceToMachineList, CASING_TEXTURE_ID, 1), + ofHatchAdder(GTMTE_SOFuelCellMK2::addOutputToMachineList, CASING_TEXTURE_ID, 1))) + .addElement('d', ofHatchAdder(GTMTE_SOFuelCellMK2::addDynamoToMachineList, CASING_TEXTURE_ID, 1)) + .addElement('g', ofBlockAnyMeta(GameRegistry.findBlock("IC2", "blockAlloyGlass"))) + .addElement('e', ofBlockAnyMeta(Blocks.gdcUnit)).build(); @Override public IStructureDefinition getStructureDefinition() { @@ -81,63 +82,36 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_EnhancedMultiBlockBas final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Gas Turbine") .addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") - .addInfo("Consumes up to" + (EU_PER_TICK * 20) - + "EU worth of fuel with up to 100% efficiency each second") + .addInfo( + "Consumes up to" + (EU_PER_TICK * 20) + + "EU worth of fuel with up to 100% efficiency each second") .addInfo("Nitrobenzene and other gas fuels above 1M EU/bucket are more efficient") .addInfo("Steam production requires the SOFC to heat up completely first") .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") - .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") - .addSeparator() - .beginStructureBlock(3, 3, 5, false) - .addController("Front center") + .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas").addSeparator() + .beginStructureBlock(3, 3, 5, false).addController("Front center") .addCasingInfo("Robust Tungstensteel Machine Casing", 12) .addOtherStructurePart("GDC Ceramic Electrolyte Unit", "3x, Center 1x1x3") .addOtherStructurePart("Reinforced Glass", "6x, touching the electrolyte units on the horizontal sides") - .addDynamoHatch("Back center", 1) - .addMaintenanceHatch("Any casing") - .addInputHatch("Fuel, any casing") - .addInputHatch("Oxygen, any casing") - .addOutputHatch("Superheated Steam, any casing") + .addDynamoHatch("Back center", 1).addMaintenanceHatch("Any casing").addInputHatch("Fuel, any casing") + .addInputHatch("Oxygen, any casing").addOutputHatch("Superheated Steam, any casing") .toolTipFinisher("KekzTech"); return tt; } @Override - public ITexture[] getTexture( - final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, - final byte aFacing, - final byte aColorIndex, - final boolean aActive, - final boolean aRedstone) { + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { - if (aActive) - return new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW) - .extFacing() - .glow() - .build() - }; - return new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER) - .extFacing() - .build(), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW) - .extFacing() - .glow() - .build() - }; + if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow() + .build() }; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() }; } - return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; } @Override diff --git a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java index 097c16af59..1a5eb0fd99 100644 --- a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java +++ b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java @@ -1,23 +1,27 @@ package common.tileentities; -import common.Blocks; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; import java.util.ArrayList; import java.util.HashSet; + import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; + import util.Vector3i; import util.Vector3ic; +import common.Blocks; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; + public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { private static final Block BASE_BLOCK = Blocks.spaceElevatorStructure; @@ -31,10 +35,10 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { // Scan positions for capacitor banks // Start with top left bank, clockwise // Start with top middle pillar within bank, clockwise, middle last - private static final int[] bankOffsetsX = {-7, 5, 5, -7}; - private static final int[] bankOffsetsY = {-7, -7, 5, 5}; - private static final int[] scanOffsetsX = {1, 2, 1, 0, 1}; - private static final int[] scanOffsetsY = {0, 1, 2, 1, 1}; + private static final int[] bankOffsetsX = { -7, 5, 5, -7 }; + private static final int[] bankOffsetsY = { -7, -7, 5, 5 }; + private static final int[] scanOffsetsX = { 1, 2, 1, 0, 1 }; + private static final int[] scanOffsetsY = { 0, 1, 2, 1, 1 }; private final HashSet capacitors = new HashSet<>(); private long lastLaunchEUCost = 0; @@ -54,49 +58,35 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { - return new String[] {"Disabled"}; + return new String[] { "Disabled" }; /* - final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - b.addInfo("Access for your Space Station!") - .addInfo("Check out the wiki on my github if you are having trouble with the structure") - .addInfo("Regenerative Breaking will recover up to X% of the energy spent on launch") - .addInfo("Energy recovered depends on coil tier: +10% per coil tier, up to 90%") - .addSeparator() - .beginStructureBlock(15, 11, 15) - .addController("Bottom Center") - .addEnergyHatch("Instead of any casing in the bottom floor") - .addMaintenanceHatch("Instead of any casing in the bottom floor") - .addCasingInfo("Solid Steel Machine Casing", 320) - .addOtherStructurePart("Any EBF coil", "40x, have to be all the same") - .addOtherStructurePart("Space Elevator Tether", "4x") - .addOtherStructurePart("Space Elevator Cabin Block", "42x") - .addOtherStructurePart("Space Elevator Cabin Guide", "8x") - .signAndFinalize("Kekzdealer"); - if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); - } else { - return b.getStructureInformation(); - }*/ + * final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); + * b.addInfo("Access for your Space Station!") + * .addInfo("Check out the wiki on my github if you are having trouble with the structure") + * .addInfo("Regenerative Breaking will recover up to X% of the energy spent on launch") + * .addInfo("Energy recovered depends on coil tier: +10% per coil tier, up to 90%") .addSeparator() + * .beginStructureBlock(15, 11, 15) .addController("Bottom Center") + * .addEnergyHatch("Instead of any casing in the bottom floor") + * .addMaintenanceHatch("Instead of any casing in the bottom floor") + * .addCasingInfo("Solid Steel Machine Casing", 320) .addOtherStructurePart("Any EBF coil", + * "40x, have to be all the same") .addOtherStructurePart("Space Elevator Tether", "4x") + * .addOtherStructurePart("Space Elevator Cabin Block", "42x") + * .addOtherStructurePart("Space Elevator Cabin Guide", "8x") .signAndFinalize("Kekzdealer"); + * if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return b.getInformation(); } else { return + * b.getStructureInformation(); } + */ } @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { - ITexture[] sTexture = new ITexture[] { - new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) - }; + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + ITexture[] sTexture = new ITexture[] { new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; if (aSide == aFacing && aActive) { - sTexture = new ITexture[] { - new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) - }; + sTexture = new ITexture[] { new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } return sTexture; } @@ -152,8 +142,8 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { } final Vector3ic offset = rotateOffsetVector(forgeDirection, X, Y, 0); - final IGregTechTileEntity currentTE = - thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); + final IGregTechTileEntity currentTE = thisController + .getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); // Tries to add TE as either of those kinds of hatches. // The number is the texture index number for the texture that needs to be painted over the hatch @@ -193,8 +183,8 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { } else { if (scan == 4) { // Check for capacitors - final TileEntity te = - thisController.getTileEntityOffset(offset.x(), offset.y(), offset.z()); + final TileEntity te = thisController + .getTileEntityOffset(offset.x(), offset.y(), offset.z()); if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CAP_BLOCK && te instanceof TE_SpaceElevatorCapacitor) { capacitors.add((TE_SpaceElevatorCapacitor) te); @@ -203,9 +193,7 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { } } else { // Check for Glass - if (!thisController - .getBlockOffset(offset.x(), offset.y(), offset.z()) - .getUnlocalizedName() + if (!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() .equals(glassNameBorosilicate)) { formationChecklist = false; } @@ -236,8 +224,8 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { final ArrayList ll = new ArrayList<>(); ll.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET); - ll.add("Maintenance Status: " - + ((super.getRepairStatus() == super.getIdealStatus()) + ll.add( + "Maintenance Status: " + ((super.getRepairStatus() == super.getIdealStatus()) ? EnumChatFormatting.GREEN + "Working perfectly" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "Has Problems" + EnumChatFormatting.RESET)); ll.add("---------------------------------------------"); diff --git a/src/main/java/common/tileentities/GTMTE_TFFT.java b/src/main/java/common/tileentities/GTMTE_TFFT.java index e3f7951cdb..8978ae90a9 100644 --- a/src/main/java/common/tileentities/GTMTE_TFFT.java +++ b/src/main/java/common/tileentities/GTMTE_TFFT.java @@ -5,6 +5,24 @@ import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static java.lang.Math.min; +import java.math.BigInteger; +import java.text.MessageFormat; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import net.minecraft.block.Block; +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.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ChannelDataAccessor; @@ -12,6 +30,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa import com.gtnewhorizon.structurelib.structure.*; import com.gtnewhorizon.structurelib.util.ItemStackPredicate; import common.Blocks; + import gregtech.api.enums.Textures; import gregtech.api.fluid.FluidTankGT; import gregtech.api.interfaces.IHatchElement; @@ -26,26 +45,11 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; import gregtech.common.items.GT_IntegratedCircuit_Item; -import java.math.BigInteger; -import java.text.MessageFormat; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import net.minecraft.block.Block; -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.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { public enum Field { + T1(1_000_000L, 1), // LV T2(4_000_000L, 2), // MV T3(16_000_000L, 5), // HV @@ -78,6 +82,7 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase { + INSTANCE; private final List> mteClasses; @@ -104,6 +109,7 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase { + INSTANCE; @Override @@ -132,18 +138,16 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase s != null - && s.stackSize >= 0 - && s.getItem() == TFFT_FIELD_ITEM - && s.getItemDamage() != CASING_META - && s.getItemDamage() <= fieldTier, - true); + ItemStack result = env.getSource().takeOne( + s -> s != null && s.stackSize >= 0 + && s.getItem() == TFFT_FIELD_ITEM + && s.getItemDamage() != CASING_META + && s.getItemDamage() <= fieldTier, + true); if (result == null) return PlaceResult.REJECT; return StructureUtility.survivalPlaceBlock( @@ -162,18 +166,17 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase STRUCTURE_DEFINITION = - IStructureDefinition.builder() - .addShape( - STRUCTURE_PIECE_TOP, - transpose(new String[][] {{"ccccc"}, {"cCCCc"}, {"cC~Cc"}, {"cCCCc"}, {"ccccc"}})) - .addShape( - STRUCTURE_PIECE_MID, - transpose(new String[][] {{"gGGGg"}, {"GfffG"}, {"GfffG"}, {"GfffG"}, {"gGGGg"}})) - .addShape( - STRUCTURE_PIECE_BOTTOM, - transpose(new String[][] {{"ccccc"}, {"cCCCc"}, {"cCCCc"}, {"cCCCc"}, {"ccccc"}})) - .addElement( - 'c', - buildHatchAdder(GTMTE_TFFT.class) - .atLeast(Energy, Maintenance) - .casingIndex(CASING_TEXTURE_ID_1) - .dot(1) - .buildAndChain( - onElementPass(te -> te.casingAmount++, ofBlock(TFFT_FIELD, CASING_META)))) - .addElement( - 'C', - buildHatchAdder(GTMTE_TFFT.class) - .casingIndex(CASING_TEXTURE_ID_1) - .atLeast( - Energy, - Maintenance, - InputHatch.or(TFFTMultiHatch.INSTANCE), - OutputHatch.or(TFFTMultiHatch.INSTANCE)) - .dot(2) - .buildAndChain( - onElementPass(te -> te.casingAmount++, ofBlock(TFFT_FIELD, CASING_META)))) - .addElement( - 'G', - buildHatchAdder(GTMTE_TFFT.class) - .atLeast( - InputHatch.or(TFFTMultiHatch.INSTANCE), - OutputHatch.or(TFFTMultiHatch.INSTANCE)) - .casingIndex(CASING_TEXTURE_ID_2) - .dot(3) - .buildAndChain( - ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false), - BorosilicateGlass.ofBoroGlassAnyTier())) - .addElement( - 'g', - ofChain( + private static final IStructureDefinition STRUCTURE_DEFINITION = IStructureDefinition + .builder() + .addShape( + STRUCTURE_PIECE_TOP, + transpose(new String[][] { { "ccccc" }, { "cCCCc" }, { "cC~Cc" }, { "cCCCc" }, { "ccccc" } })) + .addShape( + STRUCTURE_PIECE_MID, + transpose(new String[][] { { "gGGGg" }, { "GfffG" }, { "GfffG" }, { "GfffG" }, { "gGGGg" } })) + .addShape( + STRUCTURE_PIECE_BOTTOM, + transpose(new String[][] { { "ccccc" }, { "cCCCc" }, { "cCCCc" }, { "cCCCc" }, { "ccccc" } })) + .addElement( + 'c', + buildHatchAdder(GTMTE_TFFT.class).atLeast(Energy, Maintenance).casingIndex(CASING_TEXTURE_ID_1) + .dot(1) + .buildAndChain(onElementPass(te -> te.casingAmount++, ofBlock(TFFT_FIELD, CASING_META)))) + .addElement( + 'C', + buildHatchAdder(GTMTE_TFFT.class).casingIndex(CASING_TEXTURE_ID_1) + .atLeast( + Energy, + Maintenance, + InputHatch.or(TFFTMultiHatch.INSTANCE), + OutputHatch.or(TFFTMultiHatch.INSTANCE)) + .dot(2) + .buildAndChain(onElementPass(te -> te.casingAmount++, ofBlock(TFFT_FIELD, CASING_META)))) + .addElement( + 'G', + buildHatchAdder(GTMTE_TFFT.class) + .atLeast(InputHatch.or(TFFTMultiHatch.INSTANCE), OutputHatch.or(TFFTMultiHatch.INSTANCE)) + .casingIndex(CASING_TEXTURE_ID_2).dot(3).buildAndChain( ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true), ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false), BorosilicateGlass.ofBoroGlassAnyTier())) - .addElement('f', ofChain(TFFTStorageFieldElement.INSTANCE)) - .build(); + .addElement( + 'g', + ofChain( + ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false), + BorosilicateGlass.ofBoroGlassAnyTier())) + .addElement('f', ofChain(TFFTStorageFieldElement.INSTANCE)).build(); public final FluidTankGT[] STORE = new FluidTankGT[MAX_DISTINCT_FLUIDS]; @@ -277,65 +270,44 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase 0 ? String.valueOf(STORE[i].amount() * 100 / capacityPerFluid) : ""; + String percentage = capacityPerFluid > 0 ? String.valueOf(STORE[i].amount() * 100 / capacityPerFluid) + : ""; ll.add(MessageFormat.format("{0} - {1}: {2}L ({3}%)", i, localizedName, amount, percentage)); } @@ -512,8 +483,8 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase= 0) { FluidTankGT tank = STORE[index]; if (doPull) return tank.add(amount); - return doVoidExcess - ? amount + return doVoidExcess ? amount : tank.amount() + amount > tank.capacity() ? tank.capacity() - tank.amount() : amount; } else if (fluidCount() < MAX_DISTINCT_FLUIDS) { FluidTankGT tank = STORE[getNullSlot()]; @@ -660,8 +630,7 @@ public class GTMTE_TFFT extends GT_MetaTileEntity_EnhancedMultiBlockBase { @@ -36,15 +38,14 @@ public class GTMTE_TFFTHatch extends GT_MetaTileEntity_Hatch implements IMEMonit @Override @Optional.Method(modid = "appliedenergistics2") public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc) { - return channel == StorageChannel.FLUIDS - && te instanceof BaseMetaTileEntity + return channel == StorageChannel.FLUIDS && te instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) te).getMetaTileEntity() instanceof GTMTE_TFFTHatch; } @Override @Optional.Method(modid = "appliedenergistics2") - public IMEInventory getInventory( - TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src) { + public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, + BaseActionSource src) { if (channel == StorageChannel.FLUIDS) { return ((GTMTE_TFFTHatch) (((BaseMetaTileEntity) te).getMetaTileEntity())); } @@ -52,8 +53,8 @@ public class GTMTE_TFFTHatch extends GT_MetaTileEntity_Hatch implements IMEMonit } } - private static final Textures.BlockIcons.CustomIcon TEXTURE_TFFT_HATCH = - new Textures.BlockIcons.CustomIcon("iconsets/TFFT_HATCH"); + private static final Textures.BlockIcons.CustomIcon TEXTURE_TFFT_HATCH = new Textures.BlockIcons.CustomIcon( + "iconsets/TFFT_HATCH"); private HashMap, Object> listeners = new HashMap<>(); private GTMTE_TFFT controller; @@ -72,32 +73,21 @@ public class GTMTE_TFFTHatch extends GT_MetaTileEntity_Hatch implements IMEMonit } @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN), - TextureFactory.builder().addIcon(TEXTURE_TFFT_HATCH).extFacing().build() - }; + return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN), + TextureFactory.builder().addIcon(TEXTURE_TFFT_HATCH).extFacing().build() }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN), - TextureFactory.builder().addIcon(TEXTURE_TFFT_HATCH).extFacing().build() - }; + return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_IN), + TextureFactory.builder().addIcon(TEXTURE_TFFT_HATCH).extFacing().build() }; } @Override diff --git a/src/main/java/common/tileentities/TE_BeamTransmitter.java b/src/main/java/common/tileentities/TE_BeamTransmitter.java index 74cb845fc4..1d6915ade2 100644 --- a/src/main/java/common/tileentities/TE_BeamTransmitter.java +++ b/src/main/java/common/tileentities/TE_BeamTransmitter.java @@ -1,12 +1,14 @@ package common.tileentities; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; + import org.joml.Vector3i; import org.joml.Vector3ic; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class TE_BeamTransmitter extends TileEntity { private final Vector3ic position; diff --git a/src/main/java/common/tileentities/TE_ItemProxyCable.java b/src/main/java/common/tileentities/TE_ItemProxyCable.java index ac080ceab2..1dc539c89e 100644 --- a/src/main/java/common/tileentities/TE_ItemProxyCable.java +++ b/src/main/java/common/tileentities/TE_ItemProxyCable.java @@ -16,9 +16,10 @@ public class TE_ItemProxyCable extends TileEntity { public void updateEntity() { // Check all 6 sides and connect the conduit if it is allowed to for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { - final TileEntity te = super.getWorldObj() - .getTileEntity( - super.xCoord + side.offsetX, super.yCoord + side.offsetY, super.zCoord + side.offsetZ); + final TileEntity te = super.getWorldObj().getTileEntity( + super.xCoord + side.offsetX, + super.yCoord + side.offsetY, + super.zCoord + side.offsetZ); if (te instanceof TE_ItemProxyCable) { final TE_ItemProxyCable cable = (TE_ItemProxyCable) te; setConnection(side, cable.isConnectionAllowed(side.getOpposite())); @@ -33,8 +34,7 @@ public class TE_ItemProxyCable extends TileEntity { } /** - * Builds a simple unique identifier for this TileEntity by appending - * the x, y, and z coordinates in a string. + * Builds a simple unique identifier for this TileEntity by appending the x, y, and z coordinates in a string. * * @return unique identifier for this TileEntity */ @@ -48,20 +48,17 @@ public class TE_ItemProxyCable extends TileEntity { } /** - * 0 0 0 0 0 0 0 0 = 0 -> no connection
- * 0 0 0 0 0 0 0 1 = 1 -> down
- * 0 0 0 0 0 0 1 0 = 2 -> up
- * 0 0 0 0 0 1 0 0 = 4 -> north
- * 0 0 0 0 1 0 0 0 = 8 -> south
- * 0 0 0 1 0 0 0 0 = 16 -> west
- * 0 0 1 0 0 0 0 0 = 32 -> east
+ * 0 0 0 0 0 0 0 0 = 0 -> no connection
+ * 0 0 0 0 0 0 0 1 = 1 -> down
+ * 0 0 0 0 0 0 1 0 = 2 -> up
+ * 0 0 0 0 0 1 0 0 = 4 -> north
+ * 0 0 0 0 1 0 0 0 = 8 -> south
+ * 0 0 0 1 0 0 0 0 = 16 -> west
+ * 0 0 1 0 0 0 0 0 = 32 -> east
* - * @param side - * The side for which to set the connection status. - * @param connected - * Whether this side should be connected or not - * @return - * True if the connection was allowed + * @param side The side for which to set the connection status. + * @param connected Whether this side should be connected or not + * @return True if the connection was allowed */ public boolean setConnection(ForgeDirection side, boolean connected) { if (isConnectionAllowed(side)) { diff --git a/src/main/java/common/tileentities/TE_ItemProxyEndpoint.java b/src/main/java/common/tileentities/TE_ItemProxyEndpoint.java index 88a8ef8bda..7d58a21c61 100644 --- a/src/main/java/common/tileentities/TE_ItemProxyEndpoint.java +++ b/src/main/java/common/tileentities/TE_ItemProxyEndpoint.java @@ -1,6 +1,7 @@ package common.tileentities; import java.util.HashSet; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; @@ -43,9 +44,10 @@ public class TE_ItemProxyEndpoint extends TileEntity implements ISidedInventory final HashSet visited = new HashSet<>(); for (ForgeDirection next : ForgeDirection.VALID_DIRECTIONS) { - final TileEntity te = super.getWorldObj() - .getTileEntity( - super.xCoord + next.offsetX, super.yCoord + next.offsetY, super.zCoord + next.offsetZ); + final TileEntity te = super.getWorldObj().getTileEntity( + super.xCoord + next.offsetX, + super.yCoord + next.offsetY, + super.zCoord + next.offsetZ); if (te instanceof TE_ItemProxyCable) { final TE_ItemProxyCable cable = (TE_ItemProxyCable) te; if (cable.isConnected(next.getOpposite())) { @@ -61,22 +63,18 @@ public class TE_ItemProxyEndpoint extends TileEntity implements ISidedInventory } } - private void searchSourceRecursive( - HashSet sources, - HashSet visited, - ForgeDirection from, - TE_ItemProxyCable nextTarget) { + private void searchSourceRecursive(HashSet sources, HashSet visited, + ForgeDirection from, TE_ItemProxyCable nextTarget) { if (!visited.contains(nextTarget.getIdentifier())) { visited.add(nextTarget.getIdentifier()); for (ForgeDirection next : ForgeDirection.VALID_DIRECTIONS) { if (next != from) { - final TileEntity te = super.getWorldObj() - .getTileEntity( - nextTarget.xCoord + next.offsetX, - nextTarget.yCoord + next.offsetY, - nextTarget.zCoord + next.offsetZ); + final TileEntity te = super.getWorldObj().getTileEntity( + nextTarget.xCoord + next.offsetX, + nextTarget.yCoord + next.offsetY, + nextTarget.zCoord + next.offsetZ); if (te instanceof TE_ItemProxyCable) { final TE_ItemProxyCable cable = (TE_ItemProxyCable) te; if (cable.isConnected(next.getOpposite())) { @@ -162,7 +160,7 @@ public class TE_ItemProxyEndpoint extends TileEntity implements ISidedInventory @Override public int[] getAccessibleSlotsFromSide(int side) { - return new int[] {0}; + return new int[] { 0 }; } @Override diff --git a/src/main/java/common/tileentities/TE_ItemProxySource.java b/src/main/java/common/tileentities/TE_ItemProxySource.java index 15a93ed91a..78c338b920 100644 --- a/src/main/java/common/tileentities/TE_ItemProxySource.java +++ b/src/main/java/common/tileentities/TE_ItemProxySource.java @@ -11,8 +11,7 @@ public class TE_ItemProxySource extends TileEntity implements IInventory { private String idCache = null; /** - * Builds a simple unique identifier for this TileEntity by appending - * the x, y, and z coordinates in a string. + * Builds a simple unique identifier for this TileEntity by appending the x, y, and z coordinates in a string. * * @return unique identifier for this TileEntity */ diff --git a/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java b/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java index a8de775f98..ea5211bfba 100644 --- a/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java +++ b/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java @@ -9,10 +9,9 @@ public class TE_SpaceElevatorCapacitor extends TileEntity { /** * Called by {@link GTMTE_SpaceElevator} while charging - * @param charge - * Current elevator charge - * @param maxCharge - * Charge level it is trying to reach + * + * @param charge Current elevator charge + * @param maxCharge Charge level it is trying to reach */ public void updateChargeLevel(int charge, int maxCharge) { chargeLevel = ((float) charge) / ((float) maxCharge); @@ -20,8 +19,8 @@ public class TE_SpaceElevatorCapacitor extends TileEntity { /** * Called by {@link client.renderer.TESR_SECapacitor} to calculate the block's colour saturation - * @return - * Charge level from 0.0F to 1.0F + * + * @return Charge level from 0.0F to 1.0F */ public float getChargeLevel() { return chargeLevel; @@ -36,8 +35,8 @@ public class TE_SpaceElevatorCapacitor extends TileEntity { /** * Called by {@link GTMTE_SpaceElevator} in case of maintenance issues - * @param isDamaged - * has maintenance issue + * + * @param isDamaged has maintenance issue */ public void setIsDamaged(boolean isDamaged) { this.isDamaged = isDamaged; @@ -45,8 +44,8 @@ public class TE_SpaceElevatorCapacitor extends TileEntity { /** * Called by {@link client.renderer.TESR_SECapacitor} to check whether the block should be rendered red - * @return - * should be rendered red + * + * @return should be rendered red */ public boolean isDamaged() { return isDamaged; diff --git a/src/main/java/common/tileentities/TE_SpaceElevatorTether.java b/src/main/java/common/tileentities/TE_SpaceElevatorTether.java index c4df059563..7e76a9c14d 100644 --- a/src/main/java/common/tileentities/TE_SpaceElevatorTether.java +++ b/src/main/java/common/tileentities/TE_SpaceElevatorTether.java @@ -1,10 +1,11 @@ package common.tileentities; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class TE_SpaceElevatorTether extends TileEntity { @SideOnly(Side.CLIENT) diff --git a/src/main/java/kekztech/GuiHandler.java b/src/main/java/kekztech/GuiHandler.java index 56c7a8b102..8e16da8f37 100644 --- a/src/main/java/kekztech/GuiHandler.java +++ b/src/main/java/kekztech/GuiHandler.java @@ -1,13 +1,15 @@ package kekztech; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + import client.gui.Gui_ItemProxyEndpoint; import client.gui.Gui_ItemProxySource; + import common.container.Container_ItemProxyEndpoint; import common.container.Container_ItemProxySource; import cpw.mods.fml.common.network.IGuiHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; public class GuiHandler implements IGuiHandler { diff --git a/src/main/java/kekztech/Items.java b/src/main/java/kekztech/Items.java index 2444eb2fe9..defec1c9b7 100644 --- a/src/main/java/kekztech/Items.java +++ b/src/main/java/kekztech/Items.java @@ -1,42 +1,36 @@ package kekztech; -import common.items.MetaItem_CraftingComponent; -import common.items.MetaItem_ReactorComponent; import java.util.Arrays; + import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; + import util.Util; +import common.items.MetaItem_CraftingComponent; +import common.items.MetaItem_ReactorComponent; + public enum Items { + /* - // Heat Vents - T1HeatVent(0,0), T2HeatVent(1,0), T3HeatVent(2,0), T4HeatVent(3,0), - T1ComponentHeatVent(4,0), T2ComponentHeatVent(5,0), T3ComponentHeatVent(6,0), T4ComponentHeatVent(7,0), - T1OverclockedHeatVent(8,0), T2OverclockedHeatVent(9,0), T3OverclockedHeatVent(10,0), T4OverclockedHeatVent(11,0), - // Heat Exchanger - T1HeatExchanger(12,0), T2HeatExchanger(13,0), T3HeatExchanger(14,0), T4HeatExchanger(15,0), - // Fuel Rods - UraniumFuelRod(16,0), UraniumDualFuelRod(17,0), UraniumQuadFuelRod(18,0), - ThoriumFuelRod(19,0), ThoriumDualFuelRod(20,0), ThoriumQuadFuelRod(21,0), - MOXFuelRod(22,0), MOXDualFuelRod(23,0), MOXQuadFuelRod(24,0), - NaquadahFuelRod(25,0), NaquadahDualFuelRod(26,0), NaquadahQuadFuelRod(27,0), - Th_MOXFuelRod(28,0), Th_MOXDualFuelRod(29,0), Th_MOXQuadFuelRod(30,0), - // Depleted Fuel Rods - DepletedUraniumFuelRod(31,0), DepletedUraniumDualFuelRod(32,0), DepletedUraniumQuadFuelRod(33,0), - DepletedThoriumFuelRod(34,0), DepletedThoriumDualFuelRod(35,0), DepletedThoriumQuadFuelRod(36,0), - DepletedMOXFuelRod(37,0), DepletedMOXDualFuelRod(38,0), DepletedMOXQuadFuelRod(39,0), - DepletedNaquadahFuelRod(40,0), DepletedNaquadahDualFuelRod(41,0), DepletedNaquadahQuadFuelRod(42,0), - Th_DepletedMOXFuelRod(43,0), Th_DepletedMOXDualFuelRod(44,0), Th_DepletedMOXQuadFuelRod(45,0), - // Neutron Reflectors - T1NeutronReflector(46,0), T2NeutronReflector(47,0), - // Coolant Cells - HeliumCoolantCell360k(48,0), NaKCoolantCell360k(49,0), - - // Heat Pipes - CopperHeatPipe(0,1), SilverHeatPipe(1,1), BoronArsenideHeatPipe(2,1), DiamondHeatPipe(3,1), - BoronArsenideDust(4,1), IsotopicallyPureDiamondDust(5,1), AmineCarbamiteDust(6,1), - BoronArsenideCrystal(7,1), IsotopicallyPureDiamondCrystal(8,1), - */ + * // Heat Vents T1HeatVent(0,0), T2HeatVent(1,0), T3HeatVent(2,0), T4HeatVent(3,0), T1ComponentHeatVent(4,0), + * T2ComponentHeatVent(5,0), T3ComponentHeatVent(6,0), T4ComponentHeatVent(7,0), T1OverclockedHeatVent(8,0), + * T2OverclockedHeatVent(9,0), T3OverclockedHeatVent(10,0), T4OverclockedHeatVent(11,0), // Heat Exchanger + * T1HeatExchanger(12,0), T2HeatExchanger(13,0), T3HeatExchanger(14,0), T4HeatExchanger(15,0), // Fuel Rods + * UraniumFuelRod(16,0), UraniumDualFuelRod(17,0), UraniumQuadFuelRod(18,0), ThoriumFuelRod(19,0), + * ThoriumDualFuelRod(20,0), ThoriumQuadFuelRod(21,0), MOXFuelRod(22,0), MOXDualFuelRod(23,0), MOXQuadFuelRod(24,0), + * NaquadahFuelRod(25,0), NaquadahDualFuelRod(26,0), NaquadahQuadFuelRod(27,0), Th_MOXFuelRod(28,0), + * Th_MOXDualFuelRod(29,0), Th_MOXQuadFuelRod(30,0), // Depleted Fuel Rods DepletedUraniumFuelRod(31,0), + * DepletedUraniumDualFuelRod(32,0), DepletedUraniumQuadFuelRod(33,0), DepletedThoriumFuelRod(34,0), + * DepletedThoriumDualFuelRod(35,0), DepletedThoriumQuadFuelRod(36,0), DepletedMOXFuelRod(37,0), + * DepletedMOXDualFuelRod(38,0), DepletedMOXQuadFuelRod(39,0), DepletedNaquadahFuelRod(40,0), + * DepletedNaquadahDualFuelRod(41,0), DepletedNaquadahQuadFuelRod(42,0), Th_DepletedMOXFuelRod(43,0), + * Th_DepletedMOXDualFuelRod(44,0), Th_DepletedMOXQuadFuelRod(45,0), // Neutron Reflectors T1NeutronReflector(46,0), + * T2NeutronReflector(47,0), // Coolant Cells HeliumCoolantCell360k(48,0), NaKCoolantCell360k(49,0), // Heat Pipes + * CopperHeatPipe(0,1), SilverHeatPipe(1,1), BoronArsenideHeatPipe(2,1), DiamondHeatPipe(3,1), + * BoronArsenideDust(4,1), IsotopicallyPureDiamondDust(5,1), AmineCarbamiteDust(6,1), BoronArsenideCrystal(7,1), + * IsotopicallyPureDiamondCrystal(8,1), + */ // Ceramics YSZCeramicDust(9, 1), GDCCeramicDust(10, 1), @@ -78,16 +72,13 @@ public enum Items { } public ItemStack getNonOreDictedItemStack(int amount) { - return identifier == 0 - ? new ItemStack(MetaItem_ReactorComponent.getInstance(), amount, this.getMetaID()) + return identifier == 0 ? new ItemStack(MetaItem_ReactorComponent.getInstance(), amount, this.getMetaID()) : new ItemStack(MetaItem_CraftingComponent.getInstance(), amount, this.getMetaID()); } public ItemStack getOreDictedItemStack(int amount) { - return this.getOreDictName() != null - ? Util.getStackofAmountFromOreDict(this.getOreDictName(), amount) - : identifier == 0 - ? new ItemStack(MetaItem_ReactorComponent.getInstance(), amount, this.getMetaID()) + return this.getOreDictName() != null ? Util.getStackofAmountFromOreDict(this.getOreDictName(), amount) + : identifier == 0 ? new ItemStack(MetaItem_ReactorComponent.getInstance(), amount, this.getMetaID()) : new ItemStack(MetaItem_CraftingComponent.getInstance(), amount, this.getMetaID()); } diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index dbef680cc3..557cfcb28c 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -1,18 +1,21 @@ package kekztech; +import java.util.List; +import java.util.Set; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import com.google.common.collect.ImmutableSet; import common.CommonProxy; import common.tileentities.*; + import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLMissingMappingsEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import java.util.List; -import java.util.Set; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; /** * My GT-Meta-IDs are: 13101 - 13500 @@ -23,8 +26,7 @@ import org.apache.logging.log4j.Logger; modid = KekzCore.MODID, name = KekzCore.NAME, version = KekzCore.VERSION, - dependencies = "required-after:IC2;" - + "required-after:gregtech;" + dependencies = "required-after:IC2;" + "required-after:gregtech;" + "required-after:tectech;" + "required-after:Thaumcraft;" + "required-after:ThaumicTinkerer;" diff --git a/src/main/java/kekztech/ServerProxy.java b/src/main/java/kekztech/ServerProxy.java index ac366a54fd..e509ab1722 100644 --- a/src/main/java/kekztech/ServerProxy.java +++ b/src/main/java/kekztech/ServerProxy.java @@ -2,4 +2,5 @@ package kekztech; import common.CommonProxy; -public class ServerProxy extends CommonProxy {} +public class ServerProxy extends CommonProxy { +} diff --git a/src/main/java/reactor/items/CoolantCell.java b/src/main/java/reactor/items/CoolantCell.java index 8b78881f48..2f59d6cfaa 100644 --- a/src/main/java/reactor/items/CoolantCell.java +++ b/src/main/java/reactor/items/CoolantCell.java @@ -4,7 +4,7 @@ public class CoolantCell { public static String TYPE = "CoolantCell"; - public static String[] RESOURCE_NAME = {"HeliumCoolantCell360k", "NaKCoolantCell360k"}; + public static String[] RESOURCE_NAME = { "HeliumCoolantCell360k", "NaKCoolantCell360k" }; - public static int[] HEAT_CAPACITY = {360000, 360000}; + public static int[] HEAT_CAPACITY = { 360000, 360000 }; } diff --git a/src/main/java/reactor/items/FuelRod.java b/src/main/java/reactor/items/FuelRod.java index 0df756dfc2..f9e41e6ced 100644 --- a/src/main/java/reactor/items/FuelRod.java +++ b/src/main/java/reactor/items/FuelRod.java @@ -15,61 +15,30 @@ public class FuelRod { public static final String EU_PER_TICK = "EU_PER_TICK"; public static final String EU_PER_PULSE = "EU_PER_PULSE"; - public static final String[] RESOURCE_NAME = { - "UraniumFuelRod", "UraniumDualFuelRod", "UraniumQuadFuelRod", - "ThoriumFuelRod", "ThoriumDualFuelRod", "ThoriumQuadFuelRod", - "MOXFuelRod", "MOXDualFuelRod", "MOXQuadFuelRod", - "NaquadahFuelRod", "NaquadahDualFuelRod", "NaquadahQuadFuelRod", - "Th_MOXFuelRod", "Th_MOXDualFuelRod", "Th_MOXQuadFuelRod" - }; + public static final String[] RESOURCE_NAME = { "UraniumFuelRod", "UraniumDualFuelRod", "UraniumQuadFuelRod", + "ThoriumFuelRod", "ThoriumDualFuelRod", "ThoriumQuadFuelRod", "MOXFuelRod", "MOXDualFuelRod", + "MOXQuadFuelRod", "NaquadahFuelRod", "NaquadahDualFuelRod", "NaquadahQuadFuelRod", "Th_MOXFuelRod", + "Th_MOXDualFuelRod", "Th_MOXQuadFuelRod" }; - public static final String[] RESOURCE_NAME_DEPLETED = { - "DepletedUraniumFuelRod", "DepletedUraniumDualFuelRod", "DepletedUraniumQuadFuelRod", - "DepletedThoriumFuelRod", "DepletedThoriumDualFuelRod", "DepletedThoriumQuadFuelRod", - "DepletedMOXFuelRod", "DepletedMOXDualFuelRod", "DepletedMOXQuadFuelRod", - "DepletedNaquadahFuelRod", "DepletedNaquadahDualFuelRod", "DepletedNaquadahQuadFuelRod", - "Th_DepletedMOXFuelRod", "Th_DepletedMOXDualFuelRod", "Th_DepletedMOXQuadFuelRod" - }; + public static final String[] RESOURCE_NAME_DEPLETED = { "DepletedUraniumFuelRod", "DepletedUraniumDualFuelRod", + "DepletedUraniumQuadFuelRod", "DepletedThoriumFuelRod", "DepletedThoriumDualFuelRod", + "DepletedThoriumQuadFuelRod", "DepletedMOXFuelRod", "DepletedMOXDualFuelRod", "DepletedMOXQuadFuelRod", + "DepletedNaquadahFuelRod", "DepletedNaquadahDualFuelRod", "DepletedNaquadahQuadFuelRod", + "Th_DepletedMOXFuelRod", "Th_DepletedMOXDualFuelRod", "Th_DepletedMOXQuadFuelRod" }; - public static final int[] VALUES_LIFETIME = { - 20000, 20000, 20000, 100000, 100000, 100000, - 10000, 10000, 10000, 100000, 100000, 100000, - 50000, 50000, 50000 - }; + public static final int[] VALUES_LIFETIME = { 20000, 20000, 20000, 100000, 100000, 100000, 10000, 10000, 10000, + 100000, 100000, 100000, 50000, 50000, 50000 }; - public static final int[] VALUES_PULSES = { - 1, 2, 4, 1, 2, 4, - 1, 2, 4, 1, 2, 4, - 1, 2, 4 - }; + public static final int[] VALUES_PULSES = { 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4 }; - public static final int[] VALUES_HEAT_PER_SECOND = { - 4, 24, 96, 1, 6, 24, - 4, 24, 96, 80, 480, 1920, - 1, 6, 24 - }; + public static final int[] VALUES_HEAT_PER_SECOND = { 4, 24, 96, 1, 6, 24, 4, 24, 96, 80, 480, 1920, 1, 6, 24 }; - public static final int[] VALUES_HEAT_PER_PULSE = { - 4, 4, 4, 1, 1, 1, - 4, 4, 4, 80, 80, 80, - 1, 1, 1 - }; + public static final int[] VALUES_HEAT_PER_PULSE = { 4, 4, 4, 1, 1, 1, 4, 4, 4, 80, 80, 80, 1, 1, 1 }; - public static final double[] VALUES_HEAT_BOOST_RATE = { - 1, 1, 1, 1, 1, 1, - 5, 5, 5, 1, 1, 1, - 2, 2, 2 - }; + public static final double[] VALUES_HEAT_BOOST_RATE = { 1, 1, 1, 1, 1, 1, 5, 5, 5, 1, 1, 1, 2, 2, 2 }; - public static final int[] VALUES_EU_PER_TICK = { - 50, 200, 600, 10, 40, 120, - 50, 200, 600, 100, 400, 1200, - 10, 40, 120 - }; + public static final int[] VALUES_EU_PER_TICK = { 50, 200, 600, 10, 40, 120, 50, 200, 600, 100, 400, 1200, 10, 40, + 120 }; - public static final int[] VALUES_EU_PER_PULSE = { - 50, 50, 50, 10, 10, 10, - 50, 50, 50, 100, 100, 100, - 10, 10, 10 - }; + public static final int[] VALUES_EU_PER_PULSE = { 50, 50, 50, 10, 10, 10, 50, 50, 50, 100, 100, 100, 10, 10, 10 }; } diff --git a/src/main/java/reactor/items/HeatExchanger.java b/src/main/java/reactor/items/HeatExchanger.java index ec4dbce8e7..5be68d1541 100644 --- a/src/main/java/reactor/items/HeatExchanger.java +++ b/src/main/java/reactor/items/HeatExchanger.java @@ -4,11 +4,12 @@ public class HeatExchanger { public static String TYPE = "HeatExchanger"; - public static String[] RESOURCE_NAME = {"T1HeatExchanger", "T2HeatExchanger", "T3HeatExchanger", "T4HeatExchanger"}; + public static String[] RESOURCE_NAME = { "T1HeatExchanger", "T2HeatExchanger", "T3HeatExchanger", + "T4HeatExchanger" }; - public static int[] HEAT_CAPACITY = {2000, 8000, 32000, 128000}; + public static int[] HEAT_CAPACITY = { 2000, 8000, 32000, 128000 }; - public static int[] COMPONENT_EXCHANGE_RATE = {12, 24, 96, 384}; + public static int[] COMPONENT_EXCHANGE_RATE = { 12, 24, 96, 384 }; - public static int[] HULL_EXCHANGE_RATE = {4, 8, 32, 128}; + public static int[] HULL_EXCHANGE_RATE = { 4, 8, 32, 128 }; } diff --git a/src/main/java/reactor/items/HeatVent.java b/src/main/java/reactor/items/HeatVent.java index 100de26d04..3ff65d97bd 100644 --- a/src/main/java/reactor/items/HeatVent.java +++ b/src/main/java/reactor/items/HeatVent.java @@ -10,33 +10,15 @@ public class HeatVent { public static final String HULL_DRAW_RATE = "HULL_DRAW_RATE"; public static final String SELF_COOL_RATE = "SELF_COOL_RATE"; - public static String[] RESOURCE_NAMES = { - "T1HeatVent", "T2HeatVent", "T3HeatVent", "T4HeatVent", - "T1ComponentHeatVent", "T2ComponentHeatVent", "T3ComponentHeatVent", "T4ComponentHeatVent", - "T1OverclockedHeatVent", "T2OverclockedHeatVent", "T3OverclockedHeatVent", "T4OverclockedHeatVent" - }; + public static String[] RESOURCE_NAMES = { "T1HeatVent", "T2HeatVent", "T3HeatVent", "T4HeatVent", + "T1ComponentHeatVent", "T2ComponentHeatVent", "T3ComponentHeatVent", "T4ComponentHeatVent", + "T1OverclockedHeatVent", "T2OverclockedHeatVent", "T3OverclockedHeatVent", "T4OverclockedHeatVent" }; - public static int[] HEAT_CAPACITIES = { - 1000, 4000, 8000, 32000, - 1000, 4000, 8000, 32000, - 1000, 4000, 8000, 32000 - }; + public static int[] HEAT_CAPACITIES = { 1000, 4000, 8000, 32000, 1000, 4000, 8000, 32000, 1000, 4000, 8000, 32000 }; - public static int[] COMPONENT_VENT_RATES = { - 0, 0, 0, 0, - 6, 12, 48, 96, - 0, 0, 0, 0 - }; + public static int[] COMPONENT_VENT_RATES = { 0, 0, 0, 0, 6, 12, 48, 96, 0, 0, 0, 0 }; - public static int[] HULL_DRAW_RATES = { - 0, 0, 0, 0, - 0, 0, 0, 0, - 18, 36, 144, 288 - }; + public static int[] HULL_DRAW_RATES = { 0, 0, 0, 0, 0, 0, 0, 0, 18, 36, 144, 288 }; - public static int[] SELF_COOL_RATES = { - 6, 12, 48, 96, - 0, 0, 0, 0, - 10, 20, 80, 160 - }; + public static int[] SELF_COOL_RATES = { 6, 12, 48, 96, 0, 0, 0, 0, 10, 20, 80, 160 }; } diff --git a/src/main/java/reactor/items/NeutronReflector.java b/src/main/java/reactor/items/NeutronReflector.java index 3d18413104..44f04e32c9 100644 --- a/src/main/java/reactor/items/NeutronReflector.java +++ b/src/main/java/reactor/items/NeutronReflector.java @@ -4,7 +4,7 @@ public class NeutronReflector { public static String TYPE = "NeutronReflector"; - public static String[] RESOURCE_NAME = {"T1NeutronReflector", "T2NeutronReflector"}; + public static String[] RESOURCE_NAME = { "T1NeutronReflector", "T2NeutronReflector" }; - public static int[] DURABILITY = {512000, 2147483647}; + public static int[] DURABILITY = { 512000, 2147483647 }; } diff --git a/src/main/java/util/Util.java b/src/main/java/util/Util.java index b9af3a06dc..6a56dfa8aa 100644 --- a/src/main/java/util/Util.java +++ b/src/main/java/util/Util.java @@ -1,13 +1,15 @@ package util; -import common.items.ErrorItem; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import common.items.ErrorItem; + public class Util { public static ItemStack getStackofAmountFromOreDict(String oredictName, final int amount) { -- cgit