diff --git a/build.properties b/build.properties index b08cab3..7761dc5 100644 --- a/build.properties +++ b/build.properties @@ -2,6 +2,6 @@ #Wed Feb 24 14:31:53 PDT 2015 package_group=com.tombenpotter.emt mc_version=1.7.10 -forge_version=10.13.4.1481 -mod_version=1.2.3 +forge_version=10.13.4.1566 +mod_version=1.2.4 mod_name=ElectroMagicTools diff --git a/libs/CodeChickenCore-1.7.10-1.0.7.47-dev.jar b/libs/CodeChickenCore-1.7.10-1.0.7.47-dev.jar new file mode 100644 index 0000000..c7ecc2a Binary files /dev/null and b/libs/CodeChickenCore-1.7.10-1.0.7.47-dev.jar differ diff --git a/libs/CodeChickenLib-1.7.10-1.1.3.140-dev.jar b/libs/CodeChickenLib-1.7.10-1.1.3.140-dev.jar new file mode 100644 index 0000000..2470ca7 Binary files /dev/null and b/libs/CodeChickenLib-1.7.10-1.1.3.140-dev.jar differ diff --git a/libs/NotEnoughItems-1.7.10-1.0.5.118-dev.jar b/libs/NotEnoughItems-1.7.10-1.0.5.118-dev.jar new file mode 100644 index 0000000..b16f02e Binary files /dev/null and b/libs/NotEnoughItems-1.7.10-1.0.5.118-dev.jar differ diff --git a/src/main/java/tombenpotter/emt/ElectroMagicTools.java b/src/main/java/tombenpotter/emt/ElectroMagicTools.java index 55b471a..73d076b 100644 --- a/src/main/java/tombenpotter/emt/ElectroMagicTools.java +++ b/src/main/java/tombenpotter/emt/ElectroMagicTools.java @@ -32,64 +32,64 @@ public class ElectroMagicTools { public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT"); - @SidedProxy(clientSide = ModInformation.clientProxy, serverSide = ModInformation.commonProxy) - public static CommonProxy proxy; + @SidedProxy(clientSide = ModInformation.clientProxy, serverSide = ModInformation.commonProxy) + public static CommonProxy proxy; - public static CreativeTabs tabEMT = new CreativeTabEMT(ModInformation.modid + ".creativeTab"); - public static Logger logger = LogManager.getLogger(ModInformation.name); + public static CreativeTabs tabEMT = new CreativeTab(ModInformation.modid + ".creativeTab"); + public static Logger logger = LogManager.getLogger(ModInformation.name); - @Instance(ModInformation.modid) - public static ElectroMagicTools instance; + @Instance(ModInformation.modid) + public static ElectroMagicTools instance; - @EventHandler - public void preInit(FMLPreInitializationEvent event) { - ElectroMagicTools.logger.info("Starting planning the world domination"); + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + ElectroMagicTools.logger.info("Starting planning the world domination"); - ConfigHandler.init(event.getSuggestedConfigurationFile()); - FMLCommonHandler.instance().bus().register(new EventHandlerEMT()); - Registry.register(); - EssentiasOutputs.addPrimalOutputs(); - EssentiasOutputs.addOutputs(); - registerPackets(); + ConfigHandler.init(event.getSuggestedConfigurationFile()); + FMLCommonHandler.instance().bus().register(new EMTEventHandler()); + Registry.register(); + EssentiasOutputs.addPrimalOutputs(); + EssentiasOutputs.addOutputs(); + registerPackets(); - ElectroMagicTools.logger.info("Planning complete"); - } + ElectroMagicTools.logger.info("Planning complete"); + } - @EventHandler - public void load(FMLInitializationEvent event) { - ElectroMagicTools.logger.info("Gathering allies"); + @EventHandler + public void load(FMLInitializationEvent event) { + ElectroMagicTools.logger.info("Gathering allies"); - ElectroMagicTools.logger.info("Loading the proxies"); - proxy.load(); - ElectroMagicTools.logger.info("Making mobs drop additional items"); - MinecraftForge.EVENT_BUS.register(new EventHandlerEMT()); - ElectroMagicTools.logger.info("Adding dungeon loot"); - DungeonChestGenerator.generateLoot(); + ElectroMagicTools.logger.info("Loading the proxies"); + proxy.load(); + ElectroMagicTools.logger.info("Making mobs drop additional items"); + MinecraftForge.EVENT_BUS.register(new EMTEventHandler()); + ElectroMagicTools.logger.info("Adding dungeon loot"); + DungeonChestGenerator.generateLoot(); - ElectroMagicTools.logger.info("Registering entities"); - EntityRegistry.registerEMTEntities(); - ElectroMagicTools.logger.info("Registering the GUI Handler"); - NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); + ElectroMagicTools.logger.info("Registering entities"); + EntityRegistry.registerEMTEntities(); + ElectroMagicTools.logger.info("Registering the GUI Handler"); + NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); - ElectroMagicTools.logger.info("Allies gathered."); - } + ElectroMagicTools.logger.info("Allies gathered."); + } - @EventHandler - public void postInit(FMLPostInitializationEvent event) { - ElectroMagicTools.logger.info("Starting the world takeover"); + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + ElectroMagicTools.logger.info("Starting the world takeover"); - Registry.registerLate(); - RegistryHandler.registerIc2PostRegistrys(); + Registry.registerLate(); + EMTResearch.register(); - ElectroMagicTools.logger.info("World takeover complete. Enjoy!"); - } + ElectroMagicTools.logger.info("World takeover complete. Enjoy!"); + } - @EventHandler - public void onFMLServerStart(FMLServerStartingEvent event) { - event.registerServerCommand(new CommandOutputs()); - } - - public void registerPackets(){ - INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER); - } + @EventHandler + public void onFMLServerStart(FMLServerStartingEvent event) { + event.registerServerCommand(new CommandOutputs()); + } + + public void registerPackets() { + INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER); + } } diff --git a/src/main/java/tombenpotter/emt/ModInformation.java b/src/main/java/tombenpotter/emt/ModInformation.java index 4a023fc..26cac7e 100644 --- a/src/main/java/tombenpotter/emt/ModInformation.java +++ b/src/main/java/tombenpotter/emt/ModInformation.java @@ -4,7 +4,7 @@ public class ModInformation { public static final String name = "Electro-Magic Tools"; public static final String modid = "EMT"; - public static final String version = "1.2.2"; + public static final String version = "1.2.4"; public static final String texturePath = "electromagictools"; public static final String guiFactory = "tombenpotter.emt.client.gui.config.EMTGuiFactory"; public static final String clientProxy = "tombenpotter.emt.proxies.ClientProxy"; diff --git a/src/main/java/tombenpotter/emt/client/EMTKeys.java b/src/main/java/tombenpotter/emt/client/EMTKeys.java index 5064ff3..330cf20 100644 --- a/src/main/java/tombenpotter/emt/client/EMTKeys.java +++ b/src/main/java/tombenpotter/emt/client/EMTKeys.java @@ -12,16 +12,15 @@ import tombenpotter.emt.common.util.TextHelper; import cpw.mods.fml.client.registry.ClientRegistry; import net.minecraft.client.settings.KeyBinding; -public class EMTKeys{ +public class EMTKeys { public static KeyBinding keyUnequip; - - public static void registerKeys(){ + + public static void registerKeys() { keyUnequip = new KeyBinding(TextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT"); ClientRegistry.registerKeyBinding(keyUnequip); - } - - public static boolean keyUnequipPressed(){ + + public static boolean keyUnequipPressed() { return keyUnequip.getIsKeyPressed(); } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/client/gui/GuiEtherealMacerator.java b/src/main/java/tombenpotter/emt/client/gui/GuiEtherealMacerator.java index 13eca43..a9577ce 100644 --- a/src/main/java/tombenpotter/emt/client/gui/GuiEtherealMacerator.java +++ b/src/main/java/tombenpotter/emt/client/gui/GuiEtherealMacerator.java @@ -12,23 +12,23 @@ import tombenpotter.emt.common.util.TextHelper; public class GuiEtherealMacerator extends GuiContainer { - public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) { - super(new ContainerEtheralMacerator(inventory, te)); - xSize = 176; - ySize = 165; - } + public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) { + super(new ContainerEtheralMacerator(inventory, te)); + xSize = 176; + ySize = 165; + } - public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/etherealmacerator.png"); + public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/etherealmacerator.png"); - @Override - public void drawGuiContainerBackgroundLayer(float f, int j, int i) { - GL11.glColor4f(1F, 1F, 1F, 1F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } + @Override + public void drawGuiContainerBackgroundLayer(float f, int j, int i) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.etherealMacerator.title"), 6, 6, 4210752); - this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.etherealMacerator.title"), 6, 6, 4210752); + this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/tombenpotter/emt/client/gui/GuiIndustrialWandRecharger.java b/src/main/java/tombenpotter/emt/client/gui/GuiIndustrialWandRecharger.java index 490a41d..0ddea33 100644 --- a/src/main/java/tombenpotter/emt/client/gui/GuiIndustrialWandRecharger.java +++ b/src/main/java/tombenpotter/emt/client/gui/GuiIndustrialWandRecharger.java @@ -12,23 +12,23 @@ import tombenpotter.emt.common.util.TextHelper; public class GuiIndustrialWandRecharger extends GuiContainer { - public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) { - super(new ContainerIndustrialWandRecharge(inventory, te)); - xSize = 176; - ySize = 165; - } + public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) { + super(new ContainerIndustrialWandRecharge(inventory, te)); + xSize = 176; + ySize = 165; + } - public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/wandcharger.png"); + public static final ResourceLocation texture = new ResourceLocation(ModInformation.texturePath, "textures/guis/wandcharger.png"); - @Override - public void drawGuiContainerBackgroundLayer(float f, int j, int i) { - GL11.glColor4f(1F, 1F, 1F, 1F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - } + @Override + public void drawGuiContainerBackgroundLayer(float f, int j, int i) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.wandRecharge.title"), 6, 6, 4210752); - this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.wandRecharge.title"), 6, 6, 4210752); + this.fontRendererObj.drawString(TextHelper.localize("gui.EMT.inventory"), 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiConfig.java b/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiConfig.java index 6c7f60f..937fe82 100644 --- a/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiConfig.java +++ b/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiConfig.java @@ -16,19 +16,19 @@ import static tombenpotter.emt.common.util.ConfigHandler.*; public class EMTGuiConfig extends GuiConfig { - public EMTGuiConfig(GuiScreen parentScreen) { - super(parentScreen, getConfigElements(parentScreen), ModInformation.modid, false, false, StatCollector.translateToLocal("gui." + ModInformation.modid + ".config.title")); - } + public EMTGuiConfig(GuiScreen parentScreen) { + super(parentScreen, getConfigElements(parentScreen), ModInformation.modid, false, false, StatCollector.translateToLocal("gui." + ModInformation.modid + ".config.title")); + } - @SuppressWarnings("rawtypes") - private static List getConfigElements(GuiScreen parent) { - List list = new ArrayList(); + @SuppressWarnings("rawtypes") + private static List getConfigElements(GuiScreen parent) { + List list = new ArrayList(); - list.add(new ConfigElement(config.getCategory(RANDOM.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(VALUES.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(RESEARCH.toLowerCase(Locale.US)))); - list.add(new ConfigElement(config.getCategory(OUTPUTS.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(RANDOM.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(VALUES.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(RESEARCH.toLowerCase(Locale.US)))); + list.add(new ConfigElement(config.getCategory(OUTPUTS.toLowerCase(Locale.US)))); - return list; - } + return list; + } } diff --git a/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiFactory.java b/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiFactory.java index 232e7f9..ba527be 100644 --- a/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiFactory.java +++ b/src/main/java/tombenpotter/emt/client/gui/config/EMTGuiFactory.java @@ -8,23 +8,23 @@ import java.util.Set; public class EMTGuiFactory implements IModGuiFactory { - @Override - public void initialize(Minecraft minecraftInstance) { + @Override + public void initialize(Minecraft minecraftInstance) { - } + } - @Override - public Class mainConfigGuiClass() { - return EMTGuiConfig.class; - } + @Override + public Class mainConfigGuiClass() { + return EMTGuiConfig.class; + } - @Override - public Set runtimeGuiCategories() { - return null; - } + @Override + public Set runtimeGuiCategories() { + return null; + } - @Override - public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { - return null; - } + @Override + public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { + return null; + } } diff --git a/src/main/java/tombenpotter/emt/client/gui/container/ContainerEtheralMacerator.java b/src/main/java/tombenpotter/emt/client/gui/container/ContainerEtheralMacerator.java index cc0344f..08564c3 100644 --- a/src/main/java/tombenpotter/emt/client/gui/container/ContainerEtheralMacerator.java +++ b/src/main/java/tombenpotter/emt/client/gui/container/ContainerEtheralMacerator.java @@ -12,72 +12,77 @@ import tombenpotter.emt.common.tile.TileEntityEtherealMacerator; public class ContainerEtheralMacerator extends Container { - TileEntityEtherealMacerator te; + TileEntityEtherealMacerator te; - public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) { - this.te = ((TileEntityEtherealMacerator)te); - addSlotToContainer(new Slot(this.te, 0, 56, 26)); - addSlotToContainer(new SlotOutput(this.te, 2, 116, 26)); - addSlotToContainer(new SlotOutput(this.te, 1, 116, 53)); - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - for (int i = 0; i < 9; i++) { - addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); - } - } + public ContainerEtheralMacerator(InventoryPlayer inventory, TileEntity te) { + this.te = ((TileEntityEtherealMacerator) te); + addSlotToContainer(new Slot(this.te, 0, 56, 26)); + addSlotToContainer(new SlotOutput(this.te, 2, 116, 26)); + addSlotToContainer(new SlotOutput(this.te, 1, 116, 53)); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + for (int i = 0; i < 9; i++) { + addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); + } + } - @Override - public boolean canInteractWith(EntityPlayer player) { - return this.te.isUseableByPlayer(player); - } + @Override + public boolean canInteractWith(EntityPlayer player) { + return this.te.isUseableByPlayer(player); + } - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(par2); + @Override + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); - if (par2 == 1) { - if (!this.mergeItemStack(itemstack1, 2, 38, true)) { - return null; - } + if (par2 == 1) { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) { + return null; + } - slot.onSlotChange(itemstack1, itemstack); - } else if (par2 != 0) { - if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) { - return null; - } - } else if (par2 >= 2 && par2 < 29) { - if (!this.mergeItemStack(itemstack1, 29, 38, false)) { - return null; - } - } else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { - return null; - } + slot.onSlotChange(itemstack1, itemstack); + } + else if (par2 != 0) { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) { + return null; + } + } + else if (par2 >= 2 && par2 < 29) { + if (!this.mergeItemStack(itemstack1, 29, 38, false)) { + return null; + } + } + else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 38, false)) { + return null; + } - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } + else { + slot.onSlotChanged(); + } - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } - return itemstack; - } + return itemstack; + } } diff --git a/src/main/java/tombenpotter/emt/client/gui/container/ContainerIndustrialWandRecharge.java b/src/main/java/tombenpotter/emt/client/gui/container/ContainerIndustrialWandRecharge.java index cb23171..a668475 100644 --- a/src/main/java/tombenpotter/emt/client/gui/container/ContainerIndustrialWandRecharge.java +++ b/src/main/java/tombenpotter/emt/client/gui/container/ContainerIndustrialWandRecharge.java @@ -10,73 +10,78 @@ import tombenpotter.emt.common.tile.TileEntityIndustrialWandRecharge; public class ContainerIndustrialWandRecharge extends Container { - TileEntityIndustrialWandRecharge charger; + TileEntityIndustrialWandRecharge charger; - public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) { - this.charger = entity; + public ContainerIndustrialWandRecharge(InventoryPlayer invPlayer, TileEntityIndustrialWandRecharge entity) { + this.charger = entity; - for (int x = 0; x < 9; x++) { - this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142)); - } + for (int x = 0; x < 9; x++) { + this.addSlotToContainer(new Slot(invPlayer, x, 8 + x * 18, 142)); + } - for (int y = 0; y < 3; y++) { - for (int x = 0; x < 9; x++) { - this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18)); - } - } + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + this.addSlotToContainer(new Slot(invPlayer, 9 + x + y * 9, 8 + x * 18, 84 + y * 18)); + } + } - this.addSlotToContainer(new Slot(charger, 0, 80, 35)); - } + this.addSlotToContainer(new Slot(charger, 0, 80, 35)); + } - @Override - public boolean canInteractWith(EntityPlayer player) { - return charger.isUseableByPlayer(player); - } + @Override + public boolean canInteractWith(EntityPlayer player) { + return charger.isUseableByPlayer(player); + } - @Override - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(par2); + @Override + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(par2); - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); - if (par2 == 1) { - if (!this.mergeItemStack(itemstack1, 2, 38, true)) { - return null; - } + if (par2 == 1) { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) { + return null; + } - slot.onSlotChange(itemstack1, itemstack); - } else if (par2 != 0) { - if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { - if (!this.mergeItemStack(itemstack1, 0, 1, false)) { - return null; - } - } else if (par2 >= 2 && par2 < 29) { - if (!this.mergeItemStack(itemstack1, 29, 38, false)) { - return null; - } - } else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { - return null; - } - } else if (!this.mergeItemStack(itemstack1, 2, 38, false)) { - return null; - } + slot.onSlotChange(itemstack1, itemstack); + } + else if (par2 != 0) { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) { + return null; + } + } + else if (par2 >= 2 && par2 < 29) { + if (!this.mergeItemStack(itemstack1, 29, 38, false)) { + return null; + } + } + else if (par2 >= 29 && par2 < 38 && !this.mergeItemStack(itemstack1, 2, 29, false)) { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 2, 38, false)) { + return null; + } - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } + else { + slot.onSlotChanged(); + } - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } - return itemstack; - } + return itemstack; + } } diff --git a/src/main/java/tombenpotter/emt/client/model/ModelCpecialArmor.java b/src/main/java/tombenpotter/emt/client/model/ModelCpecialArmor.java index 9fca981..a596be0 100644 --- a/src/main/java/tombenpotter/emt/client/model/ModelCpecialArmor.java +++ b/src/main/java/tombenpotter/emt/client/model/ModelCpecialArmor.java @@ -14,227 +14,213 @@ import net.minecraft.util.MathHelper; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) -public class ModelCpecialArmor extends ModelBiped -{ - public ModelRenderer bipedHead; - public ModelRenderer bipedBody; - public ModelRenderer bipedRightArm; - public ModelRenderer bipedLeftArm; - - public ModelRenderer rightWing; - public ModelRenderer leftWing; - public ModelRenderer center; - - public ModelRenderer jetpack; - - public boolean isJumping; - - public int type = 0;//0 - nothing, 1 - jetpack, 2 - wings - public int heldItemLeft; - public int heldItemRight; - public boolean isSneak; - public boolean aimedBow; +public class ModelCpecialArmor extends ModelBiped { + public ModelRenderer bipedHead; + public ModelRenderer bipedBody; + public ModelRenderer bipedRightArm; + public ModelRenderer bipedLeftArm; - public ModelCpecialArmor() - { - this(0.0F, 0); - } + public ModelRenderer rightWing; + public ModelRenderer leftWing; + public ModelRenderer center; - public ModelCpecialArmor(float p_i1148_1_, int type) - { - this(p_i1148_1_, 0.0F, 64, 32, type); - } + public ModelRenderer jetpack; - public ModelCpecialArmor(float p_i1149_1_, float p_i1149_2_, int p_i1149_3_, int p_i1149_4_, int type) - { - - this.type = type; - switch(this.type){ - case 1 : - this.textureWidth = 128; - this.textureHeight = 96; - this.jetpack = new ModelRenderer(this, 16, 69); - this.jetpack.setTextureSize(64, 48); - this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, p_i1149_1_ * 2); - this.jetpack.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); - break; - - case 2 : - this.textureWidth = 64; - this.textureHeight = 64; - rightWing = new ModelRenderer(this, 24, 0 + 32); - rightWing.addBox(-11F, -1F, 0F, 11, 13, 1); - rightWing.setRotationPoint(-2F, 0F, 3F); - rightWing.setTextureSize(64, 32); - rightWing.mirror = false; - setRotation(rightWing, 0F, 0.1570796F, 0F); + public boolean isJumping; - leftWing = new ModelRenderer(this, 0, 0 + 32); - leftWing.addBox(0F, -1F, 0F, 11, 13, 1); - leftWing.setRotationPoint(2F, 0F, 3F); - leftWing.setTextureSize(64, 32); - leftWing.mirror = true; - setRotation(leftWing, 0F, -0.1570796F, 0F); + public int type = 0;// 0 - nothing, 1 - jetpack, 2 - wings + public int heldItemLeft; + public int heldItemRight; + public boolean isSneak; + public boolean aimedBow; - center = new ModelRenderer(this, 0, 14 + 32); - center.addBox(0F, 0F, 1F, 8, 14, 1); - center.setRotationPoint(-4F, 0F, 3F); - center.setTextureSize(64, 32); - center.mirror = true; - setRotation(center, 0F, 0F, 0F); - break; - } - - this.bipedHead = new ModelRenderer(this, 0, 0); - this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, p_i1149_1_); - this.bipedHead.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); - this.bipedBody = new ModelRenderer(this, 16, 16); - this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, p_i1149_1_); - this.bipedBody.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); - this.bipedRightArm = new ModelRenderer(this, 40, 16); - this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, p_i1149_1_); - this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + p_i1149_2_, 0.0F); - this.bipedLeftArm = new ModelRenderer(this, 40, 16); - this.bipedLeftArm.mirror = true; - this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, p_i1149_1_); - this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + p_i1149_2_, 0.0F); - } - - private void setRotation (ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } + public ModelCpecialArmor() { + this(0.0F, 0); + } - public void render(Entity entity, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, entity); + public ModelCpecialArmor(float p_i1148_1_, int type) { + this(p_i1148_1_, 0.0F, 64, 32, type); + } - this.bipedBody.render(p_78088_7_); - this.bipedRightArm.render(p_78088_7_); - this.bipedLeftArm.render(p_78088_7_); - switch(this.type){ - case 1 : - this.jetpack.render(p_78088_7_); - break; - case 2 : - this.center.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - } - - } + public ModelCpecialArmor(float p_i1149_1_, float p_i1149_2_, int p_i1149_3_, int p_i1149_4_, int type) { - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) - { - EntityPlayer player = (EntityPlayer) entity; - if(player.inventory.getCurrentItem() != null) - this.heldItemRight = 1; - else - this.heldItemRight = 0; - this.bipedHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.bipedHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - this.bipedRightArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 2.0F * p_78087_2_ * 0.5F; - this.bipedLeftArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 2.0F * p_78087_2_ * 0.5F; - this.bipedRightArm.rotateAngleZ = 0.0F; - this.bipedLeftArm.rotateAngleZ = 0.0F; + this.type = type; + switch (this.type) { + case 1: + this.textureWidth = 128; + this.textureHeight = 96; + this.jetpack = new ModelRenderer(this, 16, 69); + this.jetpack.setTextureSize(64, 48); + this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, p_i1149_1_ * 2); + this.jetpack.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); + break; - if (entity.isRiding()) - { - this.bipedRightArm.rotateAngleX += -((float)Math.PI / 5F); - this.bipedLeftArm.rotateAngleX += -((float)Math.PI / 5F); - } - - if(isJumping){ - this.rightWing.rotateAngleY = 0.5f; - this.leftWing.rotateAngleY = -0.5f; - } + case 2: + this.textureWidth = 64; + this.textureHeight = 64; + rightWing = new ModelRenderer(this, 24, 0 + 32); + rightWing.addBox(-11F, -1F, 0F, 11, 13, 1); + rightWing.setRotationPoint(-2F, 0F, 3F); + rightWing.setTextureSize(64, 32); + rightWing.mirror = false; + setRotation(rightWing, 0F, 0.1570796F, 0F); - if (this.heldItemLeft != 0) - { - this.bipedLeftArm.rotateAngleX = this.bipedLeftArm.rotateAngleX * 0.5F - ((float)Math.PI / 10F) * (float)this.heldItemLeft; - } + leftWing = new ModelRenderer(this, 0, 0 + 32); + leftWing.addBox(0F, -1F, 0F, 11, 13, 1); + leftWing.setRotationPoint(2F, 0F, 3F); + leftWing.setTextureSize(64, 32); + leftWing.mirror = true; + setRotation(leftWing, 0F, -0.1570796F, 0F); - if (this.heldItemRight != 0) - { - this.bipedRightArm.rotateAngleX = this.bipedRightArm.rotateAngleX * 0.5F - ((float)Math.PI / 10F) * (float)this.heldItemRight; - } + center = new ModelRenderer(this, 0, 14 + 32); + center.addBox(0F, 0F, 1F, 8, 14, 1); + center.setRotationPoint(-4F, 0F, 3F); + center.setTextureSize(64, 32); + center.mirror = true; + setRotation(center, 0F, 0F, 0F); + break; + } - this.bipedRightArm.rotateAngleY = 0.0F; - this.bipedLeftArm.rotateAngleY = 0.0F; - float f6; - float f7; + this.bipedHead = new ModelRenderer(this, 0, 0); + this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, p_i1149_1_); + this.bipedHead.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); + this.bipedBody = new ModelRenderer(this, 16, 16); + this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, p_i1149_1_); + this.bipedBody.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); + this.bipedRightArm = new ModelRenderer(this, 40, 16); + this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, p_i1149_1_); + this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + p_i1149_2_, 0.0F); + this.bipedLeftArm = new ModelRenderer(this, 40, 16); + this.bipedLeftArm.mirror = true; + this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, p_i1149_1_); + this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + p_i1149_2_, 0.0F); + } - if (this.onGround > -9990.0F) - { - f6 = this.onGround; - this.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * (float)Math.PI * 2.0F) * 0.2F; - this.bipedRightArm.rotationPointZ = MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedRightArm.rotationPointX = -MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedLeftArm.rotationPointZ = -MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedLeftArm.rotationPointX = MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY; - this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY; - this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY; - f6 = 1.0F - this.onGround; - f6 *= f6; - f6 *= f6; - f6 = 1.0F - f6; - f7 = MathHelper.sin(f6 * (float)Math.PI); - float f8 = MathHelper.sin(this.onGround * (float)Math.PI) * -(this.bipedHead.rotateAngleX - 0.7F) * 0.75F; - this.bipedRightArm.rotateAngleX = (float)((double)this.bipedRightArm.rotateAngleX - ((double)f7 * 1.2D + (double)f8)); - this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY * 2.0F; - this.bipedRightArm.rotateAngleZ = MathHelper.sin(this.onGround * (float)Math.PI) * -0.4F; - } + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } - if (entity.isSneaking()) - { - this.bipedBody.rotateAngleX = 0.5F; - switch(this.type){ - case 1 : - this.jetpack.rotateAngleX = 0.5F; - break; - case 2 : - this.center.offsetY -= 0.1; - this.rightWing.offsetY -= 0.1; - this.leftWing.offsetY -= 0.1; - this.center.rotateAngleX = 0.5F; - this.rightWing.rotateAngleX = 0.5F; - this.leftWing.rotateAngleX = 0.5F; - break; - } - this.bipedRightArm.rotateAngleX += 0.4F; - this.bipedLeftArm.rotateAngleX += 0.4F; - this.bipedHead.rotationPointY = 1.0F; - } - else - { - this.bipedBody.rotateAngleX = 0.0F; - this.bipedHead.rotationPointY = 0.0F; - } + public void render(Entity entity, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, entity); - this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; - this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; - this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; - this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; + this.bipedBody.render(p_78088_7_); + this.bipedRightArm.render(p_78088_7_); + this.bipedLeftArm.render(p_78088_7_); + switch (this.type) { + case 1: + this.jetpack.render(p_78088_7_); + break; + case 2: + this.center.render(p_78088_7_); + this.leftWing.render(p_78088_7_); + this.rightWing.render(p_78088_7_); + } - if(player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemBow && player.isUsingItem()) - { - f6 = 0.0F; - f7 = 0.0F; - this.bipedRightArm.rotateAngleZ = 0.0F; - this.bipedLeftArm.rotateAngleZ = 0.0F; - this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + this.bipedHead.rotateAngleY; - this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F + this.bipedHead.rotateAngleY + 0.4F; - this.bipedRightArm.rotateAngleX = -((float)Math.PI / 2F) + this.bipedHead.rotateAngleX; - this.bipedLeftArm.rotateAngleX = -((float)Math.PI / 2F) + this.bipedHead.rotateAngleX; - this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; - this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; - this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; - this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; - } - } + } + + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) { + EntityPlayer player = (EntityPlayer) entity; + if (player.inventory.getCurrentItem() != null) + this.heldItemRight = 1; + else + this.heldItemRight = 0; + this.bipedHead.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); + this.bipedHead.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); + this.bipedRightArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float) Math.PI) * 2.0F * p_78087_2_ * 0.5F; + this.bipedLeftArm.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 2.0F * p_78087_2_ * 0.5F; + this.bipedRightArm.rotateAngleZ = 0.0F; + this.bipedLeftArm.rotateAngleZ = 0.0F; + + if (entity.isRiding()) { + this.bipedRightArm.rotateAngleX += -((float) Math.PI / 5F); + this.bipedLeftArm.rotateAngleX += -((float) Math.PI / 5F); + } + + if (isJumping) { + this.rightWing.rotateAngleY = 0.5f; + this.leftWing.rotateAngleY = -0.5f; + } + + if (this.heldItemLeft != 0) { + this.bipedLeftArm.rotateAngleX = this.bipedLeftArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemLeft; + } + + if (this.heldItemRight != 0) { + this.bipedRightArm.rotateAngleX = this.bipedRightArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemRight; + } + + this.bipedRightArm.rotateAngleY = 0.0F; + this.bipedLeftArm.rotateAngleY = 0.0F; + float f6; + float f7; + + if (this.onGround > -9990.0F) { + f6 = this.onGround; + this.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * (float) Math.PI * 2.0F) * 0.2F; + this.bipedRightArm.rotationPointZ = MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; + this.bipedRightArm.rotationPointX = -MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; + this.bipedLeftArm.rotationPointZ = -MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; + this.bipedLeftArm.rotationPointX = MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; + this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY; + this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY; + this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY; + f6 = 1.0F - this.onGround; + f6 *= f6; + f6 *= f6; + f6 = 1.0F - f6; + f7 = MathHelper.sin(f6 * (float) Math.PI); + float f8 = MathHelper.sin(this.onGround * (float) Math.PI) * -(this.bipedHead.rotateAngleX - 0.7F) * 0.75F; + this.bipedRightArm.rotateAngleX = (float) ((double) this.bipedRightArm.rotateAngleX - ((double) f7 * 1.2D + (double) f8)); + this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY * 2.0F; + this.bipedRightArm.rotateAngleZ = MathHelper.sin(this.onGround * (float) Math.PI) * -0.4F; + } + + if (entity.isSneaking()) { + this.bipedBody.rotateAngleX = 0.5F; + switch (this.type) { + case 1: + this.jetpack.rotateAngleX = 0.5F; + break; + case 2: + this.center.offsetY -= 0.1; + this.rightWing.offsetY -= 0.1; + this.leftWing.offsetY -= 0.1; + this.center.rotateAngleX = 0.5F; + this.rightWing.rotateAngleX = 0.5F; + this.leftWing.rotateAngleX = 0.5F; + break; + } + this.bipedRightArm.rotateAngleX += 0.4F; + this.bipedLeftArm.rotateAngleX += 0.4F; + this.bipedHead.rotationPointY = 1.0F; + } + else { + this.bipedBody.rotateAngleX = 0.0F; + this.bipedHead.rotationPointY = 0.0F; + } + + this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; + this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; + this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; + this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; + + if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemBow && player.isUsingItem()) { + f6 = 0.0F; + f7 = 0.0F; + this.bipedRightArm.rotateAngleZ = 0.0F; + this.bipedLeftArm.rotateAngleZ = 0.0F; + this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + this.bipedHead.rotateAngleY; + this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F + this.bipedHead.rotateAngleY + 0.4F; + this.bipedRightArm.rotateAngleX = -((float) Math.PI / 2F) + this.bipedHead.rotateAngleX; + this.bipedLeftArm.rotateAngleX = -((float) Math.PI / 2F) + this.bipedHead.rotateAngleX; + this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; + this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; + this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; + this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F; + this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; + this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F; + } + } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/client/model/ModelWings.java b/src/main/java/tombenpotter/emt/client/model/ModelWings.java index 670ed58..5ba6d8e 100644 --- a/src/main/java/tombenpotter/emt/client/model/ModelWings.java +++ b/src/main/java/tombenpotter/emt/client/model/ModelWings.java @@ -8,71 +8,70 @@ import net.minecraft.util.MathHelper; public class ModelWings extends ModelBiped { - ModelRenderer rightWing; - ModelRenderer leftWing; - ModelRenderer center; - - public boolean isJumping = false; + ModelRenderer rightWing; + ModelRenderer leftWing; + ModelRenderer center; - public ModelWings() { - textureWidth = 64; - textureHeight = 64; + public boolean isJumping = false; - rightWing = new ModelRenderer(this, 24, 0); - rightWing.addBox(-11F, -1F, -1.5F, 11, 13, 1); - rightWing.setRotationPoint(-2F, 0F, 3F); - rightWing.setTextureSize(64, 32); - rightWing.mirror = false; - setRotation(rightWing, 0F, 0.1570796F, 0F); + public ModelWings() { + textureWidth = 64; + textureHeight = 64; - leftWing = new ModelRenderer(this, 0, 0); - leftWing.addBox(0F, -1F, -1.5F, 11, 13, 1); - leftWing.setRotationPoint(2F, 0F, 3F); - leftWing.setTextureSize(64, 32); - leftWing.mirror = true; - setRotation(leftWing, 0F, -0.1570796F, 0F); + rightWing = new ModelRenderer(this, 24, 0); + rightWing.addBox(-11F, -1F, -1.5F, 11, 13, 1); + rightWing.setRotationPoint(-2F, 0F, 3F); + rightWing.setTextureSize(64, 32); + rightWing.mirror = false; + setRotation(rightWing, 0F, 0.1570796F, 0F); - center = new ModelRenderer(this, 0, 14); - center.addBox(0F, 0F, -0.5F, 8, 14, 1); - center.setRotationPoint(-4F, 0F, 3F); - center.setTextureSize(64, 32); - center.mirror = true; - setRotation(center, 0F, 0F, 0F); + leftWing = new ModelRenderer(this, 0, 0); + leftWing.addBox(0F, -1F, -1.5F, 11, 13, 1); + leftWing.setRotationPoint(2F, 0F, 3F); + leftWing.setTextureSize(64, 32); + leftWing.mirror = true; + setRotation(leftWing, 0F, -0.1570796F, 0F); - this.bipedBody.addChild(rightWing); - this.bipedBody.addChild(leftWing); - this.bipedBody.addChild(center); - } + center = new ModelRenderer(this, 0, 14); + center.addBox(0F, 0F, -0.5F, 8, 14, 1); + center.setRotationPoint(-4F, 0F, 3F); + center.setTextureSize(64, 32); + center.mirror = true; + setRotation(center, 0F, 0F, 0F); - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - rightWing.render(f5); - leftWing.render(f5); - center.render(f5); - } + this.bipedBody.addChild(rightWing); + this.bipedBody.addChild(leftWing); + this.bipedBody.addChild(center); + } - private void setRotation (ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity){ + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + rightWing.render(f5); + leftWing.render(f5); + center.render(f5); + } - if(isJumping){ - this.rightWing.rotateAngleY = 0.5f; - this.leftWing.rotateAngleY = -0.5f; - } - - if(entity.isSneaking()){ - this.center.offsetY -= 0.1; - this.rightWing.offsetY -= 0.1; - this.leftWing.offsetY -= 0.1; - this.center.rotateAngleX = 0.5F; - this.rightWing.rotateAngleX = 0.5F; - this.leftWing.rotateAngleX = 0.5F; - } - } + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) { + + if (isJumping) { + this.rightWing.rotateAngleY = 0.5f; + this.leftWing.rotateAngleY = -0.5f; + } + + if (entity.isSneaking()) { + this.center.offsetY -= 0.1; + this.rightWing.offsetY -= 0.1; + this.leftWing.offsetY -= 0.1; + this.center.rotateAngleX = 0.5F; + this.rightWing.rotateAngleX = 0.5F; + this.leftWing.rotateAngleX = 0.5F; + } + } } diff --git a/src/main/java/tombenpotter/emt/client/renderer/RenderLaser.java b/src/main/java/tombenpotter/emt/client/renderer/RenderLaser.java index c6e85e7..603ce8b 100644 --- a/src/main/java/tombenpotter/emt/client/renderer/RenderLaser.java +++ b/src/main/java/tombenpotter/emt/client/renderer/RenderLaser.java @@ -11,70 +11,70 @@ import tombenpotter.emt.common.entities.EntityLaser; public class RenderLaser extends Render { - private static final ResourceLocation laserTexture = new ResourceLocation(ModInformation.texturePath, "textures/models/lasermodel.png"); + private static final ResourceLocation laserTexture = new ResourceLocation(ModInformation.texturePath, "textures/models/lasermodel.png"); - public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) { + public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) { - this.bindEntityTexture(entityLaser); - GL11.glPushMatrix(); - GL11.glTranslatef((float) par2, (float) par4, (float) par6); - GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F); - Tessellator tessellator = Tessellator.instance; - byte b0 = 0; - float f2 = 0.4F; - float f3 = 0.7F; - float f4 = (float) (0 + b0 * 10) / 32.0F; - float f5 = (float) (5 + b0 * 10) / 32.0F; - float f6 = 0.0F; - float f7 = 0.15625F; - float f8 = (float) (5 + b0 * 10) / 32.0F; - float f9 = (float) (10 + b0 * 10) / 32.0F; - float f10 = 0.05625F; - GL11.glEnable(GL12.GL_RESCALE_NORMAL); + this.bindEntityTexture(entityLaser); + GL11.glPushMatrix(); + GL11.glTranslatef((float) par2, (float) par4, (float) par6); + GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F); + Tessellator tessellator = Tessellator.instance; + byte b0 = 0; + float f2 = 0.4F; + float f3 = 0.7F; + float f4 = (float) (0 + b0 * 10) / 32.0F; + float f5 = (float) (5 + b0 * 10) / 32.0F; + float f6 = 0.0F; + float f7 = 0.15625F; + float f8 = (float) (5 + b0 * 10) / 32.0F; + float f9 = (float) (10 + b0 * 10) / 32.0F; + float f10 = 0.05625F; + GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); - GL11.glScalef(f10, f10, f10); - GL11.glTranslatef(-4.0F, 0.0F, 0.0F); - GL11.glNormal3f(f10, 0.0F, 0.0F); - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8); - tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8); - tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9); - tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9); - tessellator.draw(); - GL11.glNormal3f(-f10, 0.0F, 0.0F); - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8); - tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8); - tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9); - tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9); - tessellator.draw(); + GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); + GL11.glScalef(f10, f10, f10); + GL11.glTranslatef(-4.0F, 0.0F, 0.0F); + GL11.glNormal3f(f10, 0.0F, 0.0F); + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8); + tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8); + tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9); + tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9); + tessellator.draw(); + GL11.glNormal3f(-f10, 0.0F, 0.0F); + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8); + tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8); + tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9); + tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9); + tessellator.draw(); - for (int i = 0; i < 4; ++i) { - GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); - GL11.glNormal3f(0.0F, 0.0F, f10); - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4); - tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4); - tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5); - tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5); - tessellator.draw(); - } + for (int i = 0; i < 4; ++i) { + GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); + GL11.glNormal3f(0.0F, 0.0F, f10); + tessellator.startDrawingQuads(); + tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4); + tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4); + tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5); + tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5); + tessellator.draw(); + } - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } - protected ResourceLocation getArrowTextures(EntityLaser entityLaser) { - return laserTexture; - } + protected ResourceLocation getArrowTextures(EntityLaser entityLaser) { + return laserTexture; + } - protected ResourceLocation getEntityTexture(Entity par1Entity) { - return this.getArrowTextures((EntityLaser) par1Entity); - } + protected ResourceLocation getEntityTexture(Entity par1Entity) { + return this.getArrowTextures((EntityLaser) par1Entity); + } - public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { - this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9); - } + public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { + this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9); + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java b/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java index 0ed801b..00b7a82 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockBase.java @@ -7,20 +7,20 @@ import tombenpotter.emt.ModInformation; public abstract class BlockBase extends Block { - public BlockBase(String unlocName, Material material, String textureName, SoundType soundType, float hardness) { - super(material); - setBlockName(ModInformation.modid + ".block." + unlocName); - setBlockTextureName(ModInformation.texturePath + ":" + textureName); - setCreativeTab(ElectroMagicTools.tabEMT); - setStepSound(soundType); - setHardness(hardness); - } + public BlockBase(String unlocName, Material material, String textureName, SoundType soundType, float hardness) { + super(material); + setBlockName(ModInformation.modid + ".block." + unlocName); + setBlockTextureName(ModInformation.texturePath + ":" + textureName); + setCreativeTab(ElectroMagicTools.tabEMT); + setStepSound(soundType); + setHardness(hardness); + } - public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) { - super(material); - setBlockName(ModInformation.modid + ".block." + unlocName); - setCreativeTab(ElectroMagicTools.tabEMT); - setStepSound(soundType); - setHardness(hardness); - } + public BlockBase(String unlocName, Material material, SoundType soundType, float hardness) { + super(material); + setBlockName(ModInformation.modid + ".block." + unlocName); + setCreativeTab(ElectroMagicTools.tabEMT); + setStepSound(soundType); + setHardness(hardness); + } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockBaseContainer.java b/src/main/java/tombenpotter/emt/common/blocks/BlockBaseContainer.java index 7e90c6a..fe64e2a 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockBaseContainer.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockBaseContainer.java @@ -17,76 +17,80 @@ import tombenpotter.emt.common.tile.TileEntityEMT; public abstract class BlockBaseContainer extends BlockContainer { - public IIcon[] top = new IIcon[16]; - public IIcon[] bottom = new IIcon[16]; - public IIcon[] side = new IIcon[16]; - public IIcon[] frontOff = new IIcon[16]; - public IIcon[] frontOn = new IIcon[16]; + public IIcon[] top = new IIcon[16]; + public IIcon[] bottom = new IIcon[16]; + public IIcon[] side = new IIcon[16]; + public IIcon[] frontOff = new IIcon[16]; + public IIcon[] frontOn = new IIcon[16]; - public BlockBaseContainer(String unlocName, Material material, SoundType soundType, float hardness) { - super(material); + public BlockBaseContainer(String unlocName, Material material, SoundType soundType, float hardness) { + super(material); - setBlockName(ModInformation.modid + ".module.base." + unlocName); - setCreativeTab(ElectroMagicTools.tabEMT); - setStepSound(soundType); - setHardness(hardness); - } + setBlockName(ModInformation.modid + ".module.base." + unlocName); + setCreativeTab(ElectroMagicTools.tabEMT); + setStepSound(soundType); + setHardness(hardness); + } - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - return null; - } + @Override + public TileEntity createNewTileEntity(World var1, int var2) { + return null; + } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { - TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); - int i = access.getBlockMetadata(x, y, z); + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { + TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); + int i = access.getBlockMetadata(x, y, z); - if (side == 0) { - return this.bottom[i]; - } else if (side == 1) { - return this.top[i]; - } else if (side != tile.facing) { - return this.side[i]; - } else if (tile.isOn) { - return this.frontOn[i]; - } else { - return this.frontOff[i]; - } - } + if (side == 0) { + return this.bottom[i]; + } + else if (side == 1) { + return this.top[i]; + } + else if (side != tile.facing) { + return this.side[i]; + } + else if (tile.isOn) { + return this.frontOn[i]; + } + else { + return this.frontOff[i]; + } + } - @Override - public IIcon getIcon(int side, int meta) { - if (side < 1) { - return this.bottom[meta]; - } - if (side == 1) { - return this.top[meta]; - } - if (side == 3) { - return this.frontOff[meta]; - } - return this.side[meta]; - } + @Override + public IIcon getIcon(int side, int meta) { + if (side < 1) { + return this.bottom[meta]; + } + if (side == 1) { + return this.top[meta]; + } + if (side == 3) { + return this.frontOff[meta]; + } + return this.side[meta]; + } - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { - int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; - TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { + int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); - if (facing == 0) - tile.facing = 2; - else if (facing == 1) - tile.facing = 5; - else if (facing == 2) - tile.facing = 3; - else if (facing == 3) - tile.facing = 4; - } + if (facing == 0) + tile.facing = 2; + else if (facing == 1) + tile.facing = 5; + else if (facing == 2) + tile.facing = 3; + else if (facing == 3) + tile.facing = 4; + } - @Override - public int damageDropped(int meta) { - return meta; - } + @Override + public int damageDropped(int meta) { + return meta; + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEMT.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEMT.java index ee978a5..741765a 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEMT.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEMT.java @@ -14,69 +14,73 @@ import net.minecraft.world.World; import tombenpotter.emt.common.tile.TileEntityEMT; public abstract class BlockEMT extends BlockContainer { - public IIcon[] top = new IIcon[16]; - public IIcon[] bottom = new IIcon[16]; - public IIcon[] side = new IIcon[16]; - public IIcon[] frontOff = new IIcon[16]; - public IIcon[] frontOn = new IIcon[16]; + public IIcon[] top = new IIcon[16]; + public IIcon[] bottom = new IIcon[16]; + public IIcon[] side = new IIcon[16]; + public IIcon[] frontOff = new IIcon[16]; + public IIcon[] frontOn = new IIcon[16]; - protected BlockEMT(Material material) { - super(material); - } + protected BlockEMT(Material material) { + super(material); + } - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - return null; - } + @Override + public TileEntity createNewTileEntity(World var1, int var2) { + return null; + } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { - TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); - int i = access.getBlockMetadata(x, y, z); - if (side == 0) { - return this.bottom[i]; - } else if (side == 1) { - return this.top[i]; - } else if (side != tile.facing) { - return this.side[i]; - } else if (tile.isOn) { - return this.frontOn[i]; - } else { - return this.frontOff[i]; - } - } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { + TileEntityEMT tile = (TileEntityEMT) access.getTileEntity(x, y, z); + int i = access.getBlockMetadata(x, y, z); + if (side == 0) { + return this.bottom[i]; + } + else if (side == 1) { + return this.top[i]; + } + else if (side != tile.facing) { + return this.side[i]; + } + else if (tile.isOn) { + return this.frontOn[i]; + } + else { + return this.frontOff[i]; + } + } - @Override - public IIcon getIcon(int side, int meta) { - if (side < 1) { - return this.bottom[meta]; - } - if (side == 1) { - return this.top[meta]; - } - if (side == 3) { - return this.frontOff[meta]; - } - return this.side[meta]; - } + @Override + public IIcon getIcon(int side, int meta) { + if (side < 1) { + return this.bottom[meta]; + } + if (side == 1) { + return this.top[meta]; + } + if (side == 3) { + return this.frontOff[meta]; + } + return this.side[meta]; + } - @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { - int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; - TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); - if (facing == 0) - tile.facing = 2; - else if (facing == 1) - tile.facing = 5; - else if (facing == 2) - tile.facing = 3; - else if (facing == 3) - tile.facing = 4; - } + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) { + int facing = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + TileEntityEMT tile = (TileEntityEMT) world.getTileEntity(x, y, z); + if (facing == 0) + tile.facing = 2; + else if (facing == 1) + tile.facing = 5; + else if (facing == 2) + tile.facing = 3; + else if (facing == 3) + tile.facing = 4; + } - @Override - public int damageDropped(int meta) { - return meta; - } + @Override + public int damageDropped(int meta) { + return meta; + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTMachines.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTMachines.java index 5252b1d..56b8f7d 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTMachines.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTMachines.java @@ -24,96 +24,96 @@ import java.util.Random; public class BlockEMTMachines extends BlockEMT { - public BlockEMTMachines() { - super(Material.iron); - } + public BlockEMTMachines() { + super(Material.iron); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - this.blockIcon = ir.registerIcon(ModInformation.texturePath + ":machines/top"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + this.blockIcon = ir.registerIcon(ModInformation.texturePath + ":machines/top"); - this.top[0] = ir.registerIcon(ModInformation.texturePath + ":machines/top"); - this.top[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratortop"); + this.top[0] = ir.registerIcon(ModInformation.texturePath + ":machines/top"); + this.top[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratortop"); - this.bottom[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side"); - this.bottom[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator"); + this.bottom[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side"); + this.bottom[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator"); - this.side[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side"); - this.side[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator"); + this.side[0] = ir.registerIcon(ModInformation.texturePath + ":machines/side"); + this.side[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmacerator"); - this.frontOff[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger"); - this.frontOff[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfront"); + this.frontOff[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger"); + this.frontOff[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfront"); - this.frontOn[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger"); - this.frontOn[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfrontactive"); - } + this.frontOn[0] = ir.registerIcon(ModInformation.texturePath + ":machines/wandcharger"); + this.frontOn[1] = ir.registerIcon(ModInformation.texturePath + ":machines/etherealmaceratorfrontactive"); + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - list.add(new ItemStack(id, 1, 0)); - list.add(new ItemStack(id, 1, 1)); - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + list.add(new ItemStack(id, 1, 0)); + list.add(new ItemStack(id, 1, 1)); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityIndustrialWandRecharge(); - } - if (meta == 1) { - return new TileEntityEtherealMacerator(); - } - return super.createTileEntity(world, meta); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 0) { + return new TileEntityIndustrialWandRecharge(); + } + if (meta == 1) { + return new TileEntityEtherealMacerator(); + } + return super.createTileEntity(world, meta); + } - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { - if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) { - player.openGui(ElectroMagicTools.instance, 0, world, x, y, z); - } else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { - player.openGui(ElectroMagicTools.instance, 1, world, x, y, z); - } - return true; - } + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { + if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityIndustrialWandRecharge) { + player.openGui(ElectroMagicTools.instance, 0, world, x, y, z); + } + else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { + player.openGui(ElectroMagicTools.instance, 1, world, x, y, z); + } + return true; + } - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - dropItems(world, x, y, z); - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, par5, par6); - } + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { + dropItems(world, x, y, z); + world.removeTileEntity(x, y, z); + super.breakBlock(world, x, y, z, par5, par6); + } - private void dropItems(World world, int x, int y, int z) { - Random rand = new Random(); + private void dropItems(World world, int x, int y, int z) { + Random rand = new Random(); - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (!(tileEntity instanceof IInventory)) { - return; - } - IInventory inventory = (IInventory) tileEntity; + TileEntity tileEntity = world.getTileEntity(x, y, z); + if (!(tileEntity instanceof IInventory)) { + return; + } + IInventory inventory = (IInventory) tileEntity; - for (int i = 0; i < inventory.getSizeInventory(); i++) { - ItemStack item = inventory.getStackInSlot(i); + for (int i = 0; i < inventory.getSizeInventory(); i++) { + ItemStack item = inventory.getStackInSlot(i); - if (item != null && item.stackSize > 0) { - float rx = rand.nextFloat() * 0.8F + 0.1F; - float ry = rand.nextFloat() * 0.8F + 0.1F; - float rz = rand.nextFloat() * 0.8F + 0.1F; + if (item != null && item.stackSize > 0) { + float rx = rand.nextFloat() * 0.8F + 0.1F; + float ry = rand.nextFloat() * 0.8F + 0.1F; + float rz = rand.nextFloat() * 0.8F + 0.1F; - EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); + EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.getItem(), item.stackSize, item.getItemDamage())); - if (item.hasTagCompound()) { - entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); - } + if (item.hasTagCompound()) { + entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); + } - float factor = 0.05F; - entityItem.motionX = rand.nextGaussian() * factor; - entityItem.motionY = rand.nextGaussian() * factor + 0.2F; - entityItem.motionZ = rand.nextGaussian() * factor; - world.spawnEntityInWorld(entityItem); - item.stackSize = 0; - } - } - } + float factor = 0.05F; + entityItem.motionX = rand.nextGaussian() * factor; + entityItem.motionY = rand.nextGaussian() * factor + 0.2F; + entityItem.motionZ = rand.nextGaussian() * factor; + world.spawnEntityInWorld(entityItem); + item.stackSize = 0; + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars.java index 956d079..628ea44 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars.java @@ -32,146 +32,146 @@ import java.util.List; public class BlockEMTSolars extends BlockBaseContainer { - public BlockEMTSolars() { - super("solars", Material.iron, soundTypeMetal, 4.0F); - } + public BlockEMTSolars() { + super("solars", Material.iron, soundTypeMetal, 4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[5] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.top[6] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[7] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[8] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.top[9] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[10] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[11] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.top[12] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[13] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[14] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.top[15] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[5] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + this.top[6] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[7] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[8] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + this.top[9] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[10] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[11] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + this.top[12] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[13] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[14] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + this.top[15] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[5] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[6] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[7] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[8] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[9] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[10] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[11] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[12] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[13] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[14] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[15] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[5] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[6] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[7] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[8] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[9] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[10] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[11] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[12] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[13] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[14] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[15] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.frontOff[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.frontOff[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.frontOff[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.frontOff[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.frontOff[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.frontOff[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.frontOff[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.frontOff[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.frontOff[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.frontOff[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.frontOff[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.frontOff[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.frontOff[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.frontOff[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.frontOff[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.frontOff[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.frontOff[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.frontOff[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.frontOff[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.frontOff[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.frontOff[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.frontOff[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); - this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.side[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); - this.side[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.side[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.side[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); - this.side[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.side[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.side[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); - this.side[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.side[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.side[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); - this.side[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - } + this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/side"); + this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.side[5] = ri.registerIcon(ModInformation.texturePath + ":solars/water/waterside"); + this.side[6] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.side[7] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.side[8] = ri.registerIcon(ModInformation.texturePath + ":solars/dark/darkside"); + this.side[9] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.side[10] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.side[11] = ri.registerIcon(ModInformation.texturePath + ":solars/order/orderside"); + this.side[12] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.side[13] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.side[14] = ri.registerIcon(ModInformation.texturePath + ":solars/fire/fireside"); + this.side[15] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + } - @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked", "rawtypes"}) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - for (int i = 0; i <= 15; i++) { - list.add(new ItemStack(id, 1, i)); - } - } + @SideOnly(Side.CLIENT) + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + for (int i = 0; i <= 15; i++) { + list.add(new ItemStack(id, 1, i)); + } + } - @Override - public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityCompressedSolar(); - } - if (meta == 1) { - return new TileEntityDoubleCompressedSolar(); - } - if (meta == 2) { - return new TileEntityTripleCompressedSolar(); - } - if (meta == 3) { - return new TileEntityWaterSolar(); - } - if (meta == 4) { - return new TileEntityDoubleWaterSolar(); - } - if (meta == 5) { - return new TileEntityTripleWaterSolar(); - } - if (meta == 6) { - return new TileEntityDarkSolar(); - } - if (meta == 7) { - return new TileEntityDoubleDarkSolar(); - } - if (meta == 8) { - return new TileEntityTripleDarkSolar(); - } - if (meta == 9) { - return new TileEntityOrderSolar(); - } - if (meta == 10) { - return new TileEntityDoubleOrderSolar(); - } - if (meta == 11) { - return new TileEntityTripleOrderSolar(); - } - if (meta == 12) { - return new TileEntityFireSolar(); - } - if (meta == 13) { - return new TileEntityDoubleFireSolar(); - } - if (meta == 14) { - return new TileEntityTripleFireSolar(); - } - if (meta == 15) { - return new TileEntityAirSolar(); - } - return super.createTileEntity(world, meta); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 0) { + return new TileEntityCompressedSolar(); + } + if (meta == 1) { + return new TileEntityDoubleCompressedSolar(); + } + if (meta == 2) { + return new TileEntityTripleCompressedSolar(); + } + if (meta == 3) { + return new TileEntityWaterSolar(); + } + if (meta == 4) { + return new TileEntityDoubleWaterSolar(); + } + if (meta == 5) { + return new TileEntityTripleWaterSolar(); + } + if (meta == 6) { + return new TileEntityDarkSolar(); + } + if (meta == 7) { + return new TileEntityDoubleDarkSolar(); + } + if (meta == 8) { + return new TileEntityTripleDarkSolar(); + } + if (meta == 9) { + return new TileEntityOrderSolar(); + } + if (meta == 10) { + return new TileEntityDoubleOrderSolar(); + } + if (meta == 11) { + return new TileEntityTripleOrderSolar(); + } + if (meta == 12) { + return new TileEntityFireSolar(); + } + if (meta == 13) { + return new TileEntityDoubleFireSolar(); + } + if (meta == 14) { + return new TileEntityTripleFireSolar(); + } + if (meta == 15) { + return new TileEntityAirSolar(); + } + return super.createTileEntity(world, meta); + } - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, par5, par6); - } + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { + world.removeTileEntity(x, y, z); + super.breakBlock(world, x, y, z, par5, par6); + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars2.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars2.java index 4f3203b..fd7a4d4 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars2.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEMTSolars2.java @@ -21,69 +21,68 @@ import java.util.List; public class BlockEMTSolars2 extends BlockBaseContainer { - public BlockEMTSolars2() { - super("solars.2", Material.iron, soundTypeMetal, 4.0F); - } + public BlockEMTSolars2() { + super("solars.2", Material.iron, soundTypeMetal, 4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); - this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); - this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.top[0] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[1] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[2] = ri.registerIcon(ModInformation.texturePath + ":solars/solartop"); + this.top[3] = ri.registerIcon(ModInformation.texturePath + ":solars/doublesolartop"); + this.top[4] = ri.registerIcon(ModInformation.texturePath + ":solars/triplesolartop"); - this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[0] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[1] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[2] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[3] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); + this.bottom[4] = ri.registerIcon(ModInformation.texturePath + ":solars/bottom"); - this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); - this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); - } + this.side[0] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + this.side[1] = ri.registerIcon(ModInformation.texturePath + ":solars/air/airside"); + this.side[2] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + this.side[3] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + this.side[4] = ri.registerIcon(ModInformation.texturePath + ":solars/earth/earthside"); + } - @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked", "rawtypes"}) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - for (int i = 0; i <= 4; i++) { - list.add(new ItemStack(id, 1, i)); - } - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + for (int i = 0; i <= 4; i++) { + list.add(new ItemStack(id, 1, i)); + } + } - @Override - public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityDoubleAirSolar(); - } - if (meta == 1) { - return new TileEntityTripleAirSolar(); - } - if (meta == 2) { - return new TileEntityEarthSolar(); - } - if (meta == 3) { - return new TileEntityDoubleEarthSolar(); - } - if (meta == 4) { - return new TileEntityTripleEarthSolar(); - } - return super.createTileEntity(world, meta); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 0) { + return new TileEntityDoubleAirSolar(); + } + if (meta == 1) { + return new TileEntityTripleAirSolar(); + } + if (meta == 2) { + return new TileEntityEarthSolar(); + } + if (meta == 3) { + return new TileEntityDoubleEarthSolar(); + } + if (meta == 4) { + return new TileEntityTripleEarthSolar(); + } + return super.createTileEntity(world, meta); + } - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - world.removeTileEntity(x, y, z); - super.breakBlock(world, x, y, z, par5, par6); - } + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { + world.removeTileEntity(x, y, z); + super.breakBlock(world, x, y, z, par5, par6); + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java b/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java index 55ee565..461c2b0 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockEssentiaGenerators.java @@ -17,58 +17,62 @@ import java.util.Random; public class BlockEssentiaGenerators extends BlockBaseContainer { - public BlockEssentiaGenerators() { - super("generator.essentia.2", Material.iron, soundTypeMetal, 4.0F); - } + public BlockEssentiaGenerators() { + super("generator.essentia.2", Material.iron, soundTypeMetal, 4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.blockIcon = ri.registerIcon(ModInformation.texturePath + ":machines/top"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.blockIcon = ri.registerIcon(ModInformation.texturePath + ":machines/top"); - for (int i = 0; i <= 5; i++) { - this.top[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); - } + for (int i = 0; i <= 5; i++) { + this.top[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); + } - for (int i = 0; i <= 5; i++) { - this.bottom[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); - } + for (int i = 0; i <= 5; i++) { + this.bottom[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/top"); + } - for (int i = 0; i <= 5; i++) { - this.side[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/side"); - } + for (int i = 0; i <= 5; i++) { + this.side[i] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/side"); + } - this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/potentiafront"); - this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/ignisfront"); - this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/auramfront"); - this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/arborfront"); - this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/aerfront"); - } + this.frontOff[0] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/potentiafront"); + this.frontOff[1] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/ignisfront"); + this.frontOff[2] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/auramfront"); + this.frontOff[3] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/arborfront"); + this.frontOff[4] = ri.registerIcon(ModInformation.texturePath + ":essentiagenerator/aerfront"); + } - @SuppressWarnings({"unchecked", "rawtypes"}) - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item id, CreativeTabs tab, List list) { - list.add(new ItemStack(id, 1, 0)); - list.add(new ItemStack(id, 1, 1)); - list.add(new ItemStack(id, 1, 2)); - list.add(new ItemStack(id, 1, 3)); - list.add(new ItemStack(id, 1, 4)); - } + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + list.add(new ItemStack(id, 1, 0)); + list.add(new ItemStack(id, 1, 1)); + list.add(new ItemStack(id, 1, 2)); + list.add(new ItemStack(id, 1, 3)); + list.add(new ItemStack(id, 1, 4)); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - switch(meta){ - case 0 : return new TileEntityPotentiaGenerator(); - case 1 : return new TileEntityIgnisGenerator(); - case 2 : return new TileEntityAuramGenerator(); - case 3 : return new TileEntityArborGenerator(); - case 4 : return new TileEntityAerGenerator(); - } - return super.createTileEntity(world, meta); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + switch (meta) { + case 0: + return new TileEntityPotentiaGenerator(); + case 1: + return new TileEntityIgnisGenerator(); + case 2: + return new TileEntityAuramGenerator(); + case 3: + return new TileEntityArborGenerator(); + case 4: + return new TileEntityAerGenerator(); + } + return super.createTileEntity(world, meta); + } - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random random) { - world.spawnParticle("largesmoke", x + 0.5f, y + 1.0f, z + 0.5f, 0.0D, 0.0D, 0.0D); - } + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + world.spawnParticle("largesmoke", x + 0.5f, y + 1.0f, z + 0.5f, 0.0D, 0.0D, 0.0D); + } } diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockPortableNode.java b/src/main/java/tombenpotter/emt/common/blocks/BlockPortableNode.java index 0bfd7df..f23dcd6 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockPortableNode.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockPortableNode.java @@ -72,7 +72,6 @@ public class BlockPortableNode extends BlockAiry { return this.texture[0]; } - @SuppressWarnings({"rawtypes", "unchecked"}) @SideOnly(Side.CLIENT) public void getSubBlocks(Item id, CreativeTabs tab, List list) { list.add(new ItemStack(id, 1, 0)); diff --git a/src/main/java/tombenpotter/emt/common/blocks/BlockShield.java b/src/main/java/tombenpotter/emt/common/blocks/BlockShield.java index f1f3f5a..e852ebd 100644 --- a/src/main/java/tombenpotter/emt/common/blocks/BlockShield.java +++ b/src/main/java/tombenpotter/emt/common/blocks/BlockShield.java @@ -17,61 +17,61 @@ import java.util.Random; public class BlockShield extends Block { - public BlockShield() { - super(Material.rock); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setHardness(1F); - this.setResistance(10000000000000000000000000000000000000F); - } + public BlockShield() { + super(Material.rock); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setHardness(1F); + this.setResistance(10000000000000000000000000000000000000F); + } - @Override - public int quantityDropped(Random par1Random) { - return 0; - } + @Override + public int quantityDropped(Random par1Random) { + return 0; + } - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 0; - } + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 0; + } - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister iconRegister) { - this.blockIcon = iconRegister.registerIcon(ModInformation.texturePath + ":shield"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister iconRegister) { + this.blockIcon = iconRegister.registerIcon(ModInformation.texturePath + ":shield"); + } - @Override - public boolean isOpaqueCube() { - return false; - } + @Override + public boolean isOpaqueCube() { + return false; + } - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } - @Override - protected boolean canSilkHarvest() { - return false; - } + @Override + protected boolean canSilkHarvest() { + return false; + } - @Override - public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { - return false; - } + @Override + public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { + return false; + } - @Override - public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { - return false; - } + @Override + public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) { + return false; + } - @Override - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { - return false; - } + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } - @Override - public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - } + @Override + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + } } diff --git a/src/main/java/tombenpotter/emt/common/entities/EntityArcher.java b/src/main/java/tombenpotter/emt/common/entities/EntityArcher.java index b500450..9356d40 100644 --- a/src/main/java/tombenpotter/emt/common/entities/EntityArcher.java +++ b/src/main/java/tombenpotter/emt/common/entities/EntityArcher.java @@ -25,93 +25,93 @@ import net.minecraftforge.common.IExtendedEntityProperties; public class EntityArcher extends EntitySnowman implements IExtendedEntityProperties { - public EntityArcher(World par1World) { - super(par1World); - this.isImmuneToFire = true; - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector)); - this.tasks.addTask(4, new EntityAIWander(this, 0.30D)); - } + public EntityArcher(World par1World) { + super(par1World); + this.isImmuneToFire = true; + this.tasks.addTask(1, new EntityAISwimming(this)); + this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, true, false, IMob.mobSelector)); + this.tasks.addTask(4, new EntityAIWander(this, 0.30D)); + } - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); - } + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); + } - @Override - public void onDeath(DamageSource par1DamageSource) { - super.onDeath(par1DamageSource); - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true); - this.setDead(); - } + @Override + public void onDeath(DamageSource par1DamageSource) { + super.onDeath(par1DamageSource); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1, true); + this.setDead(); + } - @Override - protected Item getDropItem() { - return Items.arrow; - } + @Override + protected Item getDropItem() { + return Items.arrow; + } - @Override - protected void dropFewItems(boolean par1, int par2) { - int j; - int k; + @Override + protected void dropFewItems(boolean par1, int par2) { + int j; + int k; - j = this.rand.nextInt(3 + par2); + j = this.rand.nextInt(3 + par2); - for (k = 0; k < j; ++k) { - this.dropItem(Items.arrow, 1); - } - j = this.rand.nextInt(3 + par2); + for (k = 0; k < j; ++k) { + this.dropItem(Items.arrow, 1); + } + j = this.rand.nextInt(3 + par2); - for (k = 0; k < j; ++k) { - this.dropItem(Items.bone, 1); - } - } + for (k = 0; k < j; ++k) { + this.dropItem(Items.bone, 1); + } + } - @Override - protected void dropRareDrop(int par1) { - this.entityDropItem(new ItemStack(Items.snowball, 1, 1), 0.0F); - } + @Override + protected void dropRareDrop(int par1) { + this.entityDropItem(new ItemStack(Items.snowball, 1, 1), 0.0F); + } - protected void addRandomArmor() { - super.addRandomArmor(); - this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); - } + protected void addRandomArmor() { + super.addRandomArmor(); + this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); + } - @Override - public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { - EntityArrow entityarrow = new EntityArrow(this.worldObj, this, par1EntityLivingBase, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); - int i = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem()); - int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem()); - entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); + @Override + public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) { + EntityArrow entityarrow = new EntityArrow(this.worldObj, this, par1EntityLivingBase, 1.6F, (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); + int i = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, this.getHeldItem()); + int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, this.getHeldItem()); + entityarrow.setDamage((double) (par2 * 2.0F) + this.rand.nextGaussian() * 0.25D + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); - if (i > 0) { - entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); - } + if (i > 0) { + entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); + } - if (j > 0) { - entityarrow.setKnockbackStrength(j); - } + if (j > 0) { + entityarrow.setKnockbackStrength(j); + } - if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) { - entityarrow.setFire(100); - } + if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, this.getHeldItem()) > 0) { + entityarrow.setFire(100); + } - this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(entityarrow); - } + this.playSound("random.bow", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); + this.worldObj.spawnEntityInWorld(entityarrow); + } - @Override - public void saveNBTData(NBTTagCompound compound) { - } + @Override + public void saveNBTData(NBTTagCompound compound) { + } - @Override - public void loadNBTData(NBTTagCompound compound) { - } + @Override + public void loadNBTData(NBTTagCompound compound) { + } - @Override - public void init(Entity entity, World world) { - } + @Override + public void init(Entity entity, World world) { + } } diff --git a/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java b/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java index 62bd03b..5b1d65f 100644 --- a/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java +++ b/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java @@ -8,6 +8,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; @@ -44,15 +45,15 @@ public class EntityLaser extends Entity implements IProjectile { this.yOffset = 0.0F; } - public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) { - super(par1World); + public EntityLaser(World world, EntityLivingBase entity, EntityLivingBase par3EntityLivingBase, float par4, float par5) { + super(world); this.renderDistanceWeight = 10.0D; - this.shootingEntity = par2EntityLivingBase; + this.shootingEntity = entity; - this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; - double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; + this.posY = entity.posY + (double) entity.getEyeHeight() - 0.10000000149011612D; + double d0 = par3EntityLivingBase.posX - entity.posX; double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 3.0F) - this.posY; - double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; + double d2 = par3EntityLivingBase.posZ - entity.posZ; double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { @@ -60,20 +61,20 @@ public class EntityLaser extends Entity implements IProjectile { float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI)); double d4 = d0 / d3; double d5 = d2 / d3; - this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); + this.setLocationAndAngles(entity.posX + d4, this.posY, entity.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float) d3 * 0.2F; this.setThrowableHeading(d0, d1 + (double) f4, d2, par4, par5); } } - public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, float par3) { - super(par1World); + public EntityLaser(World world, EntityLivingBase entity, float par3) { + super(world); this.renderDistanceWeight = 10.0D; - this.shootingEntity = par2EntityLivingBase; + this.shootingEntity = entity; this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.rotationPitch); + this.setLocationAndAngles(entity.posX, entity.posY + (double) entity.getEyeHeight(), entity.posZ, entity.rotationYaw, entity.rotationPitch); this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F); @@ -132,7 +133,6 @@ public class EntityLaser extends Entity implements IProjectile { } } - @SuppressWarnings("rawtypes") public void onUpdate() { super.onUpdate(); @@ -163,18 +163,19 @@ public class EntityLaser extends Entity implements IProjectile { if (this.inGround) { Block j = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); - if(!this.worldObj.isRemote){ - this.worldObj.createExplosion(this, (int)this.posX, (int)this.posY, (int)this.posZ, 3, true); + if (!this.worldObj.isRemote) { + this.worldObj.createExplosion(this, (int) this.posX, (int) this.posY, (int) this.posZ, 3, true); this.setDead(); } - + if (j == this.inTile && k == this.inData) { ++this.ticksInGround; - + if (this.ticksInGround == 1200) { this.setDead(); } - } else { + } + else { this.inGround = false; this.motionX *= (double) (this.rand.nextFloat() * 0.2F); this.motionY *= (double) (this.rand.nextFloat() * 0.2F); @@ -182,7 +183,8 @@ public class EntityLaser extends Entity implements IProjectile { this.ticksInGround = 0; this.ticksInAir = 0; } - } else { + } + else { ++this.ticksInAir; Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); @@ -246,7 +248,8 @@ public class EntityLaser extends Entity implements IProjectile { this.prevRotationYaw += 180.0F; this.ticksInAir = 0; } - } else { + } + else { this.xTile = movingobjectposition.blockX; this.yTile = movingobjectposition.blockY; this.zTile = movingobjectposition.blockZ; @@ -308,22 +311,22 @@ public class EntityLaser extends Entity implements IProjectile { } } - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - par1NBTTagCompound.setShort("xTile", (short) this.xTile); - par1NBTTagCompound.setShort("yTile", (short) this.yTile); - par1NBTTagCompound.setShort("zTile", (short) this.zTile); - par1NBTTagCompound.setByte("inTile", (byte) Block.getIdFromBlock(this.inTile)); - par1NBTTagCompound.setByte("inData", (byte) this.inData); - par1NBTTagCompound.setByte("inGround", (byte) (this.inGround ? 1 : 0)); + public void writeEntityToNBT(NBTTagCompound nbt) { + nbt.setShort("xTile", (short) this.xTile); + nbt.setShort("yTile", (short) this.yTile); + nbt.setShort("zTile", (short) this.zTile); + nbt.setByte("inTile", (byte) Block.getIdFromBlock(this.inTile)); + nbt.setByte("inData", (byte) this.inData); + nbt.setBoolean("inGround", this.inGround); } - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { - this.xTile = par1NBTTagCompound.getShort("xTile"); - this.yTile = par1NBTTagCompound.getShort("yTile"); - this.zTile = par1NBTTagCompound.getShort("zTile"); - this.inTile = Block.getBlockById(par1NBTTagCompound.getByte("inTile") & 255); - this.inData = par1NBTTagCompound.getByte("inData") & 255; - this.inGround = par1NBTTagCompound.getByte("inGround") == 1; + public void readEntityFromNBT(NBTTagCompound nbt) { + this.xTile = nbt.getShort("xTile"); + this.yTile = nbt.getShort("yTile"); + this.zTile = nbt.getShort("zTile"); + this.inTile = Block.getBlockById(nbt.getByte("inTile") & 255); + this.inData = nbt.getByte("inData") & 255; + this.inGround = nbt.getBoolean("inGround"); } public void onCollide(Entity par1Entity) { diff --git a/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java b/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java index 931127d..732b35d 100644 --- a/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/BlockRegistry.java @@ -22,52 +22,51 @@ import tombenpotter.emt.common.items.blocks.ItemBlockEssentiaGenerators; public class BlockRegistry { - public static Block portableNode; - public static Block essentiaGens; - public static Block shield; - public static Block emtSolars; - public static Block emtMachines; - public static Block emtSolars2; + public static Block portableNode; + public static Block essentiaGens; + public static Block shield; + public static Block emtSolars; + public static Block emtMachines; + public static Block emtSolars2; + public static void registerBlocks() { + portableNode = new BlockPortableNode().setBlockName(ModInformation.modid + ".portablenode"); + GameRegistry.registerBlock(portableNode, "PortableNode"); - public static void registerBlocks() { - portableNode = new BlockPortableNode().setBlockName(ModInformation.modid + ".portablenode"); - GameRegistry.registerBlock(portableNode, "PortableNode"); - - shield = new BlockShield().setBlockName(ModInformation.modid + ".shield"); - GameRegistry.registerBlock(shield, "ShieldBlock"); + shield = new BlockShield().setBlockName(ModInformation.modid + ".shield"); + GameRegistry.registerBlock(shield, "ShieldBlock"); - emtSolars = new BlockEMTSolars().setBlockName(ModInformation.modid + ".emtsolars"); - GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMTSolars"); + emtSolars = new BlockEMTSolars().setBlockName(ModInformation.modid + ".emtsolars"); + GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMTSolars"); - emtSolars2 = new BlockEMTSolars2().setBlockName(ModInformation.modid + ".emtsolars2"); - GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMTSolars2"); + emtSolars2 = new BlockEMTSolars2().setBlockName(ModInformation.modid + ".emtsolars2"); + GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMTSolars2"); - emtMachines = new BlockEMTMachines().setBlockName(ModInformation.modid + ".emtmachines"); - GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMTMachines"); + emtMachines = new BlockEMTMachines().setBlockName(ModInformation.modid + ".emtmachines"); + GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMTMachines"); - essentiaGens = new BlockEssentiaGenerators().setBlockName(ModInformation.modid + ".essentiaGens"); - GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators"); - } - - public static void addAspects(){ - registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5)); - registerObjectTag(IC2Items.getItem("ironFence"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1)); - registerObjectTag(IC2Items.getItem("reinforcedGlass"), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2)); - registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4)); - registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4)); - registerObjectTag(IC2Items.getItem("generator"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("waterMill"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.WATER, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("solarPanel"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 1).add(Aspect.LIGHT, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("windMill"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("batBox"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("cesuUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("mfeUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("mfsUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("ironFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("electroFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.FIRE, 3).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("macerator"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.MINE, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("extractor"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1)); - registerObjectTag(IC2Items.getItem("compressor"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.VOID, 3).add(Aspect.MECHANISM, 1)); - } + essentiaGens = new BlockEssentiaGenerators().setBlockName(ModInformation.modid + ".essentiaGens"); + GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "EssentiaGenerators"); + } + + public static void addAspects() { + registerObjectTag(IC2Items.getItem("rubberTrampoline"), new AspectList().add(Aspect.AIR, 5)); + registerObjectTag(IC2Items.getItem("ironFence"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.METAL, 2).add(Aspect.WEATHER, 1)); + registerObjectTag(IC2Items.getItem("reinforcedGlass"), new AspectList().add(Aspect.METAL, 2).add(Aspect.COLD, 2)); + registerObjectTag(IC2Items.getItem("scaffold"), new AspectList().add(Aspect.TREE, 4)); + registerObjectTag(IC2Items.getItem("ironScaffold"), new AspectList().add(Aspect.METAL, 4)); + registerObjectTag(IC2Items.getItem("generator"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("waterMill"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.WATER, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("solarPanel"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 1).add(Aspect.LIGHT, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("windMill"), new AspectList().add(Aspect.ENERGY, 1).add(Aspect.WEATHER, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("batBox"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("cesuUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 4).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("mfeUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("mfsUnit"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 7).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("ironFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.FIRE, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("electroFurnace"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.FIRE, 3).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("macerator"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.MINE, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("extractor"), new AspectList().add(Aspect.METAL, 2).add(Aspect.ENERGY, 1).add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1)); + registerObjectTag(IC2Items.getItem("compressor"), new AspectList().add(Aspect.METAL, 1).add(Aspect.ENERGY, 2).add(Aspect.VOID, 3).add(Aspect.MECHANISM, 1)); + } } diff --git a/src/main/java/tombenpotter/emt/common/init/EntityRegistry.java b/src/main/java/tombenpotter/emt/common/init/EntityRegistry.java index 0924f6a..9be62d9 100644 --- a/src/main/java/tombenpotter/emt/common/init/EntityRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/EntityRegistry.java @@ -10,29 +10,30 @@ import tombenpotter.emt.common.entities.EntityLaser; public class EntityRegistry { - private static int startEID = 300; - private static int entityIDs = 0; + private static int startEID = 300; + private static int entityIDs = 0; - private static int getUniqueEntityID() { + private static int getUniqueEntityID() { - do { - startEID++; - } while (EntityList.getStringFromID(startEID) != null); - return startEID; - } + do { + startEID++; + } + while (EntityList.getStringFromID(startEID) != null); + return startEID; + } - @SuppressWarnings("unchecked") - public static void registerEntityEgg(Class entity, int colPrim, int colSec) { - int id = getUniqueEntityID(); - EntityList.IDtoClassMapping.put(id, entity); - EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec)); - return; - } + @SuppressWarnings("unchecked") + public static void registerEntityEgg(Class entity, int colPrim, int colSec) { + int id = getUniqueEntityID(); + EntityList.IDtoClassMapping.put(id, entity); + EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec)); + return; + } - public static void registerEMTEntities() { + public static void registerEMTEntities() { - cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityLaser.class, "entityLaser", entityIDs++, ElectroMagicTools.instance, 80, 3, true); - cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityArcher.class, "entityArcher", entityIDs++, ElectroMagicTools.instance, 80, 3, true); - registerEntityEgg(EntityArcher.class, 0x99111F, 0xE5685); - } + cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityLaser.class, "laser", entityIDs++, ElectroMagicTools.instance, 80, 3, true); + cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityArcher.class, "archer", entityIDs++, ElectroMagicTools.instance, 80, 3, true); + registerEntityEgg(EntityArcher.class, 0x99111F, 0xE5685); + } } diff --git a/src/main/java/tombenpotter/emt/common/init/ItemRegistry.java b/src/main/java/tombenpotter/emt/common/init/ItemRegistry.java index d3d25e5..b4e2def 100644 --- a/src/main/java/tombenpotter/emt/common/init/ItemRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/ItemRegistry.java @@ -46,142 +46,144 @@ import tombenpotter.emt.common.items.tools.omnitools.ItemOmnitoolIron; import tombenpotter.emt.common.items.tools.omnitools.ItemOmnitoolThaumium; public class ItemRegistry { - - public static Item onering; - public static Item materials; - public static Item craftingComponents; - public static Item focusChristmas; - public static Item thaumiumDrill; - public static Item thaumiumChainsaw; - public static Item quantumThaumicHelmet; - public static Item diamondChainsaw; - public static Item ironOmnitool; - public static Item diamondOmnitool; - public static Item thaumiumOmnitool; - public static Item nanoThaumicHelmet; - public static Item explosionFocus; - public static Item christmasFocus; - public static Item shieldFocus; - public static Item electricGoggles; - public static Item streamChainsaw; - public static Item rockbreakerDrill; - public static Item solarHelmetRevealing; - public static Item thorHammer; - public static Item taintedThorHammer; - public static Item electricThorHammer; - public static Item electricBootsTraveller; - public static Item quantumBootsTraveller; - public static Item nanoBootsTraveller; - public static Item electricScribingTools; - public static Item itemEMTItems; - public static Item electricHoeGrowth; - public static Item chargeFocus; - public static Item emtBauble; - public static Item wandChargeFocus; - public static Item featherWing; - public static Item thaumiumWing; - public static Item nanoWing; - public static Item quantumWing; - public static Item quantumArmor; - public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[]{2, 2, 2, 2}, 6); - public static void registerItems() { - itemEMTItems = new ItemMaterials().setUnlocalizedName(ModInformation.modid + ".emtitems"); - GameRegistry.registerItem(itemEMTItems, "EMTItems"); - - emtBauble = new ItemIC2Baubles().setUnlocalizedName(ModInformation.modid + ".emtbauble"); - GameRegistry.registerItem(emtBauble, "EMTBaubles"); - - onering = new ItemOneRing(); - GameRegistry.registerItem(onering, "BaseBaubles"); - - quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(ModInformation.modid + ".quantum"); - - electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.electric"); - GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing"); - - nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.nano"); - GameRegistry.registerItem(nanoThaumicHelmet, "NanosuitGogglesRevealing"); - - quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.quantum"); - GameRegistry.registerItem(quantumThaumicHelmet, "QuantumGogglesRevealing"); - - solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.solar"); - GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing"); + public static Item onering; + public static Item materials; + public static Item craftingComponents; + public static Item focusChristmas; + public static Item thaumiumDrill; + public static Item thaumiumChainsaw; + public static Item quantumThaumicHelmet; + public static Item diamondChainsaw; + public static Item ironOmnitool; + public static Item diamondOmnitool; + public static Item thaumiumOmnitool; + public static Item nanoThaumicHelmet; + public static Item explosionFocus; + public static Item christmasFocus; + public static Item shieldFocus; + public static Item electricGoggles; + public static Item streamChainsaw; + public static Item rockbreakerDrill; + public static Item solarHelmetRevealing; + public static Item thorHammer; + public static Item taintedThorHammer; + public static Item electricThorHammer; + public static Item electricBootsTraveller; + public static Item quantumBootsTraveller; + public static Item nanoBootsTraveller; + public static Item electricScribingTools; + public static Item itemEMTItems; + public static Item electricHoeGrowth; + public static Item chargeFocus; + public static Item emtBauble; + public static Item wandChargeFocus; + public static Item featherWing; + public static Item thaumiumWing; + public static Item nanoWing; + public static Item quantumWing; + public static Item quantumArmor; + public static ItemArmor.ArmorMaterial featherWingMaterial = EnumHelper.addArmorMaterial("FEATEHRWiNG", 1, new int[] { 2, 2, 2, 2 }, 6); - electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.electric"); - GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller"); - - nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.nano"); - GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller"); - - quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.quantum"); - GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller"); + public static void registerItems() { + itemEMTItems = new ItemMaterials(); + GameRegistry.registerItem(itemEMTItems, "EMTItems"); + OreDictionary.registerOre("plateThaumium", new ItemStack(itemEMTItems, 1, 5)); + OreDictionary.registerOre("slimeball", new ItemStack(itemEMTItems, 1, 8)); - electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(ModInformation.modid + ".scribingtools.electric"); - GameRegistry.registerItem(electricScribingTools, "ElectricScribingTools"); + emtBauble = new ItemIC2Baubles().setUnlocalizedName(ModInformation.modid + ".bauble"); + GameRegistry.registerItem(emtBauble, "EMTBaubles"); - featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.feather"); - GameRegistry.registerItem(featherWing, "FeatherWing"); - - thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.thaumium"); - GameRegistry.registerItem(thaumiumWing, "ThaumiumWing"); - - nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.nano"); - GameRegistry.registerItem(nanoWing, "NanosuitWing"); - - quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.quantum"); - GameRegistry.registerItem(quantumWing, "QuantumWing"); + onering = new ItemOneRing(); + GameRegistry.registerItem(onering, "BaseBaubles"); - thorHammer = new ItemThorHammer().setUnlocalizedName(ModInformation.modid + ".hammer"); - GameRegistry.registerItem(thorHammer, "Mjolnir"); - - taintedThorHammer = new ItemThorHammerBroken().setUnlocalizedName(ModInformation.modid + ".hammer.broken"); - GameRegistry.registerItem(taintedThorHammer, "TaintedMjolnir"); - - electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName(ModInformation.modid + ".hammer.electric"); - GameRegistry.registerItem(electricThorHammer, "SuperchargedMjolnir"); + quantumArmor = new ItemInfusedQuantumChestplate(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(ModInformation.modid + ".quantum"); - thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName(ModInformation.modid + ".drill.thaumium"); - GameRegistry.registerItem(thaumiumDrill, "ThaumiumDrill"); + electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.electric"); + GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing"); - diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.diamond"); - GameRegistry.registerItem(diamondChainsaw, "DiamondChainsaw"); - - thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.thaumium"); - GameRegistry.registerItem(thaumiumChainsaw, "ThaumiumChainsaw"); + nanoThaumicHelmet = new ItemNanoGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.nano"); + GameRegistry.registerItem(nanoThaumicHelmet, "NanosuitGogglesRevealing"); - ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName(ModInformation.modid + ".omnitool.iron"); - GameRegistry.registerItem(ironOmnitool, "Omnitool"); - - diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName(ModInformation.modid + ".omnitool.diamond"); - GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); - - thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName(ModInformation.modid + ".omnitool.thaumium"); - GameRegistry.registerItem(thaumiumOmnitool, "ThaumiumOmnitool"); + quantumThaumicHelmet = new ItemQuantumGoggles(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.quantum"); + GameRegistry.registerItem(quantumThaumicHelmet, "QuantumGogglesRevealing"); - streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.stream"); - GameRegistry.registerItem(streamChainsaw, "ChainsawStream"); - - rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName(ModInformation.modid + ".drill.rockbreaker"); - GameRegistry.registerItem(rockbreakerDrill, "DrillRockbreaker"); - - electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName(ModInformation.modid + ".hoeofgrowth.electric"); - GameRegistry.registerItem(electricHoeGrowth, "ElectricHoeGrowth"); + solarHelmetRevealing = new ItemSolarHelmetRevealing(ItemArmor.ArmorMaterial.DIAMOND, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.solar"); + GameRegistry.registerItem(solarHelmetRevealing, "SolarHelmetRevealing"); - explosionFocus = new ItemExplosionFocus(); - GameRegistry.registerItem(explosionFocus, "ExplosionFocus"); - - christmasFocus = new ItemChristmasFocus(); - GameRegistry.registerItem(christmasFocus, "ChristmasFocus"); - - shieldFocus = new ItemShieldFocus(); - GameRegistry.registerItem(shieldFocus, "ShieldFocus"); - - chargeFocus = new ItemChargeFocus(); - GameRegistry.registerItem(chargeFocus, "ChargingFocus"); - - wandChargeFocus = new ItemWandChargingFocus(); - GameRegistry.registerItem(wandChargeFocus, "WandChargingFocus"); - } + electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.electric"); + GameRegistry.registerItem(electricBootsTraveller, "ElectricBootsTraveller"); + + nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.nano"); + GameRegistry.registerItem(nanoBootsTraveller, "NanoBootsTraveller"); + + quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName(ModInformation.modid + ".boots.traveller.quantum"); + GameRegistry.registerItem(quantumBootsTraveller, "QuantumBootsTraveller"); + + electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName(ModInformation.modid + ".scribingtools.electric"); + GameRegistry.registerItem(electricScribingTools, "ElectricScribingTools"); + + featherWing = new ItemFeatherWing(featherWingMaterial, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.feather"); + GameRegistry.registerItem(featherWing, "FeatherWing"); + + thaumiumWing = new ItemThaumiumReinforcedWing(ThaumcraftApi.armorMatThaumium, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.thaumium"); + GameRegistry.registerItem(thaumiumWing, "ThaumiumWing"); + + nanoWing = new ItemNanoWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.nano"); + GameRegistry.registerItem(nanoWing, "NanosuitWing"); + + quantumWing = new ItemQuantumWing(ItemArmor.ArmorMaterial.DIAMOND, 7, 1).setUnlocalizedName(ModInformation.modid + ".wing.quantum"); + GameRegistry.registerItem(quantumWing, "QuantumWing"); + + thorHammer = new ItemThorHammer().setUnlocalizedName(ModInformation.modid + ".hammer"); + GameRegistry.registerItem(thorHammer, "Mjolnir"); + + taintedThorHammer = new ItemThorHammerBroken().setUnlocalizedName(ModInformation.modid + ".hammer.broken"); + GameRegistry.registerItem(taintedThorHammer, "TaintedMjolnir"); + + electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName(ModInformation.modid + ".hammer.electric"); + GameRegistry.registerItem(electricThorHammer, "SuperchargedMjolnir"); + + thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName(ModInformation.modid + ".drill.thaumium"); + GameRegistry.registerItem(thaumiumDrill, "ThaumiumDrill"); + + diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.diamond"); + GameRegistry.registerItem(diamondChainsaw, "DiamondChainsaw"); + + thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.thaumium"); + GameRegistry.registerItem(thaumiumChainsaw, "ThaumiumChainsaw"); + + ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName(ModInformation.modid + ".omnitool.iron"); + GameRegistry.registerItem(ironOmnitool, "Omnitool"); + + diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName(ModInformation.modid + ".omnitool.diamond"); + GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); + + thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName(ModInformation.modid + ".omnitool.thaumium"); + GameRegistry.registerItem(thaumiumOmnitool, "ThaumiumOmnitool"); + + streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName(ModInformation.modid + ".chainsaw.stream"); + GameRegistry.registerItem(streamChainsaw, "ChainsawStream"); + + rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName(ModInformation.modid + ".drill.rockbreaker"); + GameRegistry.registerItem(rockbreakerDrill, "DrillRockbreaker"); + + electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName(ModInformation.modid + ".hoeofgrowth.electric"); + GameRegistry.registerItem(electricHoeGrowth, "ElectricHoeGrowth"); + + explosionFocus = new ItemExplosionFocus(); + GameRegistry.registerItem(explosionFocus, "ExplosionFocus"); + + christmasFocus = new ItemChristmasFocus(); + GameRegistry.registerItem(christmasFocus, "ChristmasFocus"); + + shieldFocus = new ItemShieldFocus(); + GameRegistry.registerItem(shieldFocus, "ShieldFocus"); + + chargeFocus = new ItemChargeFocus(); + GameRegistry.registerItem(chargeFocus, "ChargingFocus"); + + wandChargeFocus = new ItemWandChargingFocus(); + GameRegistry.registerItem(wandChargeFocus, "WandChargingFocus"); + } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java index 4b917ac..dc2bf54 100644 --- a/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/RecipeRegistry.java @@ -41,42 +41,36 @@ public class RecipeRegistry { public static ItemStack uuMCell = new ItemStack(ItemRegistry.itemEMTItems, 1, 15); - private static void registerShapedRecipes() { + private static void registerShapedRecipes() { - /** Crafting Recipes **/ - ironOmnitool = GameRegistry.addShapedRecipe(RandomHelper.getChargedItem(ItemRegistry.ironOmnitool, 10), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron")); - diamondChainsaw = GameRegistry.addShapedRecipe(RandomHelper.getChargedItem(ItemRegistry.diamondChainsaw, 10), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - ductTape = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper)); - featherMesh = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 9)); - featherWing = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 7), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 8), 'Z', new ItemStack(ItemRegistry.itemEMTItems, 1, 11)); - featherWings = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.featherWing), "XX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 12)); - taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 13), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather)); + /** Crafting Recipes **/ + ironOmnitool = GameRegistry.addShapedRecipe(RandomHelper.getChargedItem(ItemRegistry.ironOmnitool, 10), "X", "Z", "Y", 'X', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', IC2Items.getItem("plateiron")); + diamondChainsaw = GameRegistry.addShapedRecipe(RandomHelper.getChargedItem(ItemRegistry.diamondChainsaw, 10), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + ductTape = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 9), "XXX", "YYY", "XXX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 8), 'Y', new ItemStack(Items.paper)); + featherMesh = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 7), "XYX", "YXY", "XYX", 'X', new ItemStack(Items.feather), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 9)); + featherWing = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 12), "XYZ", "XYZ", "XYZ", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 7), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 8), 'Z', new ItemStack(ItemRegistry.itemEMTItems, 1, 11)); + featherWings = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.featherWing), "XX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 12)); + taintedFeathers = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 13), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather)); - if (!Loader.isModLoaded("gregtech_addon")) { - GameRegistry.addRecipe(new ShapedOreRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', "gemDiamond", 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE))); - } else { - ElectroMagicTools.logger.info("GregTech Addon detected. Disabling the fix for the Diamond Drill recipe."); - } + GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); + GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); - GameRegistry.addRecipe(IC2Items.getItem("nanoHelmet"), "XYX", "XZX", 'X', IC2Items.getItem("carbonPlate"), 'Y', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(IC2Items.getItem("nightvisionGoggles").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); - GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); + /** OreDict Crafting Recipes **/ + for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) { + cardboard = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i)); + } + for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) { + rubberBall = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 10), "XX", "XX", 'X', OreDictionary.getOres("itemRubber").get(i)); + } - /** OreDict Crafting Recipes **/ - for (int i = 0; i < OreDictionary.getOres("logWood").size(); i++) { - cardboard = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 11), "XXX", "YYY", "XXX", 'X', new ItemStack(Items.paper), 'Y', OreDictionary.getOres("logWood").get(i)); - } - for (int i = 0; i < OreDictionary.getOres("itemRubber").size(); i++) { - rubberBall = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 10), "XX", "XX", 'X', OreDictionary.getOres("itemRubber").get(i)); - } - - /** Smelting Recipes **/ - GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); - GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); - GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); - GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); - GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 10), new ItemStack(ItemRegistry.itemEMTItems, 2, 8), 0.0F); - } + /** Smelting Recipes **/ + GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 1), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); + GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 2), new ItemStack(ConfigItems.itemResource, 1, 6), 0.0F); + GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); + GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 4), new ItemStack(ConfigItems.itemResource, 1, 3), 0.0F); + GameRegistry.addSmelting(new ItemStack(ItemRegistry.itemEMTItems, 1, 10), new ItemStack(ItemRegistry.itemEMTItems, 2, 8), 0.0F); + } private static void registerShaplessRecipes() { @@ -96,127 +90,159 @@ public class RecipeRegistry { ItemStack iridium = IC2Items.getItem("iridiumOre").copy(); iridium.stackSize = 2; - uraniumToIridium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, CraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell}); + uraniumToIridium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", iridium, 4, CraftingAspects.uuMatterInfusions, IC2Items.getItem("Uran238"), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell }); ItemStack uranium = IC2Items.getItem("Uran238").copy(); uranium.stackSize = 2; - diamondToUranium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell}); + diamondToUranium = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uranium, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(Items.diamond), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell, uuMCell }); ItemStack diamond = new ItemStack(Items.diamond).copy(); diamond.stackSize = 1; - goldToDiamond = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell, uuMCell}); + goldToDiamond = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", diamond, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.gold_ingot), new ItemStack[] { uuMCell, uuMCell, uuMCell, uuMCell }); ItemStack gold = new ItemStack(Items.gold_ingot).copy(); gold.stackSize = 2; - ironToGold = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + ironToGold = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", gold, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.iron_ingot), new ItemStack[] { uuMCell, uuMCell, uuMCell }); ItemStack ironOre = new ItemStack(Blocks.iron_ore).copy(); ironOre.stackSize = 16; - stoneBricksToIronOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[]{uuMCell, uuMCell}); + stoneBricksToIronOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", ironOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Blocks.stonebrick), new ItemStack[] { uuMCell, uuMCell }); /** - * ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED + * ItemStack copperOre = Items.getItem("copperOre").copy(); BUGGED IN + * 1.6 IF IC2 OREGEN IS DISABLED **/ ItemStack copperOre = IC2Items.getItem("crushedCopperOre").copy(); copperOre.stackSize = 32; - arcaneStoneToCopperOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[]{uuMCell, uuMCell}); + arcaneStoneToCopperOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", copperOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack[] { uuMCell, uuMCell }); /** - * ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED + * ItemStack tinOre = Items.getItem("tinOre").copy(); BUGGED IN 1.6 IF + * IC2 OREGEN IS DISABLED **/ ItemStack tinOre = IC2Items.getItem("crushedTinOre").copy(); tinOre.stackSize = 32; - arcaneStoneBricksToTinOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[]{uuMCell, uuMCell}); + arcaneStoneBricksToTinOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", tinOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), new ItemStack[] { uuMCell, uuMCell }); /** - * ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF IC2 OREGEN IS DISABLED + * ItemStack leadOre = Items.getItem("leadOre").copy(); BUGGED IN 1.6 IF + * IC2 OREGEN IS DISABLED **/ ItemStack leadOre = IC2Items.getItem("crushedLeadOre").copy(); leadOre.stackSize = 32; - amberBlockToLeadOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[]{uuMCell, uuMCell}); + amberBlockToLeadOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", leadOre, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 0), new ItemStack[] { uuMCell, uuMCell }); ItemStack uraniumOre = IC2Items.getItem("uraniumOre").copy(); uraniumOre.stackSize = 8; - amberBricksToUraniumOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + amberBricksToUraniumOre = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", uraniumOre, 4, CraftingAspects.lesserUUMInfusions, new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 1), new ItemStack[] { uuMCell, uuMCell, uuMCell }); ItemStack coal = new ItemStack(Items.coal, 1, 0).copy(); coal.stackSize = 16; - charcoalToCoal = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[]{uuMCell, uuMCell}); + charcoalToCoal = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", coal, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(Items.coal, 1, 1), new ItemStack[] { uuMCell, uuMCell }); ItemStack stickyResin = IC2Items.getItem("resin").copy(); stickyResin.stackSize = 21; - shardToResin = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + shardToResin = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", stickyResin, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); ItemStack redstone = new ItemStack(Items.redstone).copy(); redstone.stackSize = 24; - shardToRedstone = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + shardToRedstone = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", redstone, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); ItemStack lapisLazuli = new ItemStack(Items.dye, 1, 4).copy(); lapisLazuli.stackSize = 8; - shardToLapis = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{uuMCell, uuMCell, uuMCell}); + shardToLapis = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", lapisLazuli, 4, CraftingAspects.cheapUUMInfusions, new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { uuMCell, uuMCell, uuMCell }); ItemStack glowstone = new ItemStack(Blocks.glowstone).copy(); glowstone.stackSize = 1; - glowstoneDustToBlock = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[]{uuMCell}); + glowstoneDustToBlock = ThaumcraftApi.addInfusionCraftingRecipe("UU-Matter Infusion", glowstone, 4, CraftingAspects.cheapestUUMInfusions, new ItemStack(Items.glowstone_dust), new ItemStack[] { uuMCell }); } public static void registerLateRecipes() { /** Infusion Recipes **/ - thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", RandomHelper.getChargedItem(ItemRegistry.thaumiumDrill, 10), 5, CraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")}); + thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", RandomHelper.getChargedItem(ItemRegistry.thaumiumDrill, 10), 5, CraftingAspects.thaumiumDrillCrafting, new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") }); - thaumiumChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Chainsaw", RandomHelper.getChargedItem(ItemRegistry.thaumiumChainsaw, 10), 5, CraftingAspects.thaumiumChainsawCrafting, new ItemStack(ItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron")}); + thaumiumChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Chainsaw", RandomHelper.getChargedItem(ItemRegistry.thaumiumChainsaw, 10), 5, CraftingAspects.thaumiumChainsawCrafting, new ItemStack(ItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("denseplateiron") }); - thaumicQuantumHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Goggles of Revealing", RandomHelper.getChargedItem(ItemRegistry.quantumThaumicHelmet, 10), 6, CraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(ItemRegistry.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit")}); + thaumicQuantumHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Goggles of Revealing", RandomHelper.getChargedItem(ItemRegistry.quantumThaumicHelmet, 10), 6, CraftingAspects.thaumicQuantumHelmetCrafting, new ItemStack(ItemRegistry.nanoThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.milk_bucket), new ItemStack(IC2Items.getItem("quantumHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit") }); - thaumicNanoHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", RandomHelper.getChargedItem(ItemRegistry.nanoThaumicHelmet, 10), 5, CraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(ItemRegistry.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit")}); + thaumicNanoHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", RandomHelper.getChargedItem(ItemRegistry.nanoThaumicHelmet, 10), 5, CraftingAspects.thaumicNanoHelmetCrafting, new ItemStack(ItemRegistry.electricGoggles, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.gold_ingot), new ItemStack(IC2Items.getItem("nanoHelmet").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit") }); - thaumiumOmnitool = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", RandomHelper.getChargedItem(ItemRegistry.thaumiumOmnitool, 10), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(ItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian")}); + thaumiumOmnitool = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", RandomHelper.getChargedItem(ItemRegistry.thaumiumOmnitool, 10), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(ItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian") }); - diamondOmnitoolToThaumium = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(ItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(ItemRegistry.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit")}); + diamondOmnitoolToThaumium = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(ItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(ItemRegistry.diamondOmnitool, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("carbonPlate"), IC2Items.getItem("advancedCircuit") }); - explosionFocus = ThaumcraftApi.addInfusionCraftingRecipe("Explosion Focus", new ItemStack(ItemRegistry.explosionFocus), 6, CraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), new ItemStack[]{new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1)}); + explosionFocus = ThaumcraftApi.addInfusionCraftingRecipe("Explosion Focus", new ItemStack(ItemRegistry.explosionFocus), 6, CraftingAspects.laserFocusCrafting, new ItemStack(ConfigItems.itemFocusHellbat, 1), + new ItemStack[] { new ItemStack(IC2Items.getItem("miningLaser").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.arrow), new ItemStack(Items.gunpowder), new ItemStack(Items.firework_charge), new ItemStack(ConfigItems.itemResource, 1, 1) }); - shieldFocus = ThaumcraftApi.addInfusionCraftingRecipe("Shield Focus", new ItemStack(ItemRegistry.shieldFocus), 4, CraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), new ItemStack[]{IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian)}); + shieldFocus = ThaumcraftApi.addInfusionCraftingRecipe("Shield Focus", new ItemStack(ItemRegistry.shieldFocus), 4, CraftingAspects.shieldFocusCrafting, new ItemStack(ConfigItems.itemFocusPortableHole, 1), + new ItemStack[] { IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("reinforcedGlass"), new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian), new ItemStack(Blocks.obsidian) }); - potentiaGenerator = ThaumcraftApi.addInfusionCraftingRecipe("Potentia Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 0), 6, CraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap")}); + potentiaGenerator = ThaumcraftApi.addInfusionCraftingRecipe("Potentia Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 0), 6, CraftingAspects.potentiaGeneratorCrafting, IC2Items.getItem("semifluidGenerator"), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(ConfigItems.itemFocusTrade), new ItemStack(Blocks.hopper), new ItemStack(ConfigBlocks.blockJar), IC2Items.getItem("mvTransformer"), IC2Items.getItem("advancedMachine"), IC2Items.getItem("orewashingplant"), IC2Items.getItem("scrap") }); - streamChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Chainsaw of the Stream", RandomHelper.getChargedItem(ItemRegistry.streamChainsaw, 10), 6, CraftingAspects.streamChaisnawCrafting, new ItemStack(ItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")}); + streamChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Chainsaw of the Stream", RandomHelper.getChargedItem(ItemRegistry.streamChainsaw, 10), 6, CraftingAspects.streamChaisnawCrafting, new ItemStack(ItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.water_bucket), new ItemStack(ConfigItems.itemAxeElemental), new ItemStack(ConfigBlocks.blockMagicalLog), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); - rockbreakerDrill = ThaumcraftApi.addInfusionCraftingRecipe("Drill of the Rockbreaker", RandomHelper.getChargedItem(ItemRegistry.rockbreakerDrill, 10), 6, CraftingAspects.rockbreakerDrillCrafting, new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")}); + rockbreakerDrill = ThaumcraftApi.addInfusionCraftingRecipe("Drill of the Rockbreaker", RandomHelper.getChargedItem(ItemRegistry.rockbreakerDrill, 10), 6, CraftingAspects.rockbreakerDrillCrafting, new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(Items.flint_and_steel), new ItemStack(Items.fire_charge), + new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("reinforcedStone"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); - thorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Mjolnir", new ItemStack(ItemRegistry.thorHammer), 7, CraftingAspects.thorHammerCrafting, new ItemStack(ItemRegistry.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber")}); + thorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Mjolnir", new ItemStack(ItemRegistry.thorHammer), 7, CraftingAspects.thorHammerCrafting, new ItemStack(ItemRegistry.taintedThorHammer, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack(ConfigItems.itemFocusShock), IC2Items.getItem("rubber") }); - superchargedThorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Supercharged Mjolnir", RandomHelper.getChargedItem(ItemRegistry.electricThorHammer, 10), 10, CraftingAspects.superchargedThorHammerCrafting, new ItemStack(ItemRegistry.thorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); + superchargedThorHammer = ThaumcraftApi.addInfusionCraftingRecipe("Supercharged Mjolnir", RandomHelper.getChargedItem(ItemRegistry.electricThorHammer, 10), 10, CraftingAspects.superchargedThorHammerCrafting, new ItemStack(ItemRegistry.thorHammer, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(ItemRegistry.itemEMTItems, 1, 6), new ItemStack(Blocks.web), new ItemStack(ConfigItems.itemFocusHellbat), new ItemStack(ConfigItems.itemSwordElemental), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), + IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("nanoSaber").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); - wandRecharger = ThaumcraftApi.addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(BlockRegistry.emtMachines, 1, 0), 6, CraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), new ItemStack[]{IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar)}); + wandRecharger = ThaumcraftApi.addInfusionCraftingRecipe("Industrial Wand Charging Station", new ItemStack(BlockRegistry.emtMachines, 1, 0), 6, CraftingAspects.wandCharger, new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), + new ItemStack[] { IC2Items.getItem("replicator"), IC2Items.getItem("iridiumPlate"), new ItemStack(Blocks.diamond_block), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigBlocks.blockJar) }); - solarHelmetRevealing = ThaumcraftApi.addInfusionCraftingRecipe("Solar Helmet of Revealing", RandomHelper.getChargedItem(ItemRegistry.solarHelmetRevealing, 10), 5, CraftingAspects.solarHelmetRevealing, new ItemStack(ItemRegistry.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(BlockRegistry.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4)}); + solarHelmetRevealing = ThaumcraftApi.addInfusionCraftingRecipe("Solar Helmet of Revealing", RandomHelper.getChargedItem(ItemRegistry.solarHelmetRevealing, 10), 5, CraftingAspects.solarHelmetRevealing, new ItemStack(ItemRegistry.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(BlockRegistry.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItem"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4) }); - electricBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Electric Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.electricBootsTraveller, 10), 2, CraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); + electricBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Electric Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.electricBootsTraveller, 10), 2, CraftingAspects.electricBootsTravel, new ItemStack(ConfigItems.itemBootsTraveller), + new ItemStack[] { new ItemStack(Items.diamond), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), IC2Items.getItem("hazmatBoots"), new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); - nanoBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Nano Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.nanoBootsTraveller, 10), 2, CraftingAspects.nanoBootsTravel, new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)}); + nanoBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Nano Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.nanoBootsTraveller, 10), 2, CraftingAspects.nanoBootsTravel, new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(IC2Items.getItem("nanoBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE) }); - quantumBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.quantumBootsTraveller, 10), 2, CraftingAspects.quantumBootsTravel, new ItemStack(ItemRegistry.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate")}); + quantumBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Boots of the Traveller", RandomHelper.getChargedItem(ItemRegistry.quantumBootsTraveller, 10), 2, CraftingAspects.quantumBootsTravel, new ItemStack(ItemRegistry.nanoBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(IC2Items.getItem("quantumBoots").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate") }); - etheralProcessor = ThaumcraftApi.addInfusionCraftingRecipe("Etheral Processor", new ItemStack(BlockRegistry.emtMachines, 1, 1), 3, CraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), new ItemStack[]{IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5)}); + etheralProcessor = ThaumcraftApi.addInfusionCraftingRecipe("Etheral Processor", new ItemStack(BlockRegistry.emtMachines, 1, 1), 3, CraftingAspects.etherealProcessor, IC2Items.getItem("macerator"), + new ItemStack[] { IC2Items.getItem("electroFurnace"), new ItemStack(ConfigBlocks.blockMetalDevice, 1, 9), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.end_stone), new ItemStack(Blocks.iron_block), new ItemStack(Blocks.iron_block), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5) }); - tripleCompressedSolar = ThaumcraftApi.addInfusionCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 2), 2, CraftingAspects.compressedSolars, new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack[]{new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1)}); + tripleCompressedSolar = ThaumcraftApi.addInfusionCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 2), 2, CraftingAspects.compressedSolars, new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack[] { new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), + new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 1) }); - electricHoeGrowth = ThaumcraftApi.addInfusionCraftingRecipe("Electric Hoe of Growth", RandomHelper.getChargedItem(ItemRegistry.electricHoeGrowth, 10), 4, CraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), new ItemStack[]{new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE)}); + electricHoeGrowth = ThaumcraftApi.addInfusionCraftingRecipe("Electric Hoe of Growth", RandomHelper.getChargedItem(ItemRegistry.electricHoeGrowth, 10), 4, CraftingAspects.electricHoeGrowth, new ItemStack(ConfigItems.itemHoeElemental), + new ItemStack[] { new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("electricHoe").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.dye, 1, 15), IC2Items.getItem("elemotor"), IC2Items.getItem("coil"), new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE) }); - chargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(ItemRegistry.chargeFocus), 4, CraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE)}); + chargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Charging", new ItemStack(ItemRegistry.chargeFocus), 4, CraftingAspects.chargeFocus, new ItemStack(IC2Items.getItem("advBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { IC2Items.getItem("generator"), IC2Items.getItem("batBox"), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ItemRegistry.itemEMTItems, 1, 5), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE) }); - wandChargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(ItemRegistry.wandChargeFocus), 5, CraftingAspects.wandChargeFocus, new ItemStack(BlockRegistry.emtMachines, 1, 0), new ItemStack[]{new ItemStack(ItemRegistry.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate")}); + wandChargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("Wand Focus: Wand Charging", new ItemStack(ItemRegistry.wandChargeFocus), 5, CraftingAspects.wandChargeFocus, new ItemStack(BlockRegistry.emtMachines, 1, 0), + new ItemStack[] { new ItemStack(ItemRegistry.chargeFocus), new ItemStack(IC2Items.getItem("energyPack").getItem(), 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate") }); - inventoryChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 1), 6, CraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")}); + inventoryChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Inventory Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 1), 6, CraftingAspects.inventoryChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), + new ItemStack[] { new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor") }); - armorChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 0), 6, CraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), new ItemStack[]{new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")}); + armorChargingRing = ThaumcraftApi.addInfusionCraftingRecipe("Armor Charging Ring", new ItemStack(ItemRegistry.emtBauble, 1, 0), 6, CraftingAspects.armorChargingRing, new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), + new ItemStack[] { new ItemStack(ItemRegistry.electricBootsTraveller, 1, OreDictionary.WILDCARD_VALUE), IC2Items.getItem("generator"), IC2Items.getItem("geothermalGenerator"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor") }); - nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", RandomHelper.getChargedItem(ItemRegistry.nanoWing, 10), 4, CraftingAspects.nanoWing, new ItemStack(ItemRegistry.thaumiumWing), new ItemStack[]{IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)}); + nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", RandomHelper.getChargedItem(ItemRegistry.nanoWing, 10), 4, CraftingAspects.nanoWing, new ItemStack(ItemRegistry.thaumiumWing), + new ItemStack[] { IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), IC2Items.getItem("carbonPlate"), new ItemStack(IC2Items.getItem("nanoBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1) }); - quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", RandomHelper.getChargedItem(ItemRegistry.quantumWing, 10), 6, CraftingAspects.quantumWing, new ItemStack(ItemRegistry.nanoWing, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1)}); - - infusedQuantumArmor = ThaumcraftApi.addInfusionCraftingRecipe("Infused Quantum Armor", RandomHelper.getChargedItem(ItemRegistry.quantumArmor, 10), 5, CraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack[]{new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(BlockRegistry.shield), new ItemStack(BlockRegistry.shield)}); + quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", RandomHelper.getChargedItem(ItemRegistry.quantumWing, 10), 6, CraftingAspects.quantumWing, new ItemStack(ItemRegistry.nanoWing, 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemResource, 1, 1) }); + + infusedQuantumArmor = ThaumcraftApi.addInfusionCraftingRecipe("Infused Quantum Armor", RandomHelper.getChargedItem(ItemRegistry.quantumArmor, 10), 5, CraftingAspects.quantumWing, new ItemStack(IC2Items.getItem("quantumBodyarmor").getItem(), 1, OreDictionary.WILDCARD_VALUE), + new ItemStack[] { new ItemStack(Items.diamond), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("iridiumPlate"), new ItemStack(BlockRegistry.shield), new ItemStack(BlockRegistry.shield) }); /** Arcane Worktable Recipes **/ @@ -226,9 +252,11 @@ public class RecipeRegistry { christmasFocus = ThaumcraftApi.addArcaneCraftingRecipe("Kris-tmas Focus", new ItemStack(ItemRegistry.christmasFocus), CraftingAspects.christmasFocusCrafting, "XYX", "YZY", "XYX", 'X', new ItemStack(Blocks.snow), 'Y', new ItemStack(Blocks.pumpkin), 'Z', new ItemStack(ConfigItems.itemFocusFrost)); - electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("reBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE),'B', Items.repeater); - - electricGoggles2 = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); + electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', + new ItemStack(IC2Items.getItem("reBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); + + electricGoggles2 = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", RandomHelper.getChargedItem(ItemRegistry.electricGoggles, 10), CraftingAspects.electricGogglesCrafting, " Y ", "AZA", "BXB", 'Z', new ItemStack(ConfigItems.itemGoggles), 'X', IC2Items.getItem("electronicCircuit"), 'Y', new ItemStack(Items.diamond_helmet), 'A', + new ItemStack(IC2Items.getItem("chargedReBattery").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'B', Items.repeater); shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Block", new ItemStack(BlockRegistry.shield, 6), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); @@ -238,10 +266,11 @@ public class RecipeRegistry { doubleCompressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(BlockRegistry.emtSolars, 1, 0)); - electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", RandomHelper.getChargedItem(ItemRegistry.electricScribingTools, 10), CraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", RandomHelper.getChargedItem(ItemRegistry.electricScribingTools, 10), CraftingAspects.electricScribingTools, "YXY", "XZX", "YXY", 'Y', IC2Items.getItem("electronicCircuit"), 'X', new ItemStack(ConfigItems.itemInkwell), 'Z', + new ItemStack(IC2Items.getItem("energyCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE)); thaumiumWing = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(ItemRegistry.itemEMTItems, 1, 14), CraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 13), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 5), 'Z', IC2Items.getItem("plateiron")); - + thaumiumWings = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(ItemRegistry.thaumiumWing), CraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 14)); /** Crucible Recipes **/ @@ -291,14 +320,14 @@ public class RecipeRegistry { tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars); ItemStack itemStack = new ItemStack(ConfigItems.itemJarNode); - ((ItemJarNode)itemStack.getItem()).setAspects(itemStack, new AspectList()); + ((ItemJarNode) itemStack.getItem()).setAspects(itemStack, new AspectList()); portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(BlockRegistry.portableNode), itemStack, CraftingAspects.portableNode); - + uuMCrystal = ThaumcraftApi.addCrucibleRecipe("UU-Matter Infusion", new ItemStack(ItemRegistry.itemEMTItems, 1, 15), Ic2Items.uuMatterCell.copy(), CraftingAspects.uuMatterCrystal); /** IC2 Stuff related recipes **/ - /* Ore Clusters Macerator Recipes */ + /* Ore Clusters Macerator Recipes */ ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy(); ironClusterRecipe.stackSize = 22; Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, ironClusterRecipe); @@ -327,12 +356,9 @@ public class RecipeRegistry { thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.itemEMTItems, 1, 5), "X", "Y", "Z", 'Y', new ItemStack(ConfigItems.itemResource, 1, 2), 'X', new ItemStack(IC2Items.getItem("ForgeHammer").getItem(), 1, OreDictionary.WILDCARD_VALUE), 'Z', new ItemStack(Blocks.obsidian)); Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemResource, 1, 2)), null, new ItemStack(ItemRegistry.itemEMTItems, 1, 5)); - ///* Iron Sheet Recipe */ - //Recipes.metalformerRolling.addRecipe(new RecipeInputItemStack(IC2Items.getItem("denseplateiron")), null, new ItemStack(ItemRegistry.itemEMTItems, 1, 13)); - /* Ore Processing for Amber and Cinnabar */ if (ConfigHandler.removeAmberAndCinnabarMacerating) { - for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) { + for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { IRecipeInput input = it.next(); if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7))) { it.remove(); @@ -340,7 +366,7 @@ public class RecipeRegistry { } } - for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext(); ) { + for (Iterator it = Recipes.macerator.getRecipes().keySet().iterator(); it.hasNext();) { IRecipeInput input = it.next(); if (input.matches(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0))) { it.remove(); @@ -364,26 +390,26 @@ public class RecipeRegistry { ItemStack smallTinDust = IC2Items.getItem("smallTinDust"); smallCopperDust.stackSize = 2; - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust")}); - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust")}); + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 2), smallCopperDust, IC2Items.getItem("stoneDust") }); + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 4), smallTinDust, IC2Items.getItem("stoneDust") }); NBTTagCompound heatAmount = new NBTTagCompound(); heatAmount.setInteger("minHeat", 1000); - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[]{IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6)}); - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[]{IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3)}); + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[] { IC2Items.getItem("smallCopperDust"), new ItemStack(ConfigItems.itemResource, 1, 6) }); + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[] { IC2Items.getItem("smallTinDust"), new ItemStack(ConfigItems.itemResource, 1, 3) }); } - public static IRecipe ironOmnitool; - public static IRecipe diamondChainsaw; - public static IRecipe ductTape; - public static IRecipe rubberBall; - public static IRecipe featherMesh; - public static IRecipe cardboard; - public static IRecipe featherWing; - public static IRecipe featherWings; - public static IRecipe taintedFeathers; + public static IRecipe ironOmnitool; + public static IRecipe diamondChainsaw; + public static IRecipe ductTape; + public static IRecipe rubberBall; + public static IRecipe featherMesh; + public static IRecipe cardboard; + public static IRecipe featherWing; + public static IRecipe featherWings; + public static IRecipe taintedFeathers; public static InfusionRecipe uraniumToIridium; public static InfusionRecipe diamondToUranium; diff --git a/src/main/java/tombenpotter/emt/common/init/Registry.java b/src/main/java/tombenpotter/emt/common/init/Registry.java index a1071b1..79ae984 100644 --- a/src/main/java/tombenpotter/emt/common/init/Registry.java +++ b/src/main/java/tombenpotter/emt/common/init/Registry.java @@ -1,16 +1,16 @@ package tombenpotter.emt.common.init; -public class Registry{ - public static void register(){ +public class Registry { + public static void register() { BlockRegistry.registerBlocks(); ItemRegistry.registerItems(); TileRegistry.registerTiles(); RecipeRegistry.registerEarlyRecipes(); } - - public static void registerLate(){ + + public static void registerLate() { BlockRegistry.addAspects(); - RecipeRegistry.registerLateRecipes(); - RecipeRegistry.registerUUMInfusionRecipes(); + RecipeRegistry.registerLateRecipes(); + RecipeRegistry.registerUUMInfusionRecipes(); } } diff --git a/src/main/java/tombenpotter/emt/common/init/TileRegistry.java b/src/main/java/tombenpotter/emt/common/init/TileRegistry.java index 1d9f858..8b0e1ea 100644 --- a/src/main/java/tombenpotter/emt/common/init/TileRegistry.java +++ b/src/main/java/tombenpotter/emt/common/init/TileRegistry.java @@ -33,35 +33,35 @@ import cpw.mods.fml.common.registry.GameRegistry; public class TileRegistry { - public static void registerTiles() { - GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode"); - GameRegistry.registerTileEntity(TileEntityPotentiaGenerator.class, "tileentitypotentiagenerator"); - GameRegistry.registerTileEntity(TileEntityIgnisGenerator.class, "tileentityignisgenerator"); - GameRegistry.registerTileEntity(TileEntityAuramGenerator.class, "tileentityauramgenerator"); - GameRegistry.registerTileEntity(TileEntityArborGenerator.class, "tileentityarborgenerator"); - GameRegistry.registerTileEntity(TileEntityAerGenerator.class, "tileentityaergenerator"); - GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); - GameRegistry.registerTileEntity(TileEntityCompressedSolar.class, "tileentitycompressedsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar"); - GameRegistry.registerTileEntity(TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar"); - GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); - GameRegistry.registerTileEntity(TileEntityWaterSolar.class, "tileentitywatersolar"); - GameRegistry.registerTileEntity(TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar"); - GameRegistry.registerTileEntity(TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar"); - GameRegistry.registerTileEntity(TileEntityDarkSolar.class, "tileentitydarksolar"); - GameRegistry.registerTileEntity(TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar"); - GameRegistry.registerTileEntity(TileEntityTripleDarkSolar.class, "tileentitytripledarksolar"); - GameRegistry.registerTileEntity(TileEntityOrderSolar.class, "tileentityordersolar"); - GameRegistry.registerTileEntity(TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar"); - GameRegistry.registerTileEntity(TileEntityTripleOrderSolar.class, "tileentitytripleordersolar"); - GameRegistry.registerTileEntity(TileEntityFireSolar.class, "tileentityfiresolar"); - GameRegistry.registerTileEntity(TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar"); - GameRegistry.registerTileEntity(TileEntityTripleFireSolar.class, "tileentitytriplefiresolar"); - GameRegistry.registerTileEntity(TileEntityAirSolar.class, "tileentityairsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar"); - GameRegistry.registerTileEntity(TileEntityTripleAirSolar.class, "tileentitytripleairsolar"); - GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar"); - GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); - GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); - } + public static void registerTiles() { + GameRegistry.registerTileEntity(TileEntityPortableNode.class, "tileentityportablenode"); + GameRegistry.registerTileEntity(TileEntityPotentiaGenerator.class, "tileentitypotentiagenerator"); + GameRegistry.registerTileEntity(TileEntityIgnisGenerator.class, "tileentityignisgenerator"); + GameRegistry.registerTileEntity(TileEntityAuramGenerator.class, "tileentityauramgenerator"); + GameRegistry.registerTileEntity(TileEntityArborGenerator.class, "tileentityarborgenerator"); + GameRegistry.registerTileEntity(TileEntityAerGenerator.class, "tileentityaergenerator"); + GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); + GameRegistry.registerTileEntity(TileEntityCompressedSolar.class, "tileentitycompressedsolar"); + GameRegistry.registerTileEntity(TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar"); + GameRegistry.registerTileEntity(TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar"); + GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); + GameRegistry.registerTileEntity(TileEntityWaterSolar.class, "tileentitywatersolar"); + GameRegistry.registerTileEntity(TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar"); + GameRegistry.registerTileEntity(TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar"); + GameRegistry.registerTileEntity(TileEntityDarkSolar.class, "tileentitydarksolar"); + GameRegistry.registerTileEntity(TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar"); + GameRegistry.registerTileEntity(TileEntityTripleDarkSolar.class, "tileentitytripledarksolar"); + GameRegistry.registerTileEntity(TileEntityOrderSolar.class, "tileentityordersolar"); + GameRegistry.registerTileEntity(TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar"); + GameRegistry.registerTileEntity(TileEntityTripleOrderSolar.class, "tileentitytripleordersolar"); + GameRegistry.registerTileEntity(TileEntityFireSolar.class, "tileentityfiresolar"); + GameRegistry.registerTileEntity(TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar"); + GameRegistry.registerTileEntity(TileEntityTripleFireSolar.class, "tileentitytriplefiresolar"); + GameRegistry.registerTileEntity(TileEntityAirSolar.class, "tileentityairsolar"); + GameRegistry.registerTileEntity(TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar"); + GameRegistry.registerTileEntity(TileEntityTripleAirSolar.class, "tileentitytripleairsolar"); + GameRegistry.registerTileEntity(TileEntityEarthSolar.class, "tileentityearthsolar"); + GameRegistry.registerTileEntity(TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); + GameRegistry.registerTileEntity(TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); + } } diff --git a/src/main/java/tombenpotter/emt/common/items/ItemBase.java b/src/main/java/tombenpotter/emt/common/items/ItemBase.java index d919e8b..2903d0c 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemBase.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemBase.java @@ -1,21 +1,29 @@ package tombenpotter.emt.common.items; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import tombenpotter.emt.ElectroMagicTools; import tombenpotter.emt.ModInformation; +import tombenpotter.emt.common.util.TextHelper; public class ItemBase extends Item { - public ItemBase(String unlocName, String textureName) { - super(); - setUnlocalizedName(ModInformation.modid + ".item." + unlocName); - setTextureName(ModInformation.texturePath + ":" + textureName); - setCreativeTab(ElectroMagicTools.tabEMT); - } + public ItemBase(String unlocName, String textureName) { + super(); + setUnlocalizedName(ModInformation.modid + unlocName); + setTextureName(ModInformation.texturePath + ":" + textureName); + setCreativeTab(ElectroMagicTools.tabEMT); + } - public ItemBase(String unlocName) { - super(); - setUnlocalizedName(ModInformation.modid + ".item." + unlocName); - setCreativeTab(ElectroMagicTools.tabEMT); + public ItemBase(String unlocName) { + super(); + setUnlocalizedName(ModInformation.modid + ".item." + unlocName); + setCreativeTab(ElectroMagicTools.tabEMT); + } + + public String getItemStackDisplayName(ItemStack stack) + { + return (TextHelper.GREEN + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); } } diff --git a/src/main/java/tombenpotter/emt/common/items/ItemCraftingComponents.java b/src/main/java/tombenpotter/emt/common/items/ItemCraftingComponents.java deleted file mode 100644 index 496c631..0000000 --- a/src/main/java/tombenpotter/emt/common/items/ItemCraftingComponents.java +++ /dev/null @@ -1,227 +0,0 @@ -package tombenpotter.emt.common.items; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import tombenpotter.emt.ModInformation; - -import java.util.List; - -public class ItemCraftingComponents extends ItemBase { - - public IIcon[] icon = new IIcon[100]; - public final String drillTop = "drillTop"; - public final String chainsawTop = "chainsawTop"; - public final String omnitoolTop = "omnitoolTop"; - public final String shard = "shard"; - - public ItemCraftingComponents(String unlocName) { - super(unlocName); - this.setMaxDamage(0); - this.setHasSubtypes(true); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - default: - name = "nothing"; - break; - case 0: { - name = drillTop + ".wood"; - break; - } - case 1: { - name = drillTop + ".stone"; - break; - } - case 2: { - name = drillTop + ".iron"; - break; - } - case 3: { - name = drillTop + ".gold"; - break; - } - case 4: { - name = drillTop + ".diamond"; - break; - } - case 5: { - name = drillTop + ".copper"; - break; - } - case 6: { - name = drillTop + ".tin"; - break; - } - case 7: { - name = drillTop + ".lead"; - break; - } - case 8: { - name = drillTop + ".bronze"; - break; - } - case 9: { - name = chainsawTop + ".wood"; - break; - } - case 10: { - name = chainsawTop + ".stone"; - break; - } - case 11: { - name = chainsawTop + ".iron"; - break; - } - case 12: { - name = chainsawTop + ".gold"; - break; - } - case 13: { - name = chainsawTop + ".diamond"; - break; - } - case 14: { - name = chainsawTop + ".copper"; - break; - } - case 15: { - name = chainsawTop + ".tin"; - break; - } - case 16: { - name = chainsawTop + ".lead"; - break; - } - case 17: { - name = chainsawTop + ".bronze"; - break; - } - case 18: { - name = omnitoolTop + ".iron"; - break; - } - case 19: { - name = omnitoolTop + ".gold"; - break; - } - case 20: { - name = omnitoolTop + ".diamond"; - break; - } - case 21: { - name = omnitoolTop + ".copper"; - break; - } - case 22: { - name = omnitoolTop + ".tin"; - break; - } - case 23: { - name = omnitoolTop + ".lead"; - break; - } - case 24: { - name = omnitoolTop + ".bronze"; - break; - } - case 25: { - name = shard + ".wood"; - break; - } - case 26: { - name = shard + ".stone"; - break; - } - case 27: { - name = shard + ".iron"; - break; - } - case 28: { - name = shard + ".gold"; - break; - } - case 29: { - name = shard + ".obsidian"; - break; - } - case 30: { - name = shard + ".copper"; - break; - } - case 31: { - name = shard + ".tin"; - break; - } - case 32: { - name = shard + ".lead"; - break; - } - case 33: { - name = shard + ".bronze"; - break; - } - } - return getUnlocalizedName() + "." + name; - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "wood"); - this.icon[1] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "stone"); - this.icon[2] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "iron"); - this.icon[3] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "gold"); - this.icon[4] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "diamond"); - this.icon[5] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "copper"); - this.icon[6] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "tin"); - this.icon[7] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "lead"); - this.icon[8] = ri.registerIcon(ModInformation.texturePath + ":materials/" + drillTop + "_" + "bronze"); - - this.icon[9] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "wood"); - this.icon[10] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "stone"); - this.icon[11] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "iron"); - this.icon[12] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "gold"); - this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "diamond"); - this.icon[14] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "copper"); - this.icon[15] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "tin"); - this.icon[16] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "lead"); - this.icon[17] = ri.registerIcon(ModInformation.texturePath + ":materials/" + chainsawTop + "_" + "bronze"); - - this.icon[18] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "iron"); - this.icon[19] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "gold"); - this.icon[20] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "diamond"); - this.icon[21] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "copper"); - this.icon[22] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "tin"); - this.icon[23] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "lead"); - this.icon[24] = ri.registerIcon(ModInformation.texturePath + ":materials/" + omnitoolTop + "_" + "bronze"); - - this.icon[25] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "wood"); - this.icon[26] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "stone"); - this.icon[27] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "iron"); - this.icon[28] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "gold"); - this.icon[29] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "diamond"); - this.icon[30] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "copper"); - this.icon[31] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "tin"); - this.icon[32] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "lead"); - this.icon[33] = ri.registerIcon(ModInformation.texturePath + ":materials/" + shard + "_" + "bronze"); - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } - - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - for (int i = 0; i <= 33; i++) { - list.add(new ItemStack(this, 1, i)); - } - } -} diff --git a/src/main/java/tombenpotter/emt/common/items/ItemElectricScribingTools.java b/src/main/java/tombenpotter/emt/common/items/ItemElectricScribingTools.java index 03558d8..84bd6c5 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemElectricScribingTools.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemElectricScribingTools.java @@ -15,59 +15,54 @@ import java.util.List; public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools { - public static int maxCharge = 400; + public static int maxCharge = 400; - public ItemElectricScribingTools() { - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(400); - this.setMaxStackSize(1); - } + public ItemElectricScribingTools() { + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(400); + this.setMaxStackSize(1); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 1; - } + @Override + public int getTier(ItemStack itemStack) { + return 1; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 5; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 5; + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } - - public void setDamage(ItemStack stack, int damage){ - super.setDamage(stack, damage > 1 ? damage : 1); - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/ItemIC2Baubles.java b/src/main/java/tombenpotter/emt/common/items/ItemIC2Baubles.java index 2c22041..0a7618e 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemIC2Baubles.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemIC2Baubles.java @@ -38,21 +38,21 @@ public class ItemIC2Baubles extends ItemBase implements IBauble { public String getUnlocalizedName(ItemStack itemstack) { String name = ""; switch (itemstack.getItemDamage()) { - case 0: { - name = "euMaker.armor"; - break; - } - case 1: { - name = "euMaker.inventory"; - break; - } - default: - name = "nothing"; - break; + case 0: { + name = "euMaker.armor"; + break; + } + case 1: { + name = "euMaker.inventory"; + break; + } + default: + name = "nothing"; + break; } return getUnlocalizedName() + "." + name; } - + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister ri) { this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":armoreumaker"); @@ -64,7 +64,6 @@ public class ItemIC2Baubles extends ItemBase implements IBauble { return this.icon[meta]; } - @SuppressWarnings({"rawtypes", "unchecked"}) @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { list.add(new ItemStack(this, 1, 0)); @@ -75,7 +74,8 @@ public class ItemIC2Baubles extends ItemBase implements IBauble { public BaubleType getBaubleType(ItemStack stack) { if (stack.getItemDamage() <= 1) { return BaubleType.RING; - } else { + } + else { return null; } } diff --git a/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java b/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java index cf949f2..90718d4 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemMaterials.java @@ -27,162 +27,161 @@ import java.util.List; public class ItemMaterials extends Item { - public IIcon[] icon = new IIcon[25]; + public IIcon[] icon = new IIcon[25]; - public ItemMaterials() { - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(0); - this.setMaxStackSize(64); - setHasSubtypes(true); - OreDictionary.registerOre("plateThaumium", new ItemStack(this, 1, 5)); - OreDictionary.registerOre("slimeball", new ItemStack(this, 1, 8)); - } + public ItemMaterials() { + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(0); + this.setMaxStackSize(64); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = null; - switch (itemstack.getItemDamage()) { - case 0: - name = "oreClusterUranium"; - break; - case 1: - name = "crushedOreAmber"; - break; - case 2: - name = "purifiedOreAmber"; - break; - case 3: - name = "crushedOreCinnabar"; - break; - case 4: - name = "purifiedOreCinnabar"; - break; - case 5: - name = "thaumiumPlate"; - break; - case 6: - name = "lightningSummoner"; - break; - case 7: - name = "featherMesh"; - break; - case 8: - name = "glue"; - break; - case 9: - name = "ductTape"; - break; - case 10: - name = "rubberBall"; - break; - case 11: - name = "cardboard"; - break; - case 12: - name = "featherGluedCardboardWing"; - break; - case 13: - name = "taintedFeather"; - break; - case 14: - name = "thaumiumWing"; - break; - case 15: - name = "uumatterDrop"; - break; - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = null; + switch (itemstack.getItemDamage()) { + case 0: + name = "oreClusterUranium"; + break; + case 1: + name = "crushedOreAmber"; + break; + case 2: + name = "purifiedOreAmber"; + break; + case 3: + name = "crushedOreCinnabar"; + break; + case 4: + name = "purifiedOreCinnabar"; + break; + case 5: + name = "thaumiumPlate"; + break; + case 6: + name = "lightningSummoner"; + break; + case 7: + name = "featherMesh"; + break; + case 8: + name = "glue"; + break; + case 9: + name = "ductTape"; + break; + case 10: + name = "rubberBall"; + break; + case 11: + name = "cardboard"; + break; + case 12: + name = "featherGluedCardboardWing"; + break; + case 13: + name = "taintedFeather"; + break; + case 14: + name = "thaumiumWing"; + break; + case 15: + name = "uumatterDrop"; + break; + default: + name = "nothing"; + break; + } + return "item." + ModInformation.modid + "." + name; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":materials/clusteruranium"); - this.icon[1] = ri.registerIcon(ModInformation.texturePath + ":materials/crushedamber"); - this.icon[2] = ri.registerIcon(ModInformation.texturePath + ":materials/purifiedamber"); - this.icon[3] = ri.registerIcon(ModInformation.texturePath + ":materials/crushedcinnabar"); - this.icon[4] = ri.registerIcon(ModInformation.texturePath + ":materials/purifiedcinnabar"); - this.icon[5] = ri.registerIcon(ModInformation.texturePath + ":materials/thaumiumplate"); - this.icon[6] = ri.registerIcon(ModInformation.texturePath + ":materials/lightningsummoner"); - this.icon[7] = ri.registerIcon(ModInformation.texturePath + ":materials/feathermesh"); - this.icon[8] = ri.registerIcon(ModInformation.texturePath + ":materials/glue"); - this.icon[9] = ri.registerIcon(ModInformation.texturePath + ":materials/ducttape"); - this.icon[10] = ri.registerIcon(ModInformation.texturePath + ":materials/rubberball"); - this.icon[11] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboard"); - this.icon[12] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboardsheet"); - this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":materials/taintedfeather"); - this.icon[14] = ri.registerIcon(ModInformation.texturePath + ":materials/thaumiumWing"); - this.icon[15] = ri.registerIcon(ModInformation.texturePath + ":materials/uumatterdrop"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(ModInformation.texturePath + ":materials/clusteruranium"); + this.icon[1] = ri.registerIcon(ModInformation.texturePath + ":materials/crushedamber"); + this.icon[2] = ri.registerIcon(ModInformation.texturePath + ":materials/purifiedamber"); + this.icon[3] = ri.registerIcon(ModInformation.texturePath + ":materials/crushedcinnabar"); + this.icon[4] = ri.registerIcon(ModInformation.texturePath + ":materials/purifiedcinnabar"); + this.icon[5] = ri.registerIcon(ModInformation.texturePath + ":materials/thaumiumplate"); + this.icon[6] = ri.registerIcon(ModInformation.texturePath + ":materials/lightningsummoner"); + this.icon[7] = ri.registerIcon(ModInformation.texturePath + ":materials/feathermesh"); + this.icon[8] = ri.registerIcon(ModInformation.texturePath + ":materials/glue"); + this.icon[9] = ri.registerIcon(ModInformation.texturePath + ":materials/ducttape"); + this.icon[10] = ri.registerIcon(ModInformation.texturePath + ":materials/rubberball"); + this.icon[11] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboard"); + this.icon[12] = ri.registerIcon(ModInformation.texturePath + ":materials/cardboardsheet"); + this.icon[13] = ri.registerIcon(ModInformation.texturePath + ":materials/taintedfeather"); + this.icon[14] = ri.registerIcon(ModInformation.texturePath + ":materials/thaumiumWing"); + this.icon[15] = ri.registerIcon(ModInformation.texturePath + ":materials/uumatterdrop"); + } - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - for (int i = 1; i <= 15; i++) { - list.add(new ItemStack(this, 1, i)); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { + for (int i = 1; i <= 15; i++) { + list.add(new ItemStack(this, 1, i)); + } + } - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (stack != null && stack.getItemDamage() == 6) { - player.swingItem(); - float f = 1.0F; - float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); - float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); - double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f); - double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; - double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); - Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); - float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); - float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); - float f5 = -MathHelper.cos(-f1 * 0.01745329F); - float f6 = MathHelper.sin(-f1 * 0.01745329F); - float f7 = f4 * f5; - float f8 = f6; - float f9 = f3 * f5; - double d3 = 5000D; - Vec3 vec3d1 = playerLoc.addVector(f7 * d3, f8 * d3, f9 * d3); - MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(playerLoc, vec3d1, true); - if (movingobjectposition == null) { - return stack; - } - if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); - } else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { - Entity entityhit = movingobjectposition.entityHit; - double x = entityhit.posX; - double y = entityhit.posY; - double z = entityhit.posZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); - } - if (player.capabilities.isCreativeMode) { - return stack; - } else { - player.inventory.consumeInventoryItem(this); - return stack; - } - } - return stack; - } + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (stack != null && stack.getItemDamage() == 6) { + player.swingItem(); + float f = 1.0F; + float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); + float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); + double playerX = player.prevPosX + ((player.posX - player.prevPosX) * f); + double playerY = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; + double playerZ = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); + Vec3 playerLoc = Vec3.createVectorHelper(playerX, playerY, playerZ); + float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); + float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); + float f5 = -MathHelper.cos(-f1 * 0.01745329F); + float f6 = MathHelper.sin(-f1 * 0.01745329F); + float f7 = f4 * f5; + float f8 = f6; + float f9 = f3 * f5; + double d3 = 5000D; + Vec3 vec3d1 = playerLoc.addVector(f7 * d3, f8 * d3, f9 * d3); + MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(playerLoc, vec3d1, true); + if (movingobjectposition == null) { + return stack; + } + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); + } + else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { + Entity entityhit = movingobjectposition.entityHit; + double x = entityhit.posX; + double y = entityhit.posY; + double z = entityhit.posZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); + } + if (player.capabilities.isCreativeMode) { + return stack; + } + else { + player.inventory.consumeInventoryItem(this); + return stack; + } + } + return stack; + } - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { - super.onUpdate(stack, world, entity, par4, par5); - if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 13)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false)); - if ((entity instanceof EntityPlayer)) { - InventoryUtils.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage()); - } - } - } + public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { + super.onUpdate(stack, world, entity, par4, par5); + if ((!entity.worldObj.isRemote) && ((stack.getItemDamage() == 13)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionTaintPoisonID)) && (world.rand.nextInt(4321) <= stack.stackSize)) { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 120, 0, false)); + if ((entity instanceof EntityPlayer)) { + InventoryUtils.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage()); + } + } + } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/items/ItemOneRing.java b/src/main/java/tombenpotter/emt/common/items/ItemOneRing.java index 9605b3d..d55a3ec 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemOneRing.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemOneRing.java @@ -41,15 +41,15 @@ public class ItemOneRing extends ItemBase implements IBauble { public String getUnlocalizedName(ItemStack itemstack) { String name = ""; switch (itemstack.getItemDamage()) { - case 0: { - name = "oneRing"; - break; - } - default: - name = "nothing"; - break; + case 0: { + name = "oneRing"; + break; } - return getUnlocalizedName() + "." + name; + default: + name = "nothing"; + break; + } + return "item." + ModInformation.modid + ".bauble." + name; } @SideOnly(Side.CLIENT) @@ -62,7 +62,7 @@ public class ItemOneRing extends ItemBase implements IBauble { return this.icon[meta]; } - @SuppressWarnings({"rawtypes", "unchecked"}) + @SuppressWarnings({ "rawtypes", "unchecked" }) @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { list.add(new ItemStack(this, 1, 0)); @@ -72,7 +72,8 @@ public class ItemOneRing extends ItemBase implements IBauble { public BaubleType getBaubleType(ItemStack stack) { if (stack.getItemDamage() <= 0) { return BaubleType.RING; - } else { + } + else { return null; } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemElectricBootsTraveller.java b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemElectricBootsTraveller.java index fda4e22..a44348f 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemElectricBootsTraveller.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemElectricBootsTraveller.java @@ -32,190 +32,193 @@ import java.util.List; public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor { - public int maxCharge = 100000; - public int energyPerDamage = 100; - public int visDiscount = 2; - public float speedBonus = 0.055F; - public float jumpBonus = 0.3F; - public double transferLimit = 100; + public int maxCharge = 100000; + public int energyPerDamage = 100; + public int visDiscount = 2; + public float speedBonus = 0.055F; + public float jumpBonus = 0.3F; + public double transferLimit = 100; - public ItemElectricBootsTraveller(int par3, int par4) { - super(ArmorMaterial.DIAMOND, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(ElectroMagicTools.tabEMT); - MinecraftForge.EVENT_BUS.register(this); - } + public ItemElectricBootsTraveller(int par3, int par4) { + super(ArmorMaterial.DIAMOND, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(ElectroMagicTools.tabEMT); + MinecraftForge.EVENT_BUS.register(this); + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_electric"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_electric"); + } - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); - } else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); - } - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); + } + else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); + } + } - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } else { - return 0; - } - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } + else { + return 0; + } + } - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) { - if ((player.worldObj.isRemote) && (!player.isSneaking())) { - if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) { - Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight)); - } - player.stepHeight = 1.0F; - } - if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) { - player.moveFlying(0F, 1F, speedBonus); - player.jumpMovementFactor = jumpBonus; - } - } - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) { + if ((player.worldObj.isRemote) && (!player.isSneaking())) { + if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(player.getEntityId()))) { + Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight)); + } + player.stepHeight = 1.0F; + } + if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) { + player.moveFlying(0F, 1F, speedBonus); + player.jumpMovementFactor = jumpBonus; + } + } + } - @SubscribeEvent - public void onPlayerJump(LivingEvent.LivingJumpEvent event) { - if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; + @SubscribeEvent + public void onPlayerJump(LivingEvent.LivingJumpEvent event) { + if (event.entityLiving instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entityLiving; + boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; - if (hasArmor) - player.motionY += jumpBonus; - } - } + if (hasArmor) + player.motionY += jumpBonus; + } + } - @SubscribeEvent - public void onLivingFall(LivingFallEvent event) { - if (event.entity instanceof EntityPlayer) { - EntityPlayer entity = (EntityPlayer) event.entity; - if ((entity.inventory.armorInventory[0] != null) && (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) { - ItemStack stack = entity.inventory.armorInventory[0]; - if (ElectricItem.manager.use(stack, energyPerDamage, entity)) event.setCanceled(true); - } - } - } + @SubscribeEvent + public void onLivingFall(LivingFallEvent event) { + if (event.entity instanceof EntityPlayer) { + EntityPlayer entity = (EntityPlayer) event.entity; + if ((entity.inventory.armorInventory[0] != null) && (entity.inventory.armorInventory[0].getItem() instanceof ItemElectricBootsTraveller)) { + ItemStack stack = entity.inventory.armorInventory[0]; + if (ElectricItem.manager.use(stack, energyPerDamage, entity)) + event.setCanceled(true); + } + } + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/electricboots.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/electricboots.png"; + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (ConfigHandler.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (ConfigHandler.enchanting == false) { + return 0; + } + else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (ConfigHandler.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (ConfigHandler.enchanting == false) { + return false; + } + else { + return true; + } + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + public int getEnergyPerDamage() { + return energyPerDamage; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemNanoBootsTraveller.java b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemNanoBootsTraveller.java index 185c667..a410f65 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemNanoBootsTraveller.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemNanoBootsTraveller.java @@ -10,24 +10,24 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller { - public ItemNanoBootsTraveller(int par3, int par4) { - super(par3, par4); - maxCharge = 1000000; - speedBonus = (float) ConfigHandler.nanoBootsSpeed; - jumpBonus = (float) ConfigHandler.nanoBootsJump; - visDiscount = 4; - transferLimit = 1000; - energyPerDamage = 500; - } + public ItemNanoBootsTraveller(int par3, int par4) { + super(par3, par4); + maxCharge = 1000000; + speedBonus = (float) ConfigHandler.nanoBootsSpeed; + jumpBonus = (float) ConfigHandler.nanoBootsJump; + visDiscount = 4; + transferLimit = 1000; + energyPerDamage = 500; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_nano"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_nano"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/nanobootstravel.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/nanobootstravel.png"; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemQuantumBootsTraveller.java b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemQuantumBootsTraveller.java index e74b098..5c7a7e8 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemQuantumBootsTraveller.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/boots/ItemQuantumBootsTraveller.java @@ -10,24 +10,24 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller { - public ItemQuantumBootsTraveller(int par3, int par4) { - super(par3, par4); - maxCharge = 10000000; - speedBonus = (float) ConfigHandler.quantumBootsSpeed; - jumpBonus = (float) ConfigHandler.quantumBootsJump; - visDiscount = 5; - transferLimit = 10000; - energyPerDamage = 1000; - } + public ItemQuantumBootsTraveller(int par3, int par4) { + super(par3, par4); + maxCharge = 10000000; + speedBonus = (float) ConfigHandler.quantumBootsSpeed; + jumpBonus = (float) ConfigHandler.quantumBootsJump; + visDiscount = 5; + transferLimit = 10000; + energyPerDamage = 1000; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_quantum"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/boots_quantum"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/quantumbootstravel.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/quantumbootstravel.png"; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java b/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java index ba0c737..20d9b8a 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/chestplates/ItemInfusedQuantumChestplate.java @@ -65,35 +65,34 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingFallEvent; public class ItemInfusedQuantumChestplate extends ItemArmorElectric { - + IIcon iconNONE; IIcon iconJETPACK; IIcon iconTHAUMIUM; IIcon iconNANO; IIcon iconQUANTUM; Random rnd; - + public final byte NONE = 0; public final byte JETPACK = 1; public final byte THAUMIUM = 2; public final byte NANO = 3; public final byte QUANTUM = 4; - + protected static final Map potionRemovalCost = new HashMap(); public static AudioSource audioSource; private static boolean lastJetpackUsed = false; - + public ItemInfusedQuantumChestplate(InternalName internalName, int armorType) { super(internalName, InternalName.quantum, armorType, 2000000, 12000.0D, 4); MinecraftForge.EVENT_BUS.register(this); this.setCreativeTab(ElectroMagicTools.tabEMT); - potionRemovalCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); - potionRemovalCost.put(Integer.valueOf(IC2Potion.radiation.id), Integer.valueOf(10000)); - potionRemovalCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(25000)); + potionRemovalCost.put(Potion.poison.id, 10000); + potionRemovalCost.put(IC2Potion.radiation.id, 10000); + potionRemovalCost.put(Potion.wither.id, 25000); rnd = new Random(); - + } - @SideOnly(Side.CLIENT) @Override @@ -104,8 +103,17 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { iconNANO = iconRegister.registerIcon(ModInformation.texturePath + ":armor/armor_quantum_chest_wing_n"); iconQUANTUM = iconRegister.registerIcon(ModInformation.texturePath + ":armor/armor_quantum_chest_wing_q"); } - + @Override + public String getUnlocalizedName(ItemStack itemstack) { + return "item." + ModInformation.modid + ".chestplates.infusedQuantum"; + } + + public String getItemStackDisplayName(ItemStack stack) + { + return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); + } + @SubscribeEvent public void onEntityLivingFallEvent(LivingFallEvent event) { if ((IC2.platform.isSimulating()) && ((event.entity instanceof EntityLivingBase))) { @@ -121,159 +129,169 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { } } } - @Override public double getDamageAbsorptionRatio() { return 1.1D; } - - @Override + @Override public int getEnergyPerDamage() { return 20000; } - @SideOnly(Side.CLIENT) @Override public EnumRarity getRarity(ItemStack stack) { return EnumRarity.rare; } - @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { NBTTagCompound nbt = StackUtil.getOrCreateNbtData(itemStack); - + byte toggleTimer = nbt.getByte("toggleTimer"); boolean ret = false; boolean hoverMode = nbt.getBoolean("hoverMode"); boolean jetpackUsed = false; byte wing = nbt.getByte("wing"); - - if(!world.isRemote){ - - if(wing == 0){ + + if (!world.isRemote) { + if (nbt.hasKey("useother")) { + String useother = nbt.getString("useother"); + if (useother.equals("Jetpack")) { + nbt.setByte("wing", JETPACK); + } + if (useother.equals("TW")) { + nbt.setByte("wing", THAUMIUM); + } + if (useother.equals("NW")) { + nbt.setByte("wing", NANO); + } + if (useother.equals("QW")) { + nbt.setByte("wing", QUANTUM); + } + wing = nbt.getByte("wing"); + nbt.removeTag("useother"); + } + + if (wing == 0) { nbt.setByte("wing", NONE); } - + if ((IC2.keyboard.isJumpKeyDown(player)) && (IC2.keyboard.isModeSwitchKeyDown(player)) && (toggleTimer == 0)) { toggleTimer = 30; hoverMode = !hoverMode; - if (IC2.platform.isSimulating()) - { + if (IC2.platform.isSimulating()) { nbt.setBoolean("hoverMode", hoverMode); - if (hoverMode) - { + if (hoverMode) { IC2.platform.messagePlayer(player, "Hover Mode enabled.", new Object[0]); - } else - { + } + else { IC2.platform.messagePlayer(player, "Hover Mode disabled.", new Object[0]); } } } - - if(player.inventory.getCurrentItem() != null && player.isSneaking() && toggleTimer == 0 && wing == NONE){ - if(player.inventory.getCurrentItem().getItem() == IC2Items.getItem("electricJetpack").getItem()){ + + if (player.inventory.getCurrentItem() != null && player.isSneaking() && toggleTimer == 0 && wing == NONE) { + if (player.inventory.getCurrentItem().getItem() == IC2Items.getItem("electricJetpack").getItem()) { IC2.platform.messagePlayer(player, "Jetpack enabled.", new Object[0]); nbt.setByte("wing", JETPACK); - int charge = (int)ElectricItem.manager.getCharge(itemStack); - if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000){ + int charge = (int) ElectricItem.manager.getCharge(itemStack); + if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < 30000) { ElectricItem.manager.use(itemStack, 30000 - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); } - nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int)ElectricItem.manager.getCharge(itemStack))); + nbt.setInteger("jetpackCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int) ElectricItem.manager.getCharge(itemStack))); player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } - - else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.thaumiumWing){ + + else if (player.inventory.getCurrentItem().getItem() == ItemRegistry.thaumiumWing) { IC2.platform.messagePlayer(player, "Thaumium wings enabled.", new Object[0]); nbt.setByte("wing", THAUMIUM); player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } - - else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.nanoWing){ + + else if (player.inventory.getCurrentItem().getItem() == ItemRegistry.nanoWing) { IC2.platform.messagePlayer(player, "Nano wings enabled.", new Object[0]); nbt.setByte("wing", NANO); - int charge = (int)ElectricItem.manager.getCharge(itemStack); - if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemNanoWing.maxCharge){ + int charge = (int) ElectricItem.manager.getCharge(itemStack); + if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemNanoWing.maxCharge) { ElectricItem.manager.use(itemStack, ItemNanoWing.maxCharge - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); } - nbt.setInteger("NWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int)ElectricItem.manager.getCharge(itemStack))); + nbt.setInteger("NWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int) ElectricItem.manager.getCharge(itemStack))); player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } - - else if(player.inventory.getCurrentItem().getItem() == ItemRegistry.quantumWing){ + + else if (player.inventory.getCurrentItem().getItem() == ItemRegistry.quantumWing) { IC2.platform.messagePlayer(player, "Quantum wings enabled.", new Object[0]); nbt.setByte("wing", QUANTUM); - int charge = (int)ElectricItem.manager.getCharge(itemStack); - if(ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemQuantumWing.maxCharge){ + int charge = (int) ElectricItem.manager.getCharge(itemStack); + if (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) < ItemQuantumWing.maxCharge) { ElectricItem.manager.use(itemStack, ItemQuantumWing.maxCharge - ElectricItem.manager.getCharge(player.inventory.getCurrentItem()), player); } - nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int)ElectricItem.manager.getCharge(itemStack))); + nbt.setInteger("QWCharge", (int) (ElectricItem.manager.getCharge(player.inventory.getCurrentItem()) + charge - (int) ElectricItem.manager.getCharge(itemStack))); player.inventory.setInventorySlotContents(player.inventory.currentItem, null); } } - - if(player.inventory.getCurrentItem() == null && nbt.getBoolean("unequip") && player.isSneaking() && toggleTimer == 0 && IC2.platform.isSimulating()){ + + if (player.inventory.getCurrentItem() == null && nbt.getBoolean("unequip") && player.isSneaking() && toggleTimer == 0 && IC2.platform.isSimulating()) { toggleTimer = 30; - if(wing == JETPACK){ + if (wing == JETPACK) { IC2.platform.messagePlayer(player, "Jetpack disabled.", new Object[0]); nbt.setByte("wing", NONE); - ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem()); - if(nbt.getInteger("jetpackCharge") > 0) - ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false); - else + ItemStack charged = new ItemStack(IC2Items.getItem("electricJetpack").getItem()); + if (nbt.getInteger("jetpackCharge") > 0) + ElectricItem.manager.charge(charged, nbt.getInteger("jetpackCharge"), 1, true, false); + else ElectricItem.manager.charge(charged, 0, 1, true, false); - player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); + player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); } - - if(wing == THAUMIUM){ + + if (wing == THAUMIUM) { IC2.platform.messagePlayer(player, "Thaumium wings disabled.", new Object[0]); nbt.setByte("wing", NONE); player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(ItemRegistry.thaumiumWing)); } - - if(wing == NANO){ + + if (wing == NANO) { IC2.platform.messagePlayer(player, "Nano wings disabled.", new Object[0]); nbt.setByte("wing", NONE); ItemStack charged = new ItemStack(ItemRegistry.nanoWing); - if(nbt.getInteger("NWCharge") > 0) + if (nbt.getInteger("NWCharge") > 0) ElectricItem.manager.charge(charged, nbt.getInteger("NWCharge"), 3, true, false); else ElectricItem.manager.charge(charged, 0, 3, true, false); player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); } - - if(wing == QUANTUM){ + + if (wing == QUANTUM) { IC2.platform.messagePlayer(player, "Quantum wings disabled.", new Object[0]); nbt.setByte("wing", NONE); ItemStack charged = new ItemStack(ItemRegistry.quantumWing); - if(nbt.getInteger("QWCharge") > 0) + if (nbt.getInteger("QWCharge") > 0) ElectricItem.manager.charge(charged, nbt.getInteger("QWCharge"), 3, true, false); else ElectricItem.manager.charge(charged, 0, 3, true, false); player.inventory.setInventorySlotContents(player.inventory.currentItem, charged); } - + nbt.setBoolean("unequip", false); } } - + if ((IC2.keyboard.isJumpKeyDown(player) && wing == JETPACK) || (hoverMode && player.motionY < -0.029999999329447746D)) { jetpackUsed = useJetpack(player, hoverMode, itemStack); } - - if(wing == THAUMIUM) + + if (wing == THAUMIUM) useWing(player, itemStack, world, 0.15f, 0.7f, 0.5f, 0, false); - if(wing == NANO) + if (wing == NANO) useWing(player, itemStack, world, 0.25f, 0.6f, 0.3f, 5, true); - if(wing == QUANTUM) - useWing(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true); - - + if (wing == QUANTUM) + useWing(player, itemStack, world, 0.33f, 0.5f, 0.2f, 7, true); + if ((IC2.platform.isSimulating()) && (toggleTimer > 0)) { toggleTimer = (byte) (toggleTimer - 1); nbt.setByte("toggleTimer", toggleTimer); @@ -287,7 +305,8 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { if (audioSource != null) { audioSource.play(); } - } else if (audioSource != null) { + } + else if (audioSource != null) { audioSource.remove(); audioSource = null; } @@ -297,7 +316,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { audioSource.updatePosition(); } } - + ret = jetpackUsed; player.extinguish(); @@ -306,98 +325,108 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { player.inventoryContainer.detectAndSendChanges(); } } - - + @SideOnly(Side.CLIENT) @Override - public IIcon getIconIndex(ItemStack stack){ - try{ + public IIcon getIconIndex(ItemStack stack) { + try { byte wing = stack.stackTagCompound.getByte("wing"); - - switch(wing){ - case JETPACK : return iconJETPACK; - case THAUMIUM : return iconTHAUMIUM; - case NANO : return iconNANO; - case QUANTUM : return iconQUANTUM; - default : return iconNONE; + + switch (wing) { + case JETPACK: + return iconJETPACK; + case THAUMIUM: + return iconTHAUMIUM; + case NANO: + return iconNANO; + case QUANTUM: + return iconQUANTUM; + default: + return iconNONE; } + } catch (Exception e) { + return iconNONE; } - catch(Exception ex){return iconNONE;} } - - + @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining){ - try{ + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + try { byte wing = stack.stackTagCompound.getByte("wing"); - - switch(wing){ - case JETPACK : return iconJETPACK; - case THAUMIUM : return iconTHAUMIUM; - case NANO : return iconNANO; - case QUANTUM : return iconQUANTUM; - default : return iconNONE; + + switch (wing) { + case JETPACK: + return iconJETPACK; + case THAUMIUM: + return iconTHAUMIUM; + case NANO: + return iconNANO; + case QUANTUM: + return iconQUANTUM; + default: + return iconNONE; } + } catch (Exception e) { + return iconNONE; } - catch(Exception e){return iconNONE;} } - - + @Override public int getItemEnchantability() { - if (ConfigHandler.enchanting == false) - return 0; - else - return 4; + if (ConfigHandler.enchanting == false) + return 0; + else + return 4; + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + byte wing = stack.stackTagCompound.getByte("wing"); + + switch (wing) { + case JETPACK: + return ModInformation.texturePath + ":textures/models/quantum_jetpack.png"; + case THAUMIUM: + return ModInformation.texturePath + ":textures/models/quantum_wings_t.png"; + case NANO: + return ModInformation.texturePath + ":textures/models/quantum_wings_n.png"; + case QUANTUM: + return ModInformation.texturePath + ":textures/models/quantum_wings_q.png"; + default: + return ModInformation.texturePath + ":textures/models/quantum.png"; + } + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { + try { + if (entity instanceof EntityPlayer) { + byte wing = stack.stackTagCompound.getByte("wing"); + if (wing == JETPACK) { + ModelCpecialArmor mbm = new ModelCpecialArmor(1, 1); + return mbm; + } + else if (wing != 0) { + ModelCpecialArmor mbm = new ModelCpecialArmor(1, 2); + mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping"); + return mbm; + } + } + } catch (NullPointerException e) { + new ModelCpecialArmor(1, 0); + } + return new ModelCpecialArmor(1, 0); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + try { + list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + tier); + } catch (NullPointerException e) {} } - - - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - byte wing = stack.stackTagCompound.getByte("wing"); - - switch(wing){ - case JETPACK : return ModInformation.texturePath + ":textures/models/quantum_jetpack.png"; - case THAUMIUM : return ModInformation.texturePath + ":textures/models/quantum_wings_t.png"; - case NANO : return ModInformation.texturePath + ":textures/models/quantum_wings_n.png"; - case QUANTUM : return ModInformation.texturePath + ":textures/models/quantum_wings_q.png"; - default : return ModInformation.texturePath + ":textures/models/quantum.png"; - } - } - - - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { - try{ - if(entity instanceof EntityPlayer){ - byte wing = stack.stackTagCompound.getByte("wing"); - if(wing == JETPACK){ - ModelCpecialArmor mbm = new ModelCpecialArmor(1, 1); - return mbm; - } - else if(wing != 0){ - ModelCpecialArmor mbm = new ModelCpecialArmor(1, 2); - mbm.isJumping = IC2.keyboard.isJumpKeyDown((EntityPlayer) entity); - return mbm; - } - } - } - catch(NullPointerException e){new ModelCpecialArmor(1, 0);} - return new ModelCpecialArmor(1, 0); - } - - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - try{ - list.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerTier") + " " + tier); - } - catch(NullPointerException e){} - } - public boolean useJetpack(EntityPlayer player, boolean hoverMode, ItemStack stack) { int jetpackMaxCharge = 30000; ItemStack jetpack = stack; @@ -405,8 +434,8 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { return false; float power = 1.0F; float dropPercentage = 0.05F; - if (((float)ElectricItem.manager.getCharge(stack) / (float)jetpackMaxCharge) <= dropPercentage){ - power = (float) (power * (ElectricItem.manager.getCharge(stack) / (float)jetpackMaxCharge) * dropPercentage); + if (((float) ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) <= dropPercentage) { + power = (float) (power * (ElectricItem.manager.getCharge(stack) / (float) jetpackMaxCharge) * dropPercentage); } if (IC2.keyboard.isForwardKeyDown(player)) { float retruster = 3.5F; @@ -418,7 +447,7 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { player.moveFlying(0.0F, 0.4F * forwardpower, 0.02F); } } - + int worldHeight = IC2.getWorldHeight(player.worldObj); double y = player.posY; @@ -455,55 +484,56 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric { IC2.platform.resetPlayerInAirTime(player); return true; } - - - void useWing(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric){ - NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); + + void useWing(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount, boolean isElectric) { + NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); boolean isJumping = IC2.keyboard.isJumpKeyDown(player); - - if(isJumping){ - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", true); - nbtData.setByte("f", (byte) (f + 1)); - if(f > 7) nbtData.setByte("f", (byte) 7); - } - else if(nbtData.getBoolean("isHolding")){ - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", false); - player.motionY = motionY * f; - ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); - if(player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5){ - player.motionX /= motionXZ; - player.motionZ /= motionXZ; - } - world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); - for(int i = 0; i < 4; i++){ - world.spawnParticle("cloud", player.posX - 1 + (rnd.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (rnd.nextInt(100) / 50d), 0, -0.5, 0); - } - - nbtData.setByte("f", (byte) 0); - } - - if (isJumping && !player.onGround && player.motionY < 0){ - player.motionY *= f1; - } - - if (player.isInWater() && !player.capabilities.isCreativeMode) { - player.motionY += -0.05; - } - - if(ConfigHandler.impactOfRain){ - if ((world.getBiomeGenForCoords((int)player.posX, (int)player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int)player.posX, (int)player.posY, (int)player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode){ - player.motionY += -0.05; - } - } - - if (player.isSneaking() && !player.onGround && player.motionY < 0) { - player.motionY *= 0.6; - } - - if (player.fallDistance > 0.0F) { - player.fallDistance = 0; - } - } + nbtData.setBoolean("isJumping", isJumping); + + if (isJumping) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", true); + nbtData.setByte("f", (byte) (f + 1)); + if (f > 7) + nbtData.setByte("f", (byte) 7); + } + else if (nbtData.getBoolean("isHolding")) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", false); + player.motionY = motionY * f; + ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); + if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { + player.motionX /= motionXZ; + player.motionZ /= motionXZ; + } + world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); + for (int i = 0; i < 4; i++) { + world.spawnParticle("cloud", player.posX - 1 + (rnd.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (rnd.nextInt(100) / 50d), 0, -0.5, 0); + } + + nbtData.setByte("f", (byte) 0); + } + + if (isJumping && !player.onGround && player.motionY < 0) { + player.motionY *= f1; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) { + player.motionY += -0.05; + } + + if (ConfigHandler.impactOfRain) { + if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode) { + player.motionY += -0.05; + } + } + + if (player.isSneaking() && !player.onGround && player.motionY < 0) { + player.motionY *= 0.6; + } + + if (player.fallDistance > 0.0F) { + player.fallDistance = 0; + } + } } \ No newline at end of file diff --git a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemElectricGoggles.java b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemElectricGoggles.java index 3312620..700d0e9 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemElectricGoggles.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemElectricGoggles.java @@ -29,162 +29,165 @@ import java.util.List; public class ItemElectricGoggles extends ItemArmor implements IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor { - public double maxCharge = 10000; - public double transferLimit = 10; - public int tier = 2; - public int energyPerDamage = 100; - public int visDiscount = 5; + public double maxCharge = 10000; + public double transferLimit = 10; + public int tier = 2; + public int energyPerDamage = 100; + public int visDiscount = 5; - public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setCreativeTab(ElectroMagicTools.tabEMT); - } + public ItemElectricGoggles(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setCreativeTab(ElectroMagicTools.tabEMT); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_electric"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_electric"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/electricgoggles.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/electricgoggles.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (ConfigHandler.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (ConfigHandler.enchanting == false) { + return 0; + } + else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (ConfigHandler.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (ConfigHandler.enchanting == false) { + return false; + } + else { + return true; + } + } - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @Override - public boolean showNodes(ItemStack itemstack, EntityLivingBase player) { - return true; - } + @Override + public boolean showNodes(ItemStack itemstack, EntityLivingBase player) { + return true; + } - @Override - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { - return true; - } + @Override + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { + return true; + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); - } else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); - } - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 0); + } + else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, (int) damageLimit); + } + } - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } else { - return 0; - } - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } + else { + return 0; + } + } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + public int getEnergyPerDamage() { + return energyPerDamage; + } - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemNanoGoggles.java b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemNanoGoggles.java index e3763e9..125a0c5 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemNanoGoggles.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemNanoGoggles.java @@ -17,45 +17,46 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemNanoGoggles extends ItemElectricGoggles { - public ItemNanoGoggles(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(27); - this.setMaxStackSize(1); - visDiscount = 6; - tier = 3; - maxCharge = 100000; - energyPerDamage = 1000; - transferLimit = 100; - } + public ItemNanoGoggles(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(27); + this.setMaxStackSize(1); + visDiscount = 6; + tier = 3; + maxCharge = 100000; + energyPerDamage = 1000; + transferLimit = 100; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_nano"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_nano"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/thaumicnanohelmet.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/thaumicnanohelmet.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if (ConfigHandler.nightVisionOff == false) { - if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (ConfigHandler.nightVisionOff == false) { + if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { - int x = MathHelper.floor_double(player.posX); - int z = MathHelper.floor_double(player.posZ); - int y = MathHelper.floor_double(player.posY); + int x = MathHelper.floor_double(player.posX); + int z = MathHelper.floor_double(player.posZ); + int y = MathHelper.floor_double(player.posY); - int lightlevel = player.worldObj.getBlockLightValue(x, y, z); - if (lightlevel >= 0) - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); - ElectricItem.manager.use(itemStack, 1 / 1000, player); - } else { - player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); - } - } - } + int lightlevel = player.worldObj.getBlockLightValue(x, y, z); + if (lightlevel >= 0) + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); + ElectricItem.manager.use(itemStack, 1 / 1000, player); + } + else { + player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemQuantumGoggles.java b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemQuantumGoggles.java index 9abcf8c..ec43d53 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemQuantumGoggles.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemQuantumGoggles.java @@ -23,76 +23,77 @@ import java.util.Map; public class ItemQuantumGoggles extends ItemNanoGoggles { - private static final Map potionCost = new HashMap(); + private static final Map potionCost = new HashMap(); - public ItemQuantumGoggles(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(27); - this.setMaxStackSize(1); - maxCharge = 10000000; - tier = 3; - visDiscount = 8; - transferLimit = 10000; - energyPerDamage = 1000; + public ItemQuantumGoggles(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(27); + this.setMaxStackSize(1); + maxCharge = 10000000; + tier = 3; + visDiscount = 8; + transferLimit = 10000; + energyPerDamage = 1000; - potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); - potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); - potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); - } + potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); + potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); + potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_quantum"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_quantum"); + } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/thaumicquantumhelmet.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/thaumicquantumhelmet.png"; + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - int refill = player.getAir(); - if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) { - player.setAir(refill + 200); - ElectricItem.manager.use(itemStack, 1000, null); - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + int refill = player.getAir(); + if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) { + player.setAir(refill + 200); + ElectricItem.manager.use(itemStack, 1000, null); + } - Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator(); - do { - if (!i$.hasNext()) { - break; - } - { - PotionEffect effect = (PotionEffect) i$.next(); - int id = effect.getPotionID(); - Integer cost = (Integer) potionCost.get(Integer.valueOf(id)); - if (cost != null) { - cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1)); - if (ElectricItem.manager.canUse(itemStack, cost.intValue())) { - ElectricItem.manager.use(itemStack, cost.intValue(), null); - ItemStack milk = (new ItemStack(Items.milk_bucket)); - player.curePotionEffects(milk); - } - } - } - } while (true); + Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator(); + do { + if (!i$.hasNext()) { + break; + } + { + PotionEffect effect = (PotionEffect) i$.next(); + int id = effect.getPotionID(); + Integer cost = (Integer) potionCost.get(Integer.valueOf(id)); + if (cost != null) { + cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1)); + if (ElectricItem.manager.canUse(itemStack, cost.intValue())) { + ElectricItem.manager.use(itemStack, cost.intValue(), null); + ItemStack milk = (new ItemStack(Items.milk_bucket)); + player.curePotionEffects(milk); + } + } + } + } + while (true); - if (ConfigHandler.nightVisionOff == false) { - if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { - int x = MathHelper.floor_double(player.posX); - int z = MathHelper.floor_double(player.posZ); - int y = MathHelper.floor_double(player.posY); - int lightlevel = player.worldObj.getBlockLightValue(x, y, z); - if (lightlevel >= 0) - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); - ElectricItem.manager.use(itemStack, 1 / 1000, player); - } else { - player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); - } - } - } + if (ConfigHandler.nightVisionOff == false) { + if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { + int x = MathHelper.floor_double(player.posX); + int z = MathHelper.floor_double(player.posZ); + int y = MathHelper.floor_double(player.posY); + int lightlevel = player.worldObj.getBlockLightValue(x, y, z); + if (lightlevel >= 0) + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); + ElectricItem.manager.use(itemStack, 1 / 1000, player); + } + else { + player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemSolarHelmetRevealing.java b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemSolarHelmetRevealing.java index 3d751bd..19db09a 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemSolarHelmetRevealing.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/goggles/ItemSolarHelmetRevealing.java @@ -24,37 +24,36 @@ import java.util.Map; public class ItemSolarHelmetRevealing extends ItemQuantumGoggles { - private int ticker; - private int generating; - private int genDay; - private int genNight; - private boolean sunIsUp; - private boolean skyIsVisible; - private boolean noSunWorld; - private boolean dampPlace; + private int ticker; + private int generating; + private int genDay; + private int genNight; + private boolean sunIsUp; + private boolean skyIsVisible; + private boolean noSunWorld; + private boolean dampPlace; - @SuppressWarnings("rawtypes") - private static final Map potionCost = new HashMap(); + private static final Map potionCost = new HashMap(); - @SuppressWarnings("unchecked") - public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.maxCharge = 1000000; - this.genDay = 256; - this.genNight = 128; - maxCharge = 10000000; - visDiscount = 7; - tier = 3; - transferLimit = 10000; - energyPerDamage = 10000; + @SuppressWarnings("unchecked") + public ItemSolarHelmetRevealing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.maxCharge = 1000000; + this.genDay = 256; + this.genNight = 128; + maxCharge = 10000000; + visDiscount = 7; + tier = 3; + transferLimit = 10000; + energyPerDamage = 10000; - potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); - potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); - potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); - } + potionCost.put(Integer.valueOf(Potion.poison.id), Integer.valueOf(10000)); + potionCost.put(Integer.valueOf(Potion.wither.id), Integer.valueOf(15000)); + potionCost.put(Integer.valueOf(Potion.confusion.id), Integer.valueOf(5000)); + } @SideOnly(Side.CLIENT) @Override @@ -62,118 +61,125 @@ public class ItemSolarHelmetRevealing extends ItemQuantumGoggles { this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/goggles_solar"); } - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { - return ModInformation.texturePath + ":textures/models/solarrevealinghelmet.png"; - } + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { + return ModInformation.texturePath + ":textures/models/solarrevealinghelmet.png"; + } - @SuppressWarnings("unchecked") - @Override - public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { - if (ConfigHandler.nightVisionOff == false) { - if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { + @SuppressWarnings("unchecked") + @Override + public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { + if (ConfigHandler.nightVisionOff == false) { + if (ElectricItem.manager.canUse(itemStack, 1 / 1000)) { - int x = MathHelper.floor_double(player.posX); - int z = MathHelper.floor_double(player.posZ); - int y = MathHelper.floor_double(player.posY); + int x = MathHelper.floor_double(player.posX); + int z = MathHelper.floor_double(player.posZ); + int y = MathHelper.floor_double(player.posY); - int lightlevel = player.worldObj.getBlockLightValue(x, y, z); - if (lightlevel >= 0) - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); - ElectricItem.manager.use(itemStack, 1 / 1000, player); - } else { - player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); - } - } + int lightlevel = player.worldObj.getBlockLightValue(x, y, z); + if (lightlevel >= 0) + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 300, -3)); + ElectricItem.manager.use(itemStack, 1 / 1000, player); + } + else { + player.addPotionEffect(new PotionEffect(Potion.blindness.id, 300, 0, true)); + } + } - int refill = player.getAir(); - if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) { - player.setAir(refill + 200); - ElectricItem.manager.use(itemStack, 1000, null); - } + int refill = player.getAir(); + if (ElectricItem.manager.canUse(itemStack, 1000) && refill < 100) { + player.setAir(refill + 200); + ElectricItem.manager.use(itemStack, 1000, null); + } - @SuppressWarnings("rawtypes") Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator(); - do { - if (!i$.hasNext()) { - break; - } - { - PotionEffect effect = (PotionEffect) i$.next(); - int id = effect.getPotionID(); - Integer cost = (Integer) potionCost.get(Integer.valueOf(id)); - if (cost != null) { - cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1)); - if (ElectricItem.manager.canUse(itemStack, cost.intValue())) { - ElectricItem.manager.use(itemStack, cost.intValue(), null); - ItemStack milk = (new ItemStack(Items.milk_bucket)); - player.curePotionEffects(milk); - } - } - } - } while (true); + @SuppressWarnings("rawtypes") + Iterator i$ = (new LinkedList(player.getActivePotionEffects())).iterator(); + do { + if (!i$.hasNext()) { + break; + } + { + PotionEffect effect = (PotionEffect) i$.next(); + int id = effect.getPotionID(); + Integer cost = (Integer) potionCost.get(Integer.valueOf(id)); + if (cost != null) { + cost = Integer.valueOf(cost.intValue() * (effect.getAmplifier() + 1)); + if (ElectricItem.manager.canUse(itemStack, cost.intValue())) { + ElectricItem.manager.use(itemStack, cost.intValue(), null); + ItemStack milk = (new ItemStack(Items.milk_bucket)); + player.curePotionEffects(milk); + } + } + } + } + while (true); - if (worldObj.isRemote) { - return; - } - checkForSun(player); - if (this.generating > 0) { - int energyLeft = this.generating; - for (int i = 0; i < player.inventory.armorInventory.length; i++) { - if (energyLeft > 0) { - if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } else { - return; - } - } - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - if (energyLeft > 0) { - if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } else { - return; - } - } - } - } + if (worldObj.isRemote) { + return; + } + checkForSun(player); + if (this.generating > 0) { + int energyLeft = this.generating; + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + if (energyLeft > 0) { + if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + else { + return; + } + } + for (int j = 0; j < player.inventory.mainInventory.length; j++) { + if (energyLeft > 0) { + if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + else { + return; + } + } + } + } - public int checkForSun(EntityPlayer player) { - if (this.ticker++ % tickRate() == 0) { - updateVisibility(player); - } - if ((this.sunIsUp) && (this.skyIsVisible)) { - this.generating = (0 + this.genDay); - return this.generating; - } - if (this.skyIsVisible) { - this.generating = (0 + this.genNight); - return this.generating; - } - this.generating = 0; - return this.generating; - } + public int checkForSun(EntityPlayer player) { + if (this.ticker++ % tickRate() == 0) { + updateVisibility(player); + } + if ((this.sunIsUp) && (this.skyIsVisible)) { + this.generating = (0 + this.genDay); + return this.generating; + } + if (this.skyIsVisible) { + this.generating = (0 + this.genNight); + return this.generating; + } + this.generating = 0; + return this.generating; + } - public void updateVisibility(EntityPlayer player) { - this.dampPlace = (player.worldObj.getWorldChunkManager().getBiomeGenAt((int) player.posX, (int) player.posZ).getIntRainfall() > 0); - this.noSunWorld = player.worldObj.provider.hasNoSky; - Boolean rainWeather = Boolean.valueOf((this.dampPlace) && ((player.worldObj.isRaining()) || (player.worldObj.isThundering()))); - if ((!player.worldObj.isDaytime()) || (rainWeather.booleanValue())) { - this.sunIsUp = false; - } else { - this.sunIsUp = true; - } - if ((!player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ)) || (this.noSunWorld)) { - this.skyIsVisible = false; - } else { - this.skyIsVisible = true; - } - } + public void updateVisibility(EntityPlayer player) { + this.dampPlace = (player.worldObj.getWorldChunkManager().getBiomeGenAt((int) player.posX, (int) player.posZ).getIntRainfall() > 0); + this.noSunWorld = player.worldObj.provider.hasNoSky; + Boolean rainWeather = Boolean.valueOf((this.dampPlace) && ((player.worldObj.isRaining()) || (player.worldObj.isThundering()))); + if ((!player.worldObj.isDaytime()) || (rainWeather.booleanValue())) { + this.sunIsUp = false; + } + else { + this.sunIsUp = true; + } + if ((!player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY + 1, (int) player.posZ)) || (this.noSunWorld)) { + this.skyIsVisible = false; + } + else { + this.skyIsVisible = true; + } + } - public static int tickRate() { - return 128; - } + public static int tickRate() { + return 128; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemFeatherWing.java b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemFeatherWing.java index 9423157..7edf9c3 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemFeatherWing.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemFeatherWing.java @@ -24,98 +24,100 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemFeatherWing extends ItemArmor { - public int visDiscount = 0; - Random rnd; + public int visDiscount = 0; + Random rnd; - public ItemFeatherWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(120); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.isDamageable(); - rnd = new Random(); - } + public ItemFeatherWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(120); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.isDamageable(); + rnd = new Random(); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_feather"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_feather"); + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/featherwing.png"; - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/featherwing.png"; + } - @Override - @SideOnly(Side.CLIENT) - public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { - try{ - if(entity instanceof EntityPlayer){ - ModelWings mw = new ModelWings(); - mw.isJumping = stack.stackTagCompound.getBoolean("isJumping"); - return mw; - } - } - catch(NullPointerException e){return new ModelWings();} - return new ModelWings(); - } + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) { + try { + if (entity instanceof EntityPlayer) { + ModelWings mw = new ModelWings(); + mw.isJumping = stack.stackTagCompound.getBoolean("isJumping"); + return mw; + } + } catch (NullPointerException e) { + return new ModelWings(); + } + return new ModelWings(); + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - useWing(player, stack, world, 0.09f, 0.9f, 0.9f, 0); - } - - public void useWing(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount){ - NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); - boolean isJmuping = nbtData.getBoolean("isJumping"); - boolean isHolding = nbtData.getBoolean("isHolding"); - - nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player)); - - if(isJmuping){ - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", true); - nbtData.setByte("f", (byte) (f + 1)); - if(f > 7) nbtData.setByte("f", (byte) 7); - } - else if(isHolding){ - byte f = nbtData.getByte("f"); - nbtData.setBoolean("isHolding", false); - player.motionY = motionY * f; - ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); - if(player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5){ - player.motionX /= motionXZ; - player.motionZ /= motionXZ; - } - world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); - for(int i = 0; i < 4; i++){ - world.spawnParticle("cloud", player.posX - 1 + (rnd.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (rnd.nextInt(100) / 50d), 0, -0.5, 0); - } - nbtData.setByte("f", (byte) 0); - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + useWing(player, stack, world, 0.09f, 0.9f, 0.9f, 0); + } - if (isJmuping && !player.onGround && player.motionY < 0){ - player.motionY *= f1; - } - - if (player.isInWater() && !player.capabilities.isCreativeMode){ - player.motionY += -0.03; - } - - if(ConfigHandler.impactOfRain){ - if ((world.getBiomeGenForCoords((int)player.posX, (int)player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int)player.posX, (int)player.posY, (int)player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode){ - player.motionY += -0.03; - } - } + public void useWing(EntityPlayer player, ItemStack stack, World world, float motionY, float motionXZ, float f1, int amount) { + NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack); + boolean isJmuping = nbtData.getBoolean("isJumping"); + boolean isHolding = nbtData.getBoolean("isHolding"); - if (player.isSneaking() && !player.onGround && player.motionY < 0){ - player.motionY *= 0.6; - } - - if (player.fallDistance > 0.0F){ - player.fallDistance = 0; - } - } + nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player)); + + if (isJmuping) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", true); + nbtData.setByte("f", (byte) (f + 1)); + if (f > 7) + nbtData.setByte("f", (byte) 7); + } + else if (isHolding) { + byte f = nbtData.getByte("f"); + nbtData.setBoolean("isHolding", false); + player.motionY = motionY * f; + ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player); + if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) { + player.motionX /= motionXZ; + player.motionZ /= motionXZ; + } + world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1); + for (int i = 0; i < 4; i++) { + world.spawnParticle("cloud", player.posX - 1 + (rnd.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (rnd.nextInt(100) / 50d), 0, -0.5, 0); + } + nbtData.setByte("f", (byte) 0); + } + + if (isJmuping && !player.onGround && player.motionY < 0) { + player.motionY *= f1; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) { + player.motionY += -0.03; + } + + if (ConfigHandler.impactOfRain) { + if ((world.getBiomeGenForCoords((int) player.posX, (int) player.posZ)).canSpawnLightningBolt() && world.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ) && world.isRaining() && !player.capabilities.isCreativeMode) { + player.motionY += -0.03; + } + } + + if (player.isSneaking() && !player.onGround && player.motionY < 0) { + player.motionY *= 0.6; + } + + if (player.fallDistance > 0.0F) { + player.fallDistance = 0; + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemNanoWing.java b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemNanoWing.java index 65306e1..e4a834d 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemNanoWing.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemNanoWing.java @@ -25,145 +25,148 @@ import java.util.List; public class ItemNanoWing extends ItemThaumiumReinforcedWing implements IElectricItem, ISpecialArmor, IMetalArmor { - public static int maxCharge = 100000; - public int tier = 3; - public double transferLimit = 1000; - public int energyPerDamage = 100; + public static int maxCharge = 100000; + public int tier = 3; + public double transferLimit = 1000; + public int energyPerDamage = 100; - public ItemNanoWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(27); - this.setCreativeTab(ElectroMagicTools.tabEMT); - visDiscount = 5; - } + public ItemNanoWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(27); + this.setCreativeTab(ElectroMagicTools.tabEMT); + visDiscount = 5; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_nano"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_nano"); + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/nanowing.png"; - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/nanowing.png"; + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - this.useWing(player, stack, world, 0.25f, 0.6f, 0.3f, 5); - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + this.useWing(player, stack, world, 0.25f, 0.6f, 0.3f, 5); + } - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (ConfigHandler.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (ConfigHandler.enchanting == false) { + return 0; + } + else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (ConfigHandler.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (ConfigHandler.enchanting == false) { + return false; + } + else { + return true; + } + } - public int getEnergyPerDamage() { - return energyPerDamage; - } + public int getEnergyPerDamage() { + return energyPerDamage; + } - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - if (source.isUnblockable()) { - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); - } else { - double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); - } - } + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if (source.isUnblockable()) { + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, 0.0D, 3); + } + else { + double absorptionRatio = getBaseAbsorptionRatio() * getDamageAbsorptionRatio(); + int energyPerDamage = getEnergyPerDamage(); + double damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, (int) damageLimit); + } + } - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { - return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); - } else { - return 0; - } - } + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()) { + return (int) Math.round(20D * getBaseAbsorptionRatio() * getDamageAbsorptionRatio()); + } + else { + return 0; + } + } - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); + } - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return transferLimit; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return transferLimit; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemThaumiumReinforcedWing.java b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemThaumiumReinforcedWing.java index 5425b6a..18e3d43 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemThaumiumReinforcedWing.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/wings/ItemThaumiumReinforcedWing.java @@ -23,40 +23,39 @@ import java.util.List; public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable { - public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) { - super(material, par3, par4); - this.setMaxStackSize(1); - this.setMaxDamage(250); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.isDamageable(); - visDiscount = 4; - } + public ItemThaumiumReinforcedWing(ArmorMaterial material, int par3, int par4) { + super(material, par3, par4); + this.setMaxStackSize(1); + this.setMaxDamage(250); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.isDamageable(); + visDiscount = 4; + } - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return visDiscount; - } + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return visDiscount; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_thaumium"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":armor/wing_thaumium"); + } - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return ModInformation.texturePath + ":textures/models/thaumiumwing.png"; - } + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ModInformation.texturePath + ":textures/models/thaumiumwing.png"; + } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(TextHelper.localize("tooltip.EMT.visDiscount") + ": " + String.valueOf(visDiscount) + "%"); + } - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { - this.useWing(player, stack, world, 0.15f, 0.7f, 0.5f, 0); - } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + this.useWing(player, stack, world, 0.15f, 0.7f, 0.5f, 0); + } } diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTMachines.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTMachines.java index b94da92..7b4582a 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTMachines.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTMachines.java @@ -6,35 +6,35 @@ import net.minecraft.item.ItemStack; public class ItemBlockEMTMachines extends ItemBlock { - public ItemBlockEMTMachines(Block id) { - super(id); - setHasSubtypes(true); - } + public ItemBlockEMTMachines(Block id) { + super(id); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "wandrecharge"; - break; - } - case 1: { - name = "etheralprocessor"; - break; - } - case 2: { - name = "raindispeller"; - break; - } - default: - name = "nothing"; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "wandrecharge"; + break; + } + case 1: { + name = "etheralprocessor"; + break; + } + case 2: { + name = "raindispeller"; + break; + } + default: + name = "nothing"; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int par1) { - return par1; - } + @Override + public int getMetadata(int par1) { + return par1; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars.java index a78b232..e76301e 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars.java @@ -13,172 +13,172 @@ import static tombenpotter.emt.common.util.TextHelper.localize; public class ItemBlockEMTSolars extends ItemBlock { - public ItemBlockEMTSolars(Block id) { - super(id); - setHasSubtypes(true); - } + public ItemBlockEMTSolars(Block id) { + super(id); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "compressed"; - break; - } - case 1: { - name = "doublecompressed"; - break; - } - case 2: { - name = "triplecompressed"; - break; - } - case 3: { - name = "water"; - break; - } - case 4: { - name = "doublewater"; - break; - } - case 5: { - name = "triplewater"; - break; - } - case 6: { - name = "dark"; - break; - } - case 7: { - name = "doubledark"; - break; - } - case 8: { - name = "tripledark"; - break; - } - case 9: { - name = "order"; - break; - } - case 10: { - name = "doubleorder"; - break; - } - case 11: { - name = "tripleorder"; - break; - } - case 12: { - name = "fire"; - break; - } - case 13: { - name = "doublefire"; - break; - } - case 14: { - name = "triplefire"; - break; - } - case 15: { - name = "air"; - break; - } - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "compressed"; + break; + } + case 1: { + name = "doublecompressed"; + break; + } + case 2: { + name = "triplecompressed"; + break; + } + case 3: { + name = "water"; + break; + } + case 4: { + name = "doublewater"; + break; + } + case 5: { + name = "triplewater"; + break; + } + case 6: { + name = "dark"; + break; + } + case 7: { + name = "doubledark"; + break; + } + case 8: { + name = "tripledark"; + break; + } + case 9: { + name = "order"; + break; + } + case 10: { + name = "doubleorder"; + break; + } + case 11: { + name = "tripleorder"; + break; + } + case 12: { + name = "fire"; + break; + } + case 13: { + name = "doublefire"; + break; + } + case 14: { + name = "triplefire"; + break; + } + case 15: { + name = "air"; + break; + } + default: + name = "nothing"; + break; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int par1) { - return par1; - } + @Override + public int getMetadata(int par1) { + return par1; + } - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { - switch (itemstack.getItemDamage()) { - case 0: { - list.add(ConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 1: { - list.add(ConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 2: { - list.add(ConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); - break; - } - case 3: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - break; - } - case 4: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - break; - } - case 5: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); - break; - } - case 6: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 7: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 8: { - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); - break; - } - case 9: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); - break; - } - case 10: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); - break; - } + @Override + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add(ConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 1: { + list.add(ConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 2: { + list.add(ConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick")); + break; + } + case 3: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + break; + } + case 4: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + break; + } + case 5: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining")); + break; + } + case 6: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 7: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 8: { + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night")); + break; + } + case 9: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); + break; + } + case 10: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); + break; + } - case 11: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); - break; - } - case 12: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 13: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 14: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.lava")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); - break; - } - case 15: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); - break; - } - default: { - list.add(localize("tooltip.EMT.forget")); - break; - } - } - } + case 11: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple")); + break; + } + case 12: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 13: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 14: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.lava")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double") + " " + localize("tooltip.EMT.output.double.nether")); + break; + } + case 15: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); + break; + } + default: { + list.add(localize("tooltip.EMT.forget")); + break; + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars2.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars2.java index 43b6cfb..e3ed2c9 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars2.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEMTSolars2.java @@ -13,80 +13,79 @@ import static tombenpotter.emt.common.util.TextHelper.localize; public class ItemBlockEMTSolars2 extends ItemBlock { - public ItemBlockEMTSolars2(Block id) { - super(id); - setHasSubtypes(true); - } + public ItemBlockEMTSolars2(Block id) { + super(id); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "doubleair"; - break; - } - case 1: { - name = "tripleair"; - break; - } - case 2: { - name = "earth"; - break; - } - case 3: { - name = "doubleearth"; - break; - } - case 4: { - name = "tripleearth"; - break; - } - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "doubleair"; + break; + } + case 1: { + name = "tripleair"; + break; + } + case 2: { + name = "earth"; + break; + } + case 3: { + name = "doubleearth"; + break; + } + case 4: { + name = "tripleearth"; + break; + } + default: + name = "nothing"; + break; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int par1) { - return par1; - } + @Override + public int getMetadata(int par1) { + return par1; + } - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { - switch (itemstack.getItemDamage()) { - case 0: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); - break; - } - case 1: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); - break; - } - case 2: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); - break; - } - case 3: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); - break; - } - case 4: { - list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); - list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); - break; - } - default: { - list.add(localize("tooltip.EMT.forget")); - break; - } - } - } + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); + break; + } + case 1: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.height")); + break; + } + case 2: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.compressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); + break; + } + case 3: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.doubleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); + break; + } + case 4: { + list.add(TextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": " + TextHelper.LIGHT_GRAY + ConfigHandler.tripleCompressedSolarOutput + " " + localize("tooltip.EMT.euPerTick")); + list.add(TextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": " + TextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half") + " " + localize("tooltip.EMT.output.double.half.low")); + break; + } + default: { + list.add(localize("tooltip.EMT.forget")); + break; + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerator.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerator.java index 6166996..f2da805 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerator.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerator.java @@ -12,9 +12,4 @@ public class ItemBlockEssentiaGenerator extends ItemBlock { public ItemBlockEssentiaGenerator(Block id) { super(id); } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - // list.add(""); - } } diff --git a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java index 8c403f1..3416d07 100644 --- a/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java +++ b/src/main/java/tombenpotter/emt/common/items/blocks/ItemBlockEssentiaGenerators.java @@ -16,46 +16,59 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemBlockEssentiaGenerators extends ItemBlock { - public ItemBlockEssentiaGenerators(Block id) { - super(id); - setHasSubtypes(true); - } + public ItemBlockEssentiaGenerators(Block id) { + super(id); + setHasSubtypes(true); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: name = "potentia"; - break; - case 1: name = "ignis"; - break; - case 2: name = "auram"; - break; - case 3: name = "arbor"; - break; - case 4: name = "aer"; - break; - default: name = "nothing"; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: + name = "potentia"; + break; + case 1: + name = "ignis"; + break; + case 2: + name = "auram"; + break; + case 3: + name = "arbor"; + break; + case 4: + name = "aer"; + break; + default: + name = "nothing"; + } + return getUnlocalizedName() + "." + name; + } - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - switch(stack.getItemDamage()){ - case 0 : list.add(ConfigHandler.potentiaGenerator + " EU/t"); - break; - case 1 : list.add(ConfigHandler.ignisGenerator + " EU/t"); - break; - case 2 : list.add(ConfigHandler.auramGenerator + " EU/t"); - break; - case 3 : list.add(ConfigHandler.arborGenerator + " EU/t"); - break; - case 4 : list.add(ConfigHandler.aerGenerator + " EU/t"); - break; - } - } + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + switch (stack.getItemDamage()) { + case 0: + list.add(ConfigHandler.potentiaGenerator + " EU/t"); + break; + case 1: + list.add(ConfigHandler.ignisGenerator + " EU/t"); + break; + case 2: + list.add(ConfigHandler.auramGenerator + " EU/t"); + break; + case 3: + list.add(ConfigHandler.arborGenerator + " EU/t"); + break; + case 4: + list.add(ConfigHandler.aerGenerator + " EU/t"); + break; + } + } - @Override - public int getMetadata(int meta) {return meta;} + @Override + public int getMetadata(int meta) { + return meta; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemBaseFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemBaseFocus.java index dbfe978..c7785c5 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemBaseFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemBaseFocus.java @@ -40,10 +40,10 @@ public abstract class ItemBaseFocus extends ItemFocusBasic { boolean hasOrnament() { return false; } - + @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ir) { - this.icon = ir.registerIcon(ModInformation.texturePath + ":" + textureName); + public void registerIcons(IIconRegister ir) { + this.icon = ir.registerIcon(ModInformation.texturePath + ":" + textureName); } boolean hasDepth() { @@ -82,8 +82,8 @@ public abstract class ItemBaseFocus extends ItemFocusBasic { } public boolean isUseItem(ItemStack stack) { - return isVisCostPerTick(stack); - } + return isVisCostPerTick(stack); + } public boolean isVisCostPerTick() { return false; @@ -124,7 +124,6 @@ public abstract class ItemBaseFocus extends ItemFocusBasic { return 5; } - @SuppressWarnings({"rawtypes", "unchecked"}) @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { AspectList cost = getVisCost(); diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java index a3231f4..30da1c2 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java @@ -14,56 +14,58 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemChargeFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); + private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); - public ItemChargeFocus() { - super(".focus.charge", "focus_charge"); - } + public ItemChargeFocus() { + super(".focus.charge", "focus_charge"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0xFFFF00; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0xFFFF00; + } - @Override - public AspectList getVisCost(ItemStack stack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "WANDCHARGING"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "WANDCHARGING"; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { - int energyLeft = ConfigHandler.chargeFocusProduction; - for (int i = 0; i < player.inventory.armorInventory.length; i++) { - if (energyLeft > 0) { - if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } else { - return itemstack; - } - } - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - if (energyLeft > 0) { - if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { - double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } else { - return itemstack; - } - } - } - } - return itemstack; - } + int energyLeft = ConfigHandler.chargeFocusProduction; + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + if (energyLeft > 0) { + if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.armorInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + else { + return itemstack; + } + } + for (int j = 0; j < player.inventory.mainInventory.length; j++) { + if (energyLeft > 0) { + if ((player.inventory.mainInventory[j] != null) && (player.inventory.mainInventory[j].getItem() instanceof IElectricItem)) { + double sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + else { + return itemstack; + } + } + } + } + return itemstack; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java index 90f44fa..9f4e139 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java @@ -18,44 +18,44 @@ import tombenpotter.emt.ModInformation; public class ItemChristmasFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500); + private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500); - public ItemChristmasFocus() { - super(".focus.christmas", "focus_christmas" ); - } + public ItemChristmasFocus() { + super(".focus.christmas", "focus_christmas"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x00FFFF; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x00FFFF; + } - @Override - public AspectList getVisCost(ItemStack stack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "CHRISTMAS"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "CHRISTMAS"; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) { - int x = mop.blockX; - int y = mop.blockY + 1; - int z = mop.blockZ; - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { - EntitySnowman snowman; - snowman = new EntitySnowman(world); - snowman.setPosition(x, y, z); - world.spawnEntityInWorld(snowman); - } - } - player.swingItem(); - } - return itemstack; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition mop) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if ((mop != null) && (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) { + int x = mop.blockX; + int y = mop.blockY + 1; + int z = mop.blockZ; + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { + EntitySnowman snowman; + snowman = new EntitySnowman(world); + snowman.setPosition(x, y, z); + world.spawnEntityInWorld(snowman); + } + } + player.swingItem(); + } + return itemstack; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java index ed5ab4d..ed73891 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java @@ -11,38 +11,38 @@ import thaumcraft.common.items.wands.ItemWandCasting; import tombenpotter.emt.common.entities.EntityLaser; public class ItemExplosionFocus extends ItemBaseFocus { - - private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); - public ItemExplosionFocus() { - super(".focus.explosion", "focus_explosion"); - } + private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); - @Override - public int getFocusColor(ItemStack stack) { - return 0x8B0000; - } + public ItemExplosionFocus() { + super(".focus.explosion", "focus_explosion"); + } - @Override - public AspectList getVisCost(ItemStack focusstack) { - return visCost; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x8B0000; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "EXPLOSION"; - } + @Override + public AspectList getVisCost(ItemStack focusstack) { + return visCost; + } - @Override - public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - if (!world.isRemote) { - EntityLaser laser; - laser = new EntityLaser(world, player, 2); - world.spawnEntityInWorld(laser); - } - } - return itemstack; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "EXPLOSION"; + } + + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (!world.isRemote) { + EntityLaser laser; + laser = new EntityLaser(world, player, 2); + world.spawnEntityInWorld(laser); + } + } + return itemstack; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java index f7a1f3e..dd0b5e3 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java @@ -17,107 +17,109 @@ public class ItemShieldFocus extends ItemBaseFocus { int y1 = 0; ItemStack milk; - private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10); + private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10); - public ItemShieldFocus() { - super(".focus.shield", "focus_shield"); - } + public ItemShieldFocus() { + super(".focus.shield", "focus_shield"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0x1E90FF; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0x1E90FF; + } - @Override - public AspectList getVisCost(ItemStack stack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack stack) { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "SHIELD"; - } - - @Override - public boolean isUseItem(ItemStack stack) { - return true; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "SHIELD"; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - - if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - - player.motionX = 0.0D; - if(!player.capabilities.isCreativeMode && player.motionY < 0) - player.motionY = player.motionY / 2; - player.motionZ = 0.0D; - - int x = MathHelper.floor_double(player.posX); - int y = MathHelper.floor_double(player.posY); - int z = MathHelper.floor_double(player.posZ); - - if(milk == null)milk = (new ItemStack(Items.milk_bucket)); - player.curePotionEffects(milk); - - - if(player.motionY > -5){ - // Player Level - if (player.worldObj.isAirBlock(x + 1, y, z) && player.worldObj.isAirBlock(x - 1, y, z) && player.worldObj.isAirBlock(x, y, z + 1) && player.worldObj.isAirBlock(x, y, z - 1)) { - player.worldObj.setBlock(x + 1, y, z, BlockRegistry.shield); - player.worldObj.setBlock(x - 1, y, z, BlockRegistry.shield); - player.worldObj.setBlock(x, y, z + 1, BlockRegistry.shield); - player.worldObj.setBlock(x, y, z - 1, BlockRegistry.shield); - } + @Override + public boolean isUseItem(ItemStack stack) { + return true; + } - // Above the player - if (player.worldObj.isAirBlock(x + 1, y + 1, z) && player.worldObj.isAirBlock(x - 1, y + 1, z) && player.worldObj.isAirBlock(x, y + 1, z + 1) && player.worldObj.isAirBlock(x, y + 1, z - 1)) { - player.worldObj.setBlock(x + 1, y + 1, z, BlockRegistry.shield); - player.worldObj.setBlock(x - 1, y + 1, z, BlockRegistry.shield); - player.worldObj.setBlock(x, y + 1, z + 1, BlockRegistry.shield); - player.worldObj.setBlock(x, y + 1, z - 1, BlockRegistry.shield); - } - - if (y > y1 && (player.worldObj.isAirBlock(x + 1, y - 2, z) && player.worldObj.isAirBlock(x - 1, y - 2, z) && player.worldObj.isAirBlock(x, y - 2, z + 1) && player.worldObj.isAirBlock(x, y - 2, z - 1)) || (player.worldObj.getBlock(x + 1, y - 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x - 1, y - 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x, y - 2, z + 1) == BlockRegistry.shield && player.worldObj.getBlock(x, y - 2, z - 1) == BlockRegistry.shield)){ - player.worldObj.setBlockToAir(x + 1, y - 2, z); - player.worldObj.setBlockToAir(x - 1, y - 2, z); - player.worldObj.setBlockToAir(x, y - 2, z + 1); - player.worldObj.setBlockToAir(x, y - 2, z - 1); - } - - if (y < y1 && (player.worldObj.isAirBlock(x + 1, y + 2, z) && player.worldObj.isAirBlock(x - 1, y + 2, z) && player.worldObj.isAirBlock(x, y + 2, z + 1) && player.worldObj.isAirBlock(x, y + 2, z - 1)) || (player.worldObj.getBlock(x + 1, y + 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x - 1, y + 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x, y + 2, z + 1) == BlockRegistry.shield && player.worldObj.getBlock(x, y + 2, z - 1) == BlockRegistry.shield)){ - player.worldObj.setBlockToAir(x + 1, y + 2, z); - player.worldObj.setBlockToAir(x - 1, y + 2, z); - player.worldObj.setBlockToAir(x, y + 2, z + 1); - player.worldObj.setBlockToAir(x, y + 2, z - 1); - } - } - - y1 = y; - } - } + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - @Override - public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { - int x = MathHelper.floor_double(player.posX); - int y = MathHelper.floor_double(player.posY); - int z = MathHelper.floor_double(player.posZ); + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { - // Player Level - if ((player.worldObj.getBlock(x + 1, y, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y, z + 1) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y, z - 1) == BlockRegistry.shield)) { - player.worldObj.setBlockToAir(x + 1, y, z); - player.worldObj.setBlockToAir(x - 1, y, z); - player.worldObj.setBlockToAir(x, y, z + 1); - player.worldObj.setBlockToAir(x, y, z - 1); - } + player.motionX = 0.0D; + if (!player.capabilities.isCreativeMode && player.motionY < 0) + player.motionY = player.motionY / 2; + player.motionZ = 0.0D; - // Above the player - if ((player.worldObj.getBlock(x + 1, y + 1, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y + 1, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z + 1) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z - 1) == BlockRegistry.shield)) { - player.worldObj.setBlockToAir(x + 1, y + 1, z); - player.worldObj.setBlockToAir(x - 1, y + 1, z); - player.worldObj.setBlockToAir(x, y + 1, z + 1); - player.worldObj.setBlockToAir(x, y + 1, z - 1); - } - } + int x = MathHelper.floor_double(player.posX); + int y = MathHelper.floor_double(player.posY); + int z = MathHelper.floor_double(player.posZ); + + if (milk == null) + milk = (new ItemStack(Items.milk_bucket)); + player.curePotionEffects(milk); + + if (player.motionY > -5) { + // Player Level + if (player.worldObj.isAirBlock(x + 1, y, z) && player.worldObj.isAirBlock(x - 1, y, z) && player.worldObj.isAirBlock(x, y, z + 1) && player.worldObj.isAirBlock(x, y, z - 1)) { + player.worldObj.setBlock(x + 1, y, z, BlockRegistry.shield); + player.worldObj.setBlock(x - 1, y, z, BlockRegistry.shield); + player.worldObj.setBlock(x, y, z + 1, BlockRegistry.shield); + player.worldObj.setBlock(x, y, z - 1, BlockRegistry.shield); + } + + // Above the player + if (player.worldObj.isAirBlock(x + 1, y + 1, z) && player.worldObj.isAirBlock(x - 1, y + 1, z) && player.worldObj.isAirBlock(x, y + 1, z + 1) && player.worldObj.isAirBlock(x, y + 1, z - 1)) { + player.worldObj.setBlock(x + 1, y + 1, z, BlockRegistry.shield); + player.worldObj.setBlock(x - 1, y + 1, z, BlockRegistry.shield); + player.worldObj.setBlock(x, y + 1, z + 1, BlockRegistry.shield); + player.worldObj.setBlock(x, y + 1, z - 1, BlockRegistry.shield); + } + + if (y > y1 && (player.worldObj.isAirBlock(x + 1, y - 2, z) && player.worldObj.isAirBlock(x - 1, y - 2, z) && player.worldObj.isAirBlock(x, y - 2, z + 1) && player.worldObj.isAirBlock(x, y - 2, z - 1)) + || (player.worldObj.getBlock(x + 1, y - 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x - 1, y - 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x, y - 2, z + 1) == BlockRegistry.shield && player.worldObj.getBlock(x, y - 2, z - 1) == BlockRegistry.shield)) { + player.worldObj.setBlockToAir(x + 1, y - 2, z); + player.worldObj.setBlockToAir(x - 1, y - 2, z); + player.worldObj.setBlockToAir(x, y - 2, z + 1); + player.worldObj.setBlockToAir(x, y - 2, z - 1); + } + + if (y < y1 && (player.worldObj.isAirBlock(x + 1, y + 2, z) && player.worldObj.isAirBlock(x - 1, y + 2, z) && player.worldObj.isAirBlock(x, y + 2, z + 1) && player.worldObj.isAirBlock(x, y + 2, z - 1)) + || (player.worldObj.getBlock(x + 1, y + 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x - 1, y + 2, z) == BlockRegistry.shield && player.worldObj.getBlock(x, y + 2, z + 1) == BlockRegistry.shield && player.worldObj.getBlock(x, y + 2, z - 1) == BlockRegistry.shield)) { + player.worldObj.setBlockToAir(x + 1, y + 2, z); + player.worldObj.setBlockToAir(x - 1, y + 2, z); + player.worldObj.setBlockToAir(x, y + 2, z + 1); + player.worldObj.setBlockToAir(x, y + 2, z - 1); + } + } + + y1 = y; + } + } + + @Override + public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { + int x = MathHelper.floor_double(player.posX); + int y = MathHelper.floor_double(player.posY); + int z = MathHelper.floor_double(player.posZ); + + // Player Level + if ((player.worldObj.getBlock(x + 1, y, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y, z + 1) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y, z - 1) == BlockRegistry.shield)) { + player.worldObj.setBlockToAir(x + 1, y, z); + player.worldObj.setBlockToAir(x - 1, y, z); + player.worldObj.setBlockToAir(x, y, z + 1); + player.worldObj.setBlockToAir(x, y, z - 1); + } + + // Above the player + if ((player.worldObj.getBlock(x + 1, y + 1, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x - 1, y + 1, z) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z + 1) == BlockRegistry.shield) && (player.worldObj.getBlock(x, y + 1, z - 1) == BlockRegistry.shield)) { + player.worldObj.setBlockToAir(x + 1, y + 1, z); + player.worldObj.setBlockToAir(x - 1, y + 1, z); + player.worldObj.setBlockToAir(x, y + 1, z + 1); + player.worldObj.setBlockToAir(x, y + 1, z - 1); + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemWandChargingFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemWandChargingFocus.java index 84995f9..c790cbc 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemWandChargingFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemWandChargingFocus.java @@ -11,49 +11,49 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemWandChargingFocus extends ItemBaseFocus { - AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); + AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10); - public ItemWandChargingFocus() { - super(".focus.charge.wand", "focus_wandCharge"); - } + public ItemWandChargingFocus() { + super(".focus.charge.wand", "focus_chargeWand"); + } - @Override - public int getFocusColor(ItemStack stack) { - return 0xFFFF450; - } + @Override + public int getFocusColor(ItemStack stack) { + return 0xFFFF450; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "ELECTRICCHARGING"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "ELECTRICCHARGING"; + } - @Override - public boolean isVisCostPerTick(ItemStack focusstack) { - return true; - } + @Override + public boolean isVisCostPerTick(ItemStack focusstack) { + return true; + } - @Override - public AspectList getVisCost(ItemStack focusstack) { - return visCost; - } + @Override + public AspectList getVisCost(ItemStack focusstack) { + return visCost; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) { + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int integer) { - if (!player.worldObj.isRemote) { - ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem(); + if (!player.worldObj.isRemote) { + ItemWandCasting wandItem = (ItemWandCasting) itemstack.getItem(); - ItemStack armor = player.inventory.armorInventory[1]; - if (armor != null) { - if ((ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)))) { - wandItem.addVis(itemstack, Aspect.ORDER, 1, true); - wandItem.addVis(itemstack, Aspect.FIRE, 1, true); - wandItem.addVis(itemstack, Aspect.ENTROPY, 1, true); - wandItem.addVis(itemstack, Aspect.WATER, 1, true); - wandItem.addVis(itemstack, Aspect.EARTH, 1, true); - wandItem.addVis(itemstack, Aspect.AIR, 1, true); - } - } - } - } + ItemStack armor = player.inventory.armorInventory[1]; + if (armor != null) { + if ((ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, ConfigHandler.wandChargeFocusCost / 4, player)))) { + wandItem.addVis(itemstack, Aspect.ORDER, 1, true); + wandItem.addVis(itemstack, Aspect.FIRE, 1, true); + wandItem.addVis(itemstack, Aspect.ENTROPY, 1, true); + wandItem.addVis(itemstack, Aspect.WATER, 1, true); + wandItem.addVis(itemstack, Aspect.EARTH, 1, true); + wandItem.addVis(itemstack, Aspect.AIR, 1, true); + } + } + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricHoeGrowth.java b/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricHoeGrowth.java index 76cf963..962d370 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricHoeGrowth.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricHoeGrowth.java @@ -27,132 +27,121 @@ import java.util.List; public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem { public IIcon icon; - public int maxCharge = 10000; - public int growthCost = 1000; - public int tillCost = 100; + public int maxCharge = 20000; + public int growthCost = 500; + public int tillCost = 100; - public ItemElectricHoeGrowth() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxStackSize(1); - this.growthCost = 10000; - } + public ItemElectricHoeGrowth() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxStackSize(1); + this.growthCost = 10000; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.icon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/hoe_growth"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.icon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/hoe_growth"); + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) - { - return this.icon; - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean isRepairable() { - return false; - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) - { - if(ElectricItem.manager.canUse(stack, 50)){ - ElectricItem.manager.use(stack, 50, player); - boolean did = false; - for (int x1 = -1; x1 <= 1; x1++) { - for (int z1 = -1; z1 <= 1; z1++) { - if (super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) - { - Thaumcraft.proxy.blockSparkle(world, x + x1, y, z + z1, 8401408, 2); - if (!did) { - did = true; - } - } - } - } - if (!did) - { - did = Utils.useBonemealAtLoc(world, player, x, y, z); - if (!did) - { - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - if ((block == ConfigBlocks.blockCustomPlant) && (meta == 0) && ElectricItem.manager.canUse(stack, 50)) - { - ((BlockCustomPlant)block).growGreatTree(world, x, y, z, world.rand); - ElectricItem.manager.use(stack, 50, player); - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); - did = true; - } - else if ((block == ConfigBlocks.blockCustomPlant) && (meta == 1) && ElectricItem.manager.canUse(stack, 250)) - { - ((BlockCustomPlant)block).growSilverTree(world, x, y, z, world.rand); - ElectricItem.manager.use(stack, 250, player); - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); - did = true; - } - } - else - { - Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 3); - } - if (did) { - world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F); - } - } - return did; - } - else - return false; - } - - public void setDamage(ItemStack stack, int damage){ - super.setDamage(stack, damage > 1 ? damage : 1); - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.icon; + } - /* IC2 API METHODS */ + @Override + public boolean isRepairable() { + return false; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return true; - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { + if (stack.hasTagCompound()) { + stack.stackTagCompound.setBoolean("Unbreakable", true); + } + boolean did = false; + for (int x1 = -1; x1 <= 1; x1++) { + for (int z1 = -1; z1 <= 1; z1++) { + if (ElectricItem.manager.canUse(stack, 25) && super.onItemUse(stack, player, world, x + x1, y, z + z1, par7, par8, par9, par10)) { + ElectricItem.manager.use(stack, 25, player); + Thaumcraft.proxy.blockSparkle(world, x + x1, y, z + z1, 8401408, 2); + if (!did) { + did = true; + } + } + } + } + if (!did && ElectricItem.manager.canUse(stack, 250)) { + did = Utils.useBonemealAtLoc(world, player, x, y, z); + if (!did) { + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + if ((block == ConfigBlocks.blockCustomPlant) && (meta == 0)) { + ((BlockCustomPlant) block).growGreatTree(world, x, y, z, world.rand); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); + did = true; + } + else if ((block == ConfigBlocks.blockCustomPlant) && (meta == 1)) { + ((BlockCustomPlant) block).growSilverTree(world, x, y, z, world.rand); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 2); + did = true; + } + } + else { + ElectricItem.manager.use(stack, 250, player); + Thaumcraft.proxy.blockSparkle(world, x, y, z, 0, 3); + } + if (did) { + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wand", 0.75F, 0.9F + world.rand.nextFloat() * 0.2F); + } + } + if (stack.hasTagCompound()) { + stack.stackTagCompound.setBoolean("Unbreakable", false); + } + return did; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + /* IC2 API METHODS */ - @Override - public int getTier(ItemStack itemStack) { - return 1; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return true; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 1000; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public int getTier(ItemStack itemStack) { + return 1; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 1000; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricThorHammer.java b/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricThorHammer.java index 4cadd62..945a36c 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricThorHammer.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/ItemElectricThorHammer.java @@ -35,7 +35,6 @@ public class ItemElectricThorHammer extends ItemSword implements IElectricItem { this.setCreativeTab(ElectroMagicTools.tabEMT); this.setMaxDamage(27); this.setMaxStackSize(1); - // OreDictionary.registerOre("craftingToolForgeHammer", this); } @SideOnly(Side.CLIENT) diff --git a/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammer.java b/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammer.java index f61bc1d..bb29130 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammer.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammer.java @@ -24,71 +24,72 @@ import java.util.List; public class ItemThorHammer extends ItemSword implements IRepairable { - public ItemThorHammer() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(2000); - // OreDictionary.registerOre("craftingToolForgeHammer", this); - } + public ItemThorHammer() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(2000); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/thorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/thorhammer"); + } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - player.swingItem(); - float f = 1.0F; - float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); - float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); - double d = player.prevPosX + ((player.posX - player.prevPosX) * f); - double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; - double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); - Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); - float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); - float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); - float f5 = -MathHelper.cos(-f1 * 0.01745329F); - float f6 = MathHelper.sin(-f1 * 0.01745329F); - float f7 = f4 * f5; - float f8 = f6; - float f9 = f3 * f5; - double d3 = 5000D; - Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3); - MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true); - if (movingobjectposition == null) { - return itemstack; - } - if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); - } else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { - Entity entityhit = movingobjectposition.entityHit; - double x = entityhit.posX; - double y = entityhit.posY; - double z = entityhit.posZ; - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); - } - if (player.capabilities.isCreativeMode) { - return itemstack; - } else { - itemstack.damageItem(20, player); - return itemstack; - } - } + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + player.swingItem(); + float f = 1.0F; + float f1 = player.prevRotationPitch + ((player.rotationPitch - player.prevRotationPitch) * f); + float f2 = player.prevRotationYaw + ((player.rotationYaw - player.prevRotationYaw) * f); + double d = player.prevPosX + ((player.posX - player.prevPosX) * f); + double d1 = (player.prevPosY + ((player.posY - player.prevPosY) * f) + 1.6200000000000001D) - player.yOffset; + double d2 = player.prevPosZ + ((player.posZ - player.prevPosZ) * f); + Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2); + float f3 = MathHelper.cos((-f2 * 0.01745329F) - 3.141593F); + float f4 = MathHelper.sin((-f2 * 0.01745329F) - 3.141593F); + float f5 = -MathHelper.cos(-f1 * 0.01745329F); + float f6 = MathHelper.sin(-f1 * 0.01745329F); + float f7 = f4 * f5; + float f8 = f6; + float f9 = f3 * f5; + double d3 = 5000D; + Vec3 vec3d1 = vec3d.addVector(f7 * d3, f8 * d3, f9 * d3); + MovingObjectPosition movingobjectposition = player.worldObj.rayTraceBlocks(vec3d, vec3d1, true); + if (movingobjectposition == null) { + return itemstack; + } + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k)); + } + else if (movingobjectposition.typeOfHit == MovingObjectType.ENTITY) { + Entity entityhit = movingobjectposition.entityHit; + double x = entityhit.posX; + double y = entityhit.posY; + double z = entityhit.posZ; + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); + } + if (player.capabilities.isCreativeMode) { + return itemstack; + } + else { + itemstack.damageItem(20, player); + return itemstack; + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - itemstack.damageItem(1, attacker); - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + itemstack.damageItem(1, attacker); + return true; + } - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add(TextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor")); - } + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add(TextHelper.localize("tooltip.EMT.hammer.broken.The Hammer of Thor")); + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammerBroken.java b/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammerBroken.java index 7c15173..619d4cb 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammerBroken.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/ItemThorHammerBroken.java @@ -23,52 +23,53 @@ import java.util.List; public class ItemThorHammerBroken extends ItemSword implements IRepairable { - public ItemThorHammerBroken() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(1000); - } + public ItemThorHammerBroken() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(1000); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/taintedthorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":hammer/taintedthorhammer"); + } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - player.swingItem(); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ)); - world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ)); + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + player.swingItem(); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX - 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX + 8, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 4, player.posZ)); + world.spawnEntityInWorld(new EntityAlumentum(world, player.posX, player.posY + 8, player.posZ)); - if (player.capabilities.isCreativeMode) { - return itemstack; - } else { - itemstack.damageItem(20, player); - return itemstack; - } - } + if (player.capabilities.isCreativeMode) { + return itemstack; + } + else { + itemstack.damageItem(20, player); + return itemstack; + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F); - itemstack.damageItem(1, attacker); - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 2F); + itemstack.damageItem(1, attacker); + return true; + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @Override - public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) { - list.add(TextHelper.localize("tooltip.EMT.hammer.broken.thor")); - list.add(TextHelper.localize("tooltip.EMT.hammer.broken.danger")); - if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsNoRightClick")); - } else { - list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsRightClick")); - } - } + @Override + public void addInformation(ItemStack stack, EntityPlayer entityPlayer, List list, boolean par4) { + list.add(TextHelper.localize("tooltip.EMT.hammer.broken.thor")); + list.add(TextHelper.localize("tooltip.EMT.hammer.broken.danger")); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsNoRightClick")); + } + else { + list.add(TextHelper.localize("tooltip.EMT.hammer.broken.plsRightClick")); + } + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java index 433a768..ef24572 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemDiamondChainsaw.java @@ -31,187 +31,186 @@ import java.util.Locale; public class ItemDiamondChainsaw extends ItemAxe implements IElectricItem { - public int maxCharge = 40000; - public int cost = 200; - public int hitCost = 300; - public int tier = 2; - public static AudioSource audio; - boolean dropped = false; + public int maxCharge = 40000; + public int cost = 200; + public int hitCost = 300; + public int tier = 2; + public static AudioSource audio; + boolean dropped = false; - public ItemDiamondChainsaw() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(27); - this.setMaxStackSize(1); - } + public ItemDiamondChainsaw() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(27); + this.setMaxStackSize(1); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_diamond"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_diamond"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); + } - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (!ElectricItem.manager.canUse(stack, cost)) { - return 1.0F; - } + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + if (!ElectricItem.manager.canUse(stack, cost)) { + return 1.0F; + } - if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } + else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } + else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } - - @Override - public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) - { - if (audio != null) { - audio.stop(); - audio.remove(); - audio = null; - dropped = true; - } - return true; - } - - @Override - public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) - { - if(entity instanceof EntityLivingBase){ - if (IC2.platform.isRendering()) { - if (flag && !dropped) { - if (audio == null) audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); - if (audio != null) { - audio.updatePosition(); - audio.play(); - } - } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { - audio.stop(); - audio.remove(); - audio = null; - IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); - } - dropped = false; - } - } - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) { + if (audio != null) { + audio.stop(); + audio.remove(); + audio = null; + dropped = true; + } + return true; + } - @Override - public int getItemEnchantability() { - if (ConfigHandler.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { + if (entity instanceof EntityLivingBase) { + if (IC2.platform.isRendering()) { + if (flag && !dropped) { + if (audio == null) + audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); + if (audio != null) { + audio.updatePosition(); + audio.play(); + } + } + else if (!flag && audio != null && ((((EntityPlayer) entity).inventory.getCurrentItem() != null && ((EntityPlayer) entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer) entity).inventory.getCurrentItem() == null))) { + audio.stop(); + audio.remove(); + audio = null; + IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); + } + dropped = false; + } + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return ConfigHandler.enchanting; - } - - public void setDamage(ItemStack stack, int damage){ - super.setDamage(stack, damage > 1 ? damage : 1); - } + @Override + public boolean isRepairable() { + return false; + } - /* IC2 API METHODS */ + @Override + public int getItemEnchantability() { + if (ConfigHandler.enchanting == false) { + return 0; + } + else { + return 4; + } + } - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + return ConfigHandler.enchanting; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + /* IC2 API METHODS */ - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } - @Override - public int getTier(ItemStack itemStack) { - return tier; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 300; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return tier; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return 300; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java index dda548d..2ff91f6 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemStreamChainsaw.java @@ -27,109 +27,109 @@ import java.util.ArrayList; public class ItemStreamChainsaw extends ItemThaumiumChainsaw { - boolean alternateServer; - boolean alternateClient; - @SuppressWarnings("rawtypes") - public static ArrayList oreDictLogs = new ArrayList(); - public static AudioSource audio; + boolean alternateServer; + boolean alternateClient; + public static ArrayList oreDictLogs = new ArrayList(); + public static AudioSource audio; - public ItemStreamChainsaw() { - this.efficiencyOnProperMaterial = 25F; - alternateServer = false; - alternateClient = false; - setCreativeTab(ElectroMagicTools.tabEMT); - this.maxStackSize = 1; - this.setMaxDamage(27); - maxCharge = 900000; - cost = 400; - hitCost = 500; - tier = 3; - } + public ItemStreamChainsaw() { + this.efficiencyOnProperMaterial = 25F; + alternateServer = false; + alternateClient = false; + setCreativeTab(ElectroMagicTools.tabEMT); + this.maxStackSize = 1; + this.setMaxDamage(27); + maxCharge = 900000; + cost = 400; + hitCost = 500; + tier = 3; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_stream"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_stream"); + } - @Override - public EnumAction getItemUseAction(ItemStack itemstack) { - return EnumAction.bow; - } + @Override + public EnumAction getItemUseAction(ItemStack itemstack) { + return EnumAction.bow; + } - @Override - public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { - Block bi = world.getBlock(x, y, z); - if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z)) && ElectricItem.manager.getCharge(itemstack) > cost) { - if (!world.isRemote) { - if (BlockUtils.breakFurthestBlock(world, x, y, z, bi, player)) { - world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); - ElectricItem.manager.use(itemstack, cost, player); - this.alternateServer = (!this.alternateServer); - } - } else { - player.swingItem(); - ElectricItem.manager.use(itemstack, cost, player); - this.alternateClient = (!this.alternateClient); - } - } - return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10); - } + @Override + public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) { + Block bi = world.getBlock(x, y, z); + if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z)) && ElectricItem.manager.getCharge(itemstack) > cost) { + if (!world.isRemote) { + if (BlockUtils.breakFurthestBlock(world, x, y, z, bi, player)) { + world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); + ElectricItem.manager.use(itemstack, cost, player); + this.alternateServer = (!this.alternateServer); + } + } + else { + player.swingItem(); + ElectricItem.manager.use(itemstack, cost, player); + this.alternateClient = (!this.alternateClient); + } + } + return super.onItemUse(itemstack, player, world, x, y, z, par7, par8, par9, par10); + } - @Override - public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) - { - if(entity instanceof EntityLivingBase){ - if (IC2.platform.isRendering()) { - if (flag && !dropped) { - if (audio == null) audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); - if (audio != null) { - audio.updatePosition(); - audio.play(); - } - } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { - audio.stop(); - audio.remove(); - audio = null; - IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); - } - dropped = false; - } - } - } - - @Override - public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) - { - if(audio != null){ - audio.stop(); - audio.remove(); - audio = null; - dropped = true; - } - return true; - } + @Override + public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { + if (entity instanceof EntityLivingBase) { + if (IC2.platform.isRendering()) { + if (flag && !dropped) { + if (audio == null) + audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); + if (audio != null) { + audio.updatePosition(); + audio.play(); + } + } + else if (!flag && audio != null && ((((EntityPlayer) entity).inventory.getCurrentItem() != null && ((EntityPlayer) entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer) entity).inventory.getCurrentItem() == null))) { + audio.stop(); + audio.remove(); + audio = null; + IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); + } + dropped = false; + } + } + } - @Override - public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { - World world = player.worldObj; - Block bi = world.getBlock(x, y, z); - if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) { - if (!world.isRemote) { - BlockUtils.breakFurthestBlock(world, x, y, z, bi, player); - PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D)); + @Override + public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) { + if (audio != null) { + audio.stop(); + audio.remove(); + audio = null; + dropped = true; + } + return true; + } - world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); - } - ElectricItem.manager.use(itemstack, cost, player); - return true; - } - return super.onBlockStartBreak(itemstack, x, y, z, player); - } + @Override + public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { + World world = player.worldObj; + Block bi = world.getBlock(x, y, z); + if ((!player.isSneaking()) && (Utils.isWoodLog(world, x, y, z))) { + if (!world.isRemote) { + BlockUtils.breakFurthestBlock(world, x, y, z, bi, player); + PacketHandler.INSTANCE.sendToAllAround(new PacketFXBlockBubble(x, y, z, new Color(0.33F, 0.33F, 1.0F).getRGB()), new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D)); - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 900; - } + world.playSoundEffect(x, y, z, "thaumcraft:bubble", 0.15F, 1.0F); + } + ElectricItem.manager.use(itemstack, cost, player); + return true; + } + return super.onBlockStartBreak(itemstack, x, y, z, player); + } + + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 900; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java index 414e322..808d327 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/chainsaws/ItemThaumiumChainsaw.java @@ -20,73 +20,73 @@ import tombenpotter.emt.ModInformation; public class ItemThaumiumChainsaw extends ItemDiamondChainsaw { public static AudioSource audio; - public ItemThaumiumChainsaw() { - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxDamage(27); - this.setMaxStackSize(1); - maxCharge = 60000; - cost = 250; - hitCost = 350; - } - - @Override - public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) - { - if(entity instanceof EntityLivingBase){ - if (IC2.platform.isRendering()) { - if (flag && !dropped) { - if (audio == null) audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); - if (audio != null) { - audio.updatePosition(); - audio.play(); - } - } else if (!flag && audio != null && ((((EntityPlayer)entity).inventory.getCurrentItem() != null && ((EntityPlayer)entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer)entity).inventory.getCurrentItem() == null))) { - audio.stop(); - audio.remove(); - audio = null; - IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); - } - dropped = false; - } - } - } - - @Override - public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) - { - if (audio != null) { - audio.stop(); - audio.remove(); - audio = null; - dropped = true; - } - return true; - } + public ItemThaumiumChainsaw() { + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxDamage(27); + this.setMaxStackSize(1); + maxCharge = 60000; + cost = 250; + hitCost = 350; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_thaumium"); - } + @Override + public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { + if (entity instanceof EntityLivingBase) { + if (IC2.platform.isRendering()) { + if (flag && !dropped) { + if (audio == null) + audio = IC2.audioManager.createSource(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawIdle.ogg", true, false, IC2.audioManager.getDefaultVolume()); + if (audio != null) { + audio.updatePosition(); + audio.play(); + } + } + else if (!flag && audio != null && ((((EntityPlayer) entity).inventory.getCurrentItem() != null && ((EntityPlayer) entity).inventory.getCurrentItem().getItem() != this) || (((EntityPlayer) entity).inventory.getCurrentItem() == null))) { + audio.stop(); + audio.remove(); + audio = null; + IC2.audioManager.playOnce(entity, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume()); + } + dropped = false; + } + } + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) { + if (audio != null) { + audio.stop(); + audio.remove(); + audio = null; + dropped = true; + } + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/chainsaw_thaumium"); + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 600; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } + + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } + + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 600; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemRockbreakerDrill.java b/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemRockbreakerDrill.java index 8dd6d78..485b6df 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemRockbreakerDrill.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemRockbreakerDrill.java @@ -35,163 +35,169 @@ import java.util.Locale; public class ItemRockbreakerDrill extends ItemThaumiumDrill { - private static final Block[] isEffective = {Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone}; - public Icon icon; - int side; - public int searchCost = 1000; - public int hitCost = 400; + private static final Block[] isEffective = { Blocks.nether_brick, Blocks.netherrack, Blocks.glowstone, Blocks.iron_block, Blocks.gold_block, Blocks.diamond_block, Blocks.lapis_block, Blocks.redstone_block, Blocks.redstone_ore, Blocks.emerald_ore, Blocks.emerald_block, Blocks.stonebrick, Blocks.glass, Blocks.stone, Blocks.gold_ore, Blocks.iron_ore, Blocks.coal_ore, Blocks.cobblestone, + Blocks.diamond_ore, Blocks.lapis_ore, Blocks.dirt, Blocks.gravel, Blocks.sand, Blocks.sandstone, Blocks.soul_sand, Blocks.clay, Blocks.grass, Blocks.snow_layer, Blocks.snow, Blocks.farmland, Blocks.hardened_clay, Blocks.stained_hardened_clay, Blocks.mossy_cobblestone }; + public Icon icon; + int side; + public int searchCost = 1000; + public int hitCost = 400; - public ItemRockbreakerDrill() { - side = 0; - setCreativeTab(ElectroMagicTools.tabEMT); - this.efficiencyOnProperMaterial = 25F; - this.setMaxStackSize(1); - if (ConfigHandler.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(2571); - } - maxCharge = 900000; - transferLimit = 900; - tier = 3; - } + public ItemRockbreakerDrill() { + side = 0; + setCreativeTab(ElectroMagicTools.tabEMT); + this.efficiencyOnProperMaterial = 25F; + this.setMaxStackSize(1); + if (ConfigHandler.toolsInBore == false) { + this.setMaxDamage(27); + } + else { + this.setMaxDamage(2571); + } + maxCharge = 900000; + transferLimit = 900; + tier = 3; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/drill_rockbreaker"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/drill_rockbreaker"); + } - private boolean isEffectiveAgainst(Block block) { - for (int var3 = 0; var3 < isEffective.length; var3++) { - if (isEffective[var3] == block) { - return true; - } - } - return false; - } + private boolean isEffectiveAgainst(Block block) { + for (int var3 = 0; var3 < isEffective.length; var3++) { + if (isEffective[var3] == block) { + return true; + } + } + return false; + } - @Override - public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) { - MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true); - if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { - side = movingobjectposition.sideHit; - } - return super.onBlockStartBreak(itemstack, X, Y, Z, player); - } + @Override + public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player) { + MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(((Entity) (player)).worldObj, player, true); + if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { + side = movingobjectposition.sideHit; + } + return super.onBlockStartBreak(itemstack, X, Y, Z, player); + } - @SuppressWarnings("rawtypes") - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) { - if (ConfigHandler.toolsInBore == false) { - cost = 350; - } else { - cost = 1; - } - if (entityLiving.isSneaking()) { - if (ElectricItem.manager.canUse(stack, cost)) { - ElectricItem.manager.use(stack, cost, entityLiving); - } - return true; - } - int md = world.getBlockMetadata(x, y, z); - if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) { - for (int aa = -1; aa <= 1; aa++) { - for (int bb = -1; bb <= 1; bb++) { - int xx = 0; - int yy = 0; - int zz = 0; - if (side <= 1) { - xx = aa; - zz = bb; - } else if (side <= 3) { - xx = aa; - yy = bb; - } else { - zz = aa; - yy = bb; - } - Block bl = world.getBlock(x + xx, y + yy, z + zz); - md = world.getBlockMetadata(x + xx, y + yy, z + zz); - if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) { - continue; - } - if (ElectricItem.manager.canUse(stack, cost)) { - ElectricItem.manager.use(stack, cost, entityLiving); - } - int fortune = EnchantmentHelper.getFortuneModifier(entityLiving); - world.setBlockToAir(x + xx, y + yy, z + zz); - ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune); - boolean creative = false; - if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) { - creative = true; - } - if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) { - continue; - } - ItemStack is; - for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) { - is = (ItemStack) i$.next(); - } - } - } - } - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) { + if (ConfigHandler.toolsInBore == false) { + cost = 350; + } + else { + cost = 1; + } + if (entityLiving.isSneaking()) { + if (ElectricItem.manager.canUse(stack, cost)) { + ElectricItem.manager.use(stack, cost, entityLiving); + } + return true; + } + int md = world.getBlockMetadata(x, y, z); + if (ForgeHooks.isToolEffective(stack, block, md) || isEffectiveAgainst(block)) { + for (int aa = -1; aa <= 1; aa++) { + for (int bb = -1; bb <= 1; bb++) { + int xx = 0; + int yy = 0; + int zz = 0; + if (side <= 1) { + xx = aa; + zz = bb; + } + else if (side <= 3) { + xx = aa; + yy = bb; + } + else { + zz = aa; + yy = bb; + } + Block bl = world.getBlock(x + xx, y + yy, z + zz); + md = world.getBlockMetadata(x + xx, y + yy, z + zz); + if (!ForgeHooks.isToolEffective(stack, bl, md) && !isEffectiveAgainst(bl)) { + continue; + } + if (ElectricItem.manager.canUse(stack, cost)) { + ElectricItem.manager.use(stack, cost, entityLiving); + } + int fortune = EnchantmentHelper.getFortuneModifier(entityLiving); + world.setBlockToAir(x + xx, y + yy, z + zz); + ArrayList ret = bl.getDrops(world, x + xx, y + yy, z + zz, md, fortune); + boolean creative = false; + if ((entityLiving instanceof EntityPlayer) && ((EntityPlayer) entityLiving).capabilities.isCreativeMode) { + creative = true; + } + if (ret.size() <= 0 || creative || ((Entity) (entityLiving)).worldObj.isRemote) { + continue; + } + ItemStack is; + for (Iterator i$ = ret.iterator(); i$.hasNext(); world.spawnEntityInWorld(new EntityFollowingItem(world, (double) x + (double) xx + 0.5D, (double) y + (double) yy + 0.5D, (double) z + (double) zz + 0.5D, is, entityLiving, 3))) { + is = (ItemStack) i$.next(); + } + } + } + } + return true; + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - if (!player.isSneaking()) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } - } else { - ElectricItem.manager.use(stack, searchCost, player); - if (!world.isRemote) { - world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset); - } - Minecraft mc = Minecraft.getMinecraft(); - Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1); - player.swingItem(); - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + if (!player.isSneaking()) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } + else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } + } + else { + ElectricItem.manager.use(stack, searchCost, player); + if (!world.isRemote) { + world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F); + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, xOffset, zOffset); + } + Minecraft mc = Minecraft.getMinecraft(); + Thaumcraft.instance.renderEventHandler.startScan(player, x, y, z, System.currentTimeMillis() + 5000L, 1); + player.swingItem(); + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { - if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) { - entity.setFire(2); - } - return super.onLeftClickEntity(stack, player, entity); - } + public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { + if (!((Entity) (player)).worldObj.isRemote && (!(entity instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled())) { + entity.setFire(2); + } + return super.onLeftClickEntity(stack, player, entity); + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 12F); + } + return false; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemThaumiumDrill.java b/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemThaumiumDrill.java index d7f0749..1112b3b 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemThaumiumDrill.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/drills/ItemThaumiumDrill.java @@ -46,7 +46,6 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem { this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/drill_thaumium"); } - @SuppressWarnings({"rawtypes", "unchecked"}) @SideOnly(Side.CLIENT) public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { ItemStack itemStack = new ItemStack(this, 1); @@ -117,10 +116,6 @@ public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem { public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { return ConfigHandler.enchanting; } - - public void setDamage(ItemStack stack, int damage){ - super.setDamage(stack, damage > 1 ? damage : 1); - } /* IC2 API METHODS */ diff --git a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolDiamond.java b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolDiamond.java index ac47746..c2bf526 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolDiamond.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolDiamond.java @@ -16,48 +16,50 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemOmnitoolDiamond extends ItemOmnitoolIron { - public ItemOmnitoolDiamond() { - super(); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxStackSize(1); - if (!ConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(350); - } - maxCharge = 70000; - hitCost = 250; - } + public ItemOmnitoolDiamond() { + super(); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxStackSize(1); + if (!ConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } + else { + this.setMaxDamage(350); + } + maxCharge = 70000; + hitCost = 250; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_diamond"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_diamond"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (!ConfigHandler.toolsInBore) { - cost = 200; - } else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (!ConfigHandler.toolsInBore) { + cost = 200; + } + else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); + } + return false; + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 400; - } + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 400; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolIron.java b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolIron.java index 8ab4bd3..d64c0c3 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolIron.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolIron.java @@ -26,162 +26,162 @@ import java.util.Locale; public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem { - public int maxCharge = 20000; - public int cost; - public int hitCost = 125; + public int maxCharge = 20000; + public int cost; + public int hitCost = 125; - public ItemOmnitoolIron() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 13F; - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxStackSize(1); - if (!ConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(200); - } - } + public ItemOmnitoolIron() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 13F; + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxStackSize(1); + if (!ConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } + else { + this.setMaxDamage(200); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_iron"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_iron"); + } - @SuppressWarnings({"rawtypes", "unchecked"}) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this) { - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this) { - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) - { - if (!ConfigHandler.toolsInBore) { - cost = 100; - } else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + { + if (!ConfigHandler.toolsInBore) { + cost = 100; + } + else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.iron_axe.canHarvestBlock(block, stack) || Items.iron_sword.canHarvestBlock(block, stack) || Items.iron_pickaxe.canHarvestBlock(block, stack) || Items.iron_shovel.canHarvestBlock(block, stack) || Items.shears.canHarvestBlock(block, stack); + } - @Override - public float getDigSpeed(ItemStack stack, Block block, int meta) { - if (!ElectricItem.manager.canUse(stack, cost)) { - return 1.0F; - } + @Override + public float getDigSpeed(ItemStack stack, Block block, int meta) { + if (!ElectricItem.manager.canUse(stack, cost)) { + return 1.0F; + } - if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_axe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_sword.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F || Items.shears.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } + else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 8F); + } + return false; + } - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { - continue; - } - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) { - continue; - } - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) { - return true; - } - } + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) { + continue; + } + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) { + continue; + } + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } + else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) { + return true; + } + } - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (!ConfigHandler.enchanting) { - return 0; - } else { - return 4; - } - } - - public void setDamage(ItemStack stack, int damage){ - super.setDamage(stack, damage > 1 ? damage : 1); - } + @Override + public int getItemEnchantability() { + if (!ConfigHandler.enchanting) { + return 0; + } + else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - return ConfigHandler.enchanting; - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + return ConfigHandler.enchanting; + } - /* IC2 API METHODS */ + /* IC2 API METHODS */ - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public double getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public double getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public double getTransferLimit(ItemStack itemStack) { - return 200; - } + @Override + public double getTransferLimit(ItemStack itemStack) { + return 200; + } } diff --git a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolThaumium.java b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolThaumium.java index 5a6929f..28efdfc 100644 --- a/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolThaumium.java +++ b/src/main/java/tombenpotter/emt/common/items/tools/omnitools/ItemOmnitoolThaumium.java @@ -16,48 +16,50 @@ import tombenpotter.emt.common.util.ConfigHandler; public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond { - public ItemOmnitoolThaumium() { - super(); - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(ElectroMagicTools.tabEMT); - this.setMaxStackSize(1); - if (!ConfigHandler.toolsInBore) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(467); - } - maxCharge = 140000; - hitCost = 650; - } + public ItemOmnitoolThaumium() { + super(); + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(ElectroMagicTools.tabEMT); + this.setMaxStackSize(1); + if (!ConfigHandler.toolsInBore) { + this.setMaxDamage(27); + } + else { + this.setMaxDamage(467); + } + maxCharge = 140000; + hitCost = 650; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_thaumium"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ModInformation.texturePath + ":tools/omnitool_thaumium"); + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (!ConfigHandler.toolsInBore) { - cost = 300; - } else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { + if (!ConfigHandler.toolsInBore) { + cost = 300; + } + else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { - if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { - entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); - } - return false; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) { + if (ElectricItem.manager.use(itemstack, hitCost, attacker)) { + entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F); + } + return false; + } - /* IC2 API METHODS */ - @Override - public double getTransferLimit(ItemStack itemStack) { - return 800; - } + /* IC2 API METHODS */ + @Override + public double getTransferLimit(ItemStack itemStack) { + return 800; + } } diff --git a/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java b/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java index 7464b00..d5ff59e 100644 --- a/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java +++ b/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java @@ -8,11 +8,11 @@ import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; -public class PacketEMTKeys implements IMessage, IMessageHandler{ +public class PacketEMTKeys implements IMessage, IMessageHandler { @Override public IMessage onMessage(PacketEMTKeys message, MessageContext ctx) { - if(ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null && ctx.getServerHandler().playerEntity.inventory.armorInventory[2].getItem() == ItemRegistry.quantumArmor){ + if (ctx.getServerHandler().playerEntity.inventory.armorInventory[2] != null && ctx.getServerHandler().playerEntity.inventory.armorInventory[2].getItem() == ItemRegistry.quantumArmor) { ctx.getServerHandler().playerEntity.inventory.armorInventory[2].stackTagCompound.setBoolean("unequip", true); } return null; @@ -20,7 +20,7 @@ public class PacketEMTKeys implements IMessage, IMessageHandler this.getInventoryStackLimit()) { - par2ItemStack.stackSize = this.getInventoryStackLimit(); - } - } + if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { + par2ItemStack.stackSize = this.getInventoryStackLimit(); + } + } - public String getInvName() { - return "Ethereal Processor"; - } + public String getInvName() { + return "Ethereal Processor"; + } - public boolean isInvNameLocalized() { - return false; - } + public boolean isInvNameLocalized() { + return false; + } - public void readFromNBT(NBTTagCompound tagCompound) { - super.readFromNBT(tagCompound); - NBTTagList nbttaglist = tagCompound.getTagList("Items", 10); - this.slots = new ItemStack[this.getSizeInventory()]; + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + NBTTagList nbttaglist = tagCompound.getTagList("Items", 10); + this.slots = new ItemStack[this.getSizeInventory()]; - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); - if (b0 >= 0 && b0 < this.slots.length) { - this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - this.cookTime = tagCompound.getShort("CookTime"); - } + if (b0 >= 0 && b0 < this.slots.length) { + this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + } + } + this.cookTime = tagCompound.getShort("CookTime"); + } - public void writeToNBT(NBTTagCompound tagCompound) { - super.writeToNBT(tagCompound); - tagCompound.setShort("CookTime", (short) this.cookTime); - NBTTagList nbttaglist = new NBTTagList(); + public void writeToNBT(NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + tagCompound.setShort("CookTime", (short) this.cookTime); + NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < this.slots.length; ++i) { - if (this.slots[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - this.slots[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - tagCompound.setTag("Items", nbttaglist); - } + for (int i = 0; i < this.slots.length; ++i) { + if (this.slots[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + this.slots[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } + tagCompound.setTag("Items", nbttaglist); + } - public int getInventoryStackLimit() { - return 64; - } + public int getInventoryStackLimit() { + return 64; + } - public void updateEntity() { - if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) { - ++this.cookTime; - this.isOn = true; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + public void updateEntity() { + if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) { + ++this.cookTime; + this.isOn = true; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - if (this.cookTime == this.maceratingSpeed) { - this.cookTime = 0; - this.smeltItem(); - } - } else { - this.cookTime = 0; - this.isOn = false; - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } + if (this.cookTime == this.maceratingSpeed) { + this.cookTime = 0; + this.smeltItem(); + } + } + else { + this.cookTime = 0; + this.isOn = false; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } - private boolean canSmelt() { - if (this.slots[0] == null) { - return false; - } else { - ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); - if (itemstack == null) - return false; - if (this.slots[2] == null) - return true; - if (!this.slots[2].isItemEqual(itemstack)) - return false; - int result = slots[2].stackSize + (itemstack.stackSize * 2); - return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); - } - } + private boolean canSmelt() { + if (this.slots[0] == null) { + return false; + } + else { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); + if (itemstack == null) + return false; + if (this.slots[2] == null) + return true; + if (!this.slots[2].isItemEqual(itemstack)) + return false; + int result = slots[2].stackSize + (itemstack.stackSize * 2); + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + } - public void smeltItem() { - if (this.canSmelt()) { - ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); + public void smeltItem() { + if (this.canSmelt()) { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); - if (this.slots[2] == null) { - this.slots[2] = itemstack.copy(); - this.slots[2].stackSize *= 2; - } else if (this.slots[2].isItemEqual(itemstack)) { - slots[2].stackSize += (itemstack.stackSize * 2); - } + if (this.slots[2] == null) { + this.slots[2] = itemstack.copy(); + this.slots[2].stackSize *= 2; + } + else if (this.slots[2].isItemEqual(itemstack)) { + slots[2].stackSize += (itemstack.stackSize * 2); + } - --this.slots[0].stackSize; + --this.slots[0].stackSize; - if (this.slots[0].stackSize <= 0) { - this.slots[0] = null; - } - this.addBonus(); - } - } + if (this.slots[0].stackSize <= 0) { + this.slots[0] = null; + } + this.addBonus(); + } + } - public void addBonus() { - if (this.canSmelt()) { - if (this.worldObj.rand.nextInt(ConfigHandler.etherealProcessorBonus) == 0) { - if (this.slots[1] == null) { - this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6)); - } else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) { - slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2); - } - } - } - } + public void addBonus() { + if (this.canSmelt()) { + if (this.worldObj.rand.nextInt(ConfigHandler.etherealProcessorBonus) == 0) { + if (this.slots[1] == null) { + this.setInventorySlotContents(1, new ItemStack(ConfigItems.itemNugget, 1, 6)); + } + else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6)) && this.isOverLimit(1) == false && this.isOverLimit(2) == false) { + slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2); + } + } + } + } - public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) { - return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D; - } + public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) { + return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D; + } - public void openChest() { - } + public void openChest() { + } - public void closeChest() { - } + public void closeChest() { + } - @Override - public boolean isItemValidForSlot(int slot, ItemStack stack) { - if (slot != 0) - return false; - if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) - return true; - return false; - } + @Override + public boolean isItemValidForSlot(int slot, ItemStack stack) { + if (slot != 0) + return false; + if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) + return true; + return false; + } - public int[] getAccessibleSlotsFromSide(int par1) { - return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); - } + public int[] getAccessibleSlotsFromSide(int par1) { + return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); + } - public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { - return this.isItemValidForSlot(par1, par2ItemStack); - } + public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { + return this.isItemValidForSlot(par1, par2ItemStack); + } - public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) { - return true; - } + public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) { + return true; + } - public boolean isOverLimit(int i) { - if (slots[i] != null) { - if (slots[i].stackSize >= 63) - return true; - else if (slots[i].stackSize < 63) - return false; - else - return false; - } else { - return false; - } - } + public boolean isOverLimit(int i) { + if (slots[i] != null) { + if (slots[i].stackSize >= 63) + return true; + else if (slots[i].stackSize < 63) + return false; + else + return false; + } + else { + return false; + } + } - public boolean isOP() { - final int cobblestoneId = OreDictionary.getOreID("blockCobble"); + public boolean isOP() { + final int cobblestoneId = OreDictionary.getOreID("blockCobble"); - if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish || this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem() || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) { - return true; - } else { - return false; - } - } + if (OreDictionary.getOreID(this.slots[0]) == cobblestoneId || this.slots[0].getItem() == Item.getItemFromBlock(Blocks.sand) || this.slots[0].getItem() == Items.potato || this.slots[0].getItem() == Items.porkchop || this.slots[0].getItem() == Items.beef || this.slots[0].getItem() == Items.chicken || this.slots[0].getItem() == Items.fish + || this.slots[0].getItem() == IC2Items.getItem("coalDust").getItem() + || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).toLowerCase().contains("dust") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armour") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("armor") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("helm") + || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("legging") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("boot") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("chestp") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick") + || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("shovel") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("axe") || this.slots[0].getItem().getUnlocalizedName(this.slots[0]).toLowerCase().contains("pick"))) { + return true; + } + else { + return false; + } + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public short getFacing() { - return 0; - } + @Override + public short getFacing() { + return 0; + } - @Override - public void setFacing(short facing) { + @Override + public void setFacing(short facing) { - } + } - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public float getWrenchDropRate() { + return 1; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtMachines, 1, 1); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtMachines, 1, 1); + } - @Override - public String getInventoryName() { - return "Ethereal Macerator"; - } + @Override + public String getInventoryName() { + return "Ethereal Macerator"; + } - @Override - public boolean hasCustomInventoryName() { - return false; - } + @Override + public boolean hasCustomInventoryName() { + return false; + } - @Override - public void openInventory() { + @Override + public void openInventory() { - } + } - @Override - public void closeInventory() { + @Override + public void closeInventory() { - } + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/TileEntityIndustrialWandRecharge.java b/src/main/java/tombenpotter/emt/common/tile/TileEntityIndustrialWandRecharge.java index 4121176..7b2fb56 100644 --- a/src/main/java/tombenpotter/emt/common/tile/TileEntityIndustrialWandRecharge.java +++ b/src/main/java/tombenpotter/emt/common/tile/TileEntityIndustrialWandRecharge.java @@ -13,165 +13,168 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory { - private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4); + private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4); - ItemStack ItemStacks[]; + ItemStack ItemStacks[]; - public TileEntityIndustrialWandRecharge() { - ItemStacks = new ItemStack[1]; - } + public TileEntityIndustrialWandRecharge() { + ItemStacks = new ItemStack[1]; + } - @Override - public int getSizeInventory() { - return 1; - } + @Override + public int getSizeInventory() { + return 1; + } - @Override - public ItemStack getStackInSlot(int i) { - return ItemStacks[i]; - } + @Override + public ItemStack getStackInSlot(int i) { + return ItemStacks[i]; + } - @Override - public ItemStack decrStackSize(int i, int j) { - if (ItemStacks[i] != null) { + @Override + public ItemStack decrStackSize(int i, int j) { + if (ItemStacks[i] != null) { - if (ItemStacks[i].stackSize <= j) { - ItemStack itemstack = ItemStacks[i]; - ItemStacks[i] = null; - return itemstack; - } else { - ItemStack itemstack1 = ItemStacks[i].splitStack(j); + if (ItemStacks[i].stackSize <= j) { + ItemStack itemstack = ItemStacks[i]; + ItemStacks[i] = null; + return itemstack; + } + else { + ItemStack itemstack1 = ItemStacks[i].splitStack(j); - if (ItemStacks[i].stackSize == 0) { - ItemStacks[i] = null; - } + if (ItemStacks[i].stackSize == 0) { + ItemStacks[i] = null; + } - return itemstack1; - } - } else { - return null; - } - } + return itemstack1; + } + } + else { + return null; + } + } - @Override - public ItemStack getStackInSlotOnClosing(int i) { - if (ItemStacks[i] != null) { - ItemStack itemstack = ItemStacks[i]; - ItemStacks[i] = null; - return itemstack; - } else { - return null; - } - } + @Override + public ItemStack getStackInSlotOnClosing(int i) { + if (ItemStacks[i] != null) { + ItemStack itemstack = ItemStacks[i]; + ItemStacks[i] = null; + return itemstack; + } + else { + return null; + } + } - @Override - public void updateEntity() { - ic2EnergySink.updateEntity(); - if (!this.worldObj.isRemote) { - if (getStackInSlot(0) != null) { + @Override + public void updateEntity() { + ic2EnergySink.updateEntity(); + if (!this.worldObj.isRemote) { + if (getStackInSlot(0) != null) { - ItemStack wand = getStackInSlot(0); - if (wand != null && wand.getItem() instanceof ItemWandCasting) { - ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); - if (ic2EnergySink.useEnergy(ConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) { - wandItem.addVis(wand, Aspect.ORDER, 1, true); - wandItem.addVis(wand, Aspect.FIRE, 1, true); - wandItem.addVis(wand, Aspect.ENTROPY, 1, true); - wandItem.addVis(wand, Aspect.WATER, 1, true); - wandItem.addVis(wand, Aspect.EARTH, 1, true); - wandItem.addVis(wand, Aspect.AIR, 1, true); - } - } - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } - } + ItemStack wand = getStackInSlot(0); + if (wand != null && wand.getItem() instanceof ItemWandCasting) { + ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); + if (ic2EnergySink.useEnergy(ConfigHandler.wandChargerConsumption) && wandItem.getAspectsWithRoom(wand) != null) { + wandItem.addVis(wand, Aspect.ORDER, 1, true); + wandItem.addVis(wand, Aspect.FIRE, 1, true); + wandItem.addVis(wand, Aspect.ENTROPY, 1, true); + wandItem.addVis(wand, Aspect.WATER, 1, true); + wandItem.addVis(wand, Aspect.EARTH, 1, true); + wandItem.addVis(wand, Aspect.AIR, 1, true); + } + } + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } + } - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - ItemStacks[i] = itemstack; + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + ItemStacks[i] = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { - itemstack.stackSize = getInventoryStackLimit(); - } - } + if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { + itemstack.stackSize = getInventoryStackLimit(); + } + } - public void readFromNBT(NBTTagCompound p_145839_1_) { - super.readFromNBT(p_145839_1_); - NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); - this.ItemStacks = new ItemStack[this.getSizeInventory()]; + public void readFromNBT(NBTTagCompound p_145839_1_) { + super.readFromNBT(p_145839_1_); + NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); + this.ItemStacks = new ItemStack[this.getSizeInventory()]; - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); - if (b0 >= 0 && b0 < this.ItemStacks.length) { - this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - } + if (b0 >= 0 && b0 < this.ItemStacks.length) { + this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + } + } + } - public void writeToNBT(NBTTagCompound p_145841_1_) { - super.writeToNBT(p_145841_1_); - NBTTagList nbttaglist = new NBTTagList(); + public void writeToNBT(NBTTagCompound p_145841_1_) { + super.writeToNBT(p_145841_1_); + NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < this.ItemStacks.length; ++i) { - if (this.ItemStacks[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - this.ItemStacks[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } + for (int i = 0; i < this.ItemStacks.length; ++i) { + if (this.ItemStacks[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + this.ItemStacks[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } - p_145841_1_.setTag("Items", nbttaglist); - } + p_145841_1_.setTag("Items", nbttaglist); + } - @Override - public int getInventoryStackLimit() { - return 64; - } + @Override + public int getInventoryStackLimit() { + return 64; + } - @Override - public boolean isUseableByPlayer(EntityPlayer player) { - if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { - return false; - } + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { + return false; + } - return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D; - } + return player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D; + } - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) { - return true; - } + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + return true; + } - @Override - public void invalidate() { - ic2EnergySink.invalidate(); - super.invalidate(); - } + @Override + public void invalidate() { + ic2EnergySink.invalidate(); + super.invalidate(); + } - @Override - public void onChunkUnload() { - ic2EnergySink.onChunkUnload(); - } + @Override + public void onChunkUnload() { + ic2EnergySink.onChunkUnload(); + } - @Override - public String getInventoryName() { - return "Industrial Wand Charging Station"; - } + @Override + public String getInventoryName() { + return "Industrial Wand Charging Station"; + } - @Override - public boolean hasCustomInventoryName() { - return false; - } + @Override + public boolean hasCustomInventoryName() { + return false; + } - @Override - public void openInventory() { - } + @Override + public void openInventory() { + } - @Override - public void closeInventory() { - } + @Override + public void closeInventory() { + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/TileEntityPortableNode.java b/src/main/java/tombenpotter/emt/common/tile/TileEntityPortableNode.java index 93950a8..cdf82f1 100644 --- a/src/main/java/tombenpotter/emt/common/tile/TileEntityPortableNode.java +++ b/src/main/java/tombenpotter/emt/common/tile/TileEntityPortableNode.java @@ -6,17 +6,17 @@ import thaumcraft.common.tiles.TileNode; public class TileEntityPortableNode extends TileNode { - public TileEntityPortableNode() { - super(); - } + public TileEntityPortableNode() { + super(); + } - @Override - public NodeModifier getNodeModifier() { - return NodeModifier.FADING; - } + @Override + public NodeModifier getNodeModifier() { + return NodeModifier.FADING; + } - @Override - public NodeType getNodeType() { - return NodeType.UNSTABLE; - } + @Override + public NodeType getNodeType() { + return NodeType.UNSTABLE; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java index 6ebf00d..7b2f15f 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAerGenerator.java @@ -6,9 +6,9 @@ import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityAerGenerator extends TileEntityBaseGenerator { - public TileEntityAerGenerator() { - aspect = Aspect.AIR; - EssentiasOutputs.outputs.get(aspect.getTag()); - output = ConfigHandler.aerGenerator; - } + public TileEntityAerGenerator() { + aspect = Aspect.AIR; + EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.aerGenerator; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java index b9be0c4..18c8794 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityArborGenerator.java @@ -6,9 +6,9 @@ import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityArborGenerator extends TileEntityBaseGenerator { - public TileEntityArborGenerator() { - aspect = Aspect.TREE; - EssentiasOutputs.outputs.get(aspect.getTag()); - output = ConfigHandler.arborGenerator; - } + public TileEntityArborGenerator() { + aspect = Aspect.TREE; + EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.arborGenerator; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java index 00052a7..63ae4b8 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityAuramGenerator.java @@ -6,9 +6,9 @@ import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityAuramGenerator extends TileEntityBaseGenerator { - public TileEntityAuramGenerator() { - aspect = Aspect.AURA; - EssentiasOutputs.outputs.get(aspect.getTag()); - output = ConfigHandler.auramGenerator; - } + public TileEntityAuramGenerator() { + aspect = Aspect.AURA; + EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.auramGenerator; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java index 3ac796b..a60bf6e 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityBaseGenerator.java @@ -10,57 +10,57 @@ import tombenpotter.emt.common.util.ConfigHandler; public abstract class TileEntityBaseGenerator extends TileEntityEMT { - public BasicSource energySource = new BasicSource(this, 1000000000, 3); - public Aspect aspect; - public int output; - public int tick = 0; + public BasicSource energySource = new BasicSource(this, 1000000000, 3); + public Aspect aspect; + public int output; + public int tick = 0; - public TileEntityBaseGenerator() { - output = 20; - } + public TileEntityBaseGenerator() { + output = 20; + } - @Override - public void updateEntity() { - if(tick > 0) - tick--; - - if(tick == 0){ - energySource.updateEntity(); - createEnergy(); - tick = 20; - } - } + @Override + public void updateEntity() { + if (tick > 0) + tick--; - public void createEnergy() { - if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) { - energySource.addEnergy(output * 20); - } - } + if (tick == 0) { + energySource.updateEntity(); + createEnergy(); + tick = 20; + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + public void createEnergy() { + if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) { + energySource.addEnergy(output * 20); + } + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - energySource.readFromNBT(tag); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void writeToNBT(NBTTagCompound tag) { - super.writeToNBT(tag); - energySource.writeToNBT(tag); - } - - public int getOutput(){ - return output; - } + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + energySource.readFromNBT(tag); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + energySource.writeToNBT(tag); + } + + public int getOutput() { + return output; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java index 644561c..3963baf 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityIgnisGenerator.java @@ -6,9 +6,9 @@ import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityIgnisGenerator extends TileEntityBaseGenerator { - public TileEntityIgnisGenerator() { - aspect = Aspect.FIRE; - EssentiasOutputs.outputs.get(aspect.getTag()); - output = ConfigHandler.ignisGenerator; - } + public TileEntityIgnisGenerator() { + aspect = Aspect.FIRE; + EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.ignisGenerator; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java index 8564ff3..bb32c21 100644 --- a/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java +++ b/src/main/java/tombenpotter/emt/common/tile/generators/TileEntityPotentiaGenerator.java @@ -7,9 +7,9 @@ import tombenpotter.emt.common.util.EssentiasOutputs; public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator { - public TileEntityPotentiaGenerator() { - aspect = Aspect.ENERGY; - EssentiasOutputs.outputs.get(aspect.getTag()); - output = ConfigHandler.potentiaGenerator; - } + public TileEntityPotentiaGenerator() { + aspect = Aspect.ENERGY; + EssentiasOutputs.outputs.get(aspect.getTag()); + output = ConfigHandler.potentiaGenerator; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/TileEntitySolarBase.java b/src/main/java/tombenpotter/emt/common/tile/solars/TileEntitySolarBase.java index fa19f33..045987c 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/TileEntitySolarBase.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/TileEntitySolarBase.java @@ -10,96 +10,96 @@ import java.util.Random; public abstract class TileEntitySolarBase extends TileEntityEMT implements IWrenchable { - public BasicSource energySource= new BasicSource(this, 10000, 4); - public static Random random = new Random(); - public boolean initialized; - public boolean theSunIsVisible; - public boolean canRain; - public boolean noSunlight; - public int tick; - public double output = 0; + public BasicSource energySource = new BasicSource(this, 10000, 4); + public static Random random = new Random(); + public boolean initialized; + public boolean theSunIsVisible; + public boolean canRain; + public boolean noSunlight; + public int tick; + public double output = 0; - public TileEntitySolarBase() { - this.tick = random.nextInt(64); - } + public TileEntitySolarBase() { + this.tick = random.nextInt(64); + } - @Override - public void updateEntity() { - energySource.updateEntity(); - checkConditions(); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + checkConditions(); + } - public void checkConditions() { - if (!initialized && worldObj != null) { - canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; - noSunlight = worldObj.provider.hasNoSky; - initialized = true; - } - if (noSunlight) { - return; - } - if (tick-- == 0) { - updateSunState(); - tick = 64; - } - createEnergy(); - } + public void checkConditions() { + if (!initialized && worldObj != null) { + canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; + noSunlight = worldObj.provider.hasNoSky; + initialized = true; + } + if (noSunlight) { + return; + } + if (tick-- == 0) { + updateSunState(); + tick = 64; + } + createEnergy(); + } - public void createEnergy() { - if (theSunIsVisible) { - energySource.addEnergy(output); - } - } + public void createEnergy() { + if (theSunIsVisible) { + energySource.addEnergy(output); + } + } - public void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + public void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public short getFacing() { - return 0; - } + @Override + public short getFacing() { + return 0; + } - @Override - public void setFacing(short facing) { - } + @Override + public void setFacing(short facing) { + } - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public float getWrenchDropRate() { + return 1; + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityAirSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityAirSolar.java index 2be0981..f97b7a4 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityAirSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityAirSolar.java @@ -9,21 +9,22 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityAirSolar extends TileEntitySolarBase { - public TileEntityAirSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityAirSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void createEnergy() { - if (theSunIsVisible && this.yCoord >= 160) { - energySource.addEnergy(output * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(output); - } - } + @Override + public void createEnergy() { + if (theSunIsVisible && this.yCoord >= 160) { + energySource.addEnergy(output * 2.5); + } + else if (theSunIsVisible) { + energySource.addEnergy(output); + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 15); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 15); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityDoubleAirSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityDoubleAirSolar.java index 210c411..4fc175c 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityDoubleAirSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityDoubleAirSolar.java @@ -8,12 +8,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleAirSolar extends TileEntityAirSolar { - public TileEntityDoubleAirSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleAirSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 0); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 0); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityTripleAirSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityTripleAirSolar.java index 5698a1e..59379aa 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityTripleAirSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/air/TileEntityTripleAirSolar.java @@ -8,12 +8,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleAirSolar extends TileEntityAirSolar { - public TileEntityTripleAirSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleAirSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 1); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 1); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityCompressedSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityCompressedSolar.java index 1b5a3ed..f66403a 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityCompressedSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityCompressedSolar.java @@ -8,12 +8,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityCompressedSolar extends TileEntitySolarBase { - public TileEntityCompressedSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityCompressedSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 0); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 0); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityDoubleCompressedSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityDoubleCompressedSolar.java index b07395f..e76bdc2 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityDoubleCompressedSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityDoubleCompressedSolar.java @@ -8,12 +8,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleCompressedSolar extends TileEntitySolarBase { - public TileEntityDoubleCompressedSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleCompressedSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 1); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 1); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityTripleCompressedSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityTripleCompressedSolar.java index 047c082..bbeba00 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityTripleCompressedSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/compressed/TileEntityTripleCompressedSolar.java @@ -8,12 +8,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleCompressedSolar extends TileEntitySolarBase { - public TileEntityTripleCompressedSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleCompressedSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 2); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 2); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDarkSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDarkSolar.java index fc0d543..4b17e30 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDarkSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDarkSolar.java @@ -8,19 +8,19 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDarkSolar extends TileEntitySolarBase { - public TileEntityDarkSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityDarkSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void createEnergy() { - if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && !worldObj.isDaytime() && !worldObj.isRaining() && !worldObj.isThundering()) { - energySource.addEnergy(output); - } - } + @Override + public void createEnergy() { + if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && !worldObj.isDaytime() && !worldObj.isRaining() && !worldObj.isThundering()) { + energySource.addEnergy(output); + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 6); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 6); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDoubleDarkSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDoubleDarkSolar.java index b07f512..429b455 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDoubleDarkSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityDoubleDarkSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleDarkSolar extends TileEntityDarkSolar { - public TileEntityDoubleDarkSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleDarkSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 7); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 7); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityTripleDarkSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityTripleDarkSolar.java index 24e131d..a7d6593 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityTripleDarkSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/dark/TileEntityTripleDarkSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleDarkSolar extends TileEntityDarkSolar { - public TileEntityTripleDarkSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleDarkSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 8); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 8); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityDoubleEarthSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityDoubleEarthSolar.java index 8e1e448..10760be 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityDoubleEarthSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityDoubleEarthSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleEarthSolar extends TileEntityEarthSolar { - public TileEntityDoubleEarthSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleEarthSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 3); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 3); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityEarthSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityEarthSolar.java index 9476d35..0a719c5 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityEarthSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityEarthSolar.java @@ -8,21 +8,22 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityEarthSolar extends TileEntitySolarBase { - public TileEntityEarthSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityEarthSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void createEnergy() { - if (theSunIsVisible && this.yCoord <= 10) { - energySource.addEnergy(output * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(output); - } - } + @Override + public void createEnergy() { + if (theSunIsVisible && this.yCoord <= 10) { + energySource.addEnergy(output * 2.5); + } + else if (theSunIsVisible) { + energySource.addEnergy(output); + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 2); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 2); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityTripleEarthSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityTripleEarthSolar.java index 2cedc81..a9fc780 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityTripleEarthSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/earth/TileEntityTripleEarthSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleEarthSolar extends TileEntityEarthSolar { - public TileEntityTripleEarthSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleEarthSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 4); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 4); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityDoubleFireSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityDoubleFireSolar.java index 25c4b32..138a28a 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityDoubleFireSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityDoubleFireSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleFireSolar extends TileEntityFireSolar { - public TileEntityDoubleFireSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleFireSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 13); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 13); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityFireSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityFireSolar.java index f0d1458..b2fbe19 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityFireSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityFireSolar.java @@ -8,29 +8,30 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityFireSolar extends TileEntitySolarBase { - public TileEntityFireSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityFireSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void checkConditions() { - if (!initialized && worldObj != null) { - canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; - initialized = true; - } + @Override + public void checkConditions() { + if (!initialized && worldObj != null) { + canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; + initialized = true; + } - if (worldObj.provider.dimensionId == -1) { - energySource.addEnergy(output * 2); - } else { - if (tick-- == 0) { - updateSunState(); - tick = 64; - } - } - } + if (worldObj.provider.dimensionId == -1) { + energySource.addEnergy(output * 2); + } + else { + if (tick-- == 0) { + updateSunState(); + tick = 64; + } + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 12); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 12); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityTripleFireSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityTripleFireSolar.java index b11a2ca..a69dd82 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityTripleFireSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/fire/TileEntityTripleFireSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleFireSolar extends TileEntityFireSolar { - public TileEntityTripleFireSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleFireSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 14); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 14); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityDoubleOrderSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityDoubleOrderSolar.java index 2a845fa..6c46eb8 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityDoubleOrderSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityDoubleOrderSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleOrderSolar extends TileEntityOrderSolar { - public TileEntityDoubleOrderSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleOrderSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 10); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 10); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityOrderSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityOrderSolar.java index 1eb0f55..78c5c98 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityOrderSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityOrderSolar.java @@ -8,19 +8,19 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityOrderSolar extends TileEntitySolarBase { - public TileEntityOrderSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityOrderSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void createEnergy() { - if (theSunIsVisible) { - energySource.addEnergy(output * 3); - } - } + @Override + public void createEnergy() { + if (theSunIsVisible) { + energySource.addEnergy(output * 3); + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 9); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 9); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityTripleOrderSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityTripleOrderSolar.java index 7c23429..6e57a37 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityTripleOrderSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/order/TileEntityTripleOrderSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleOrderSolar extends TileEntityOrderSolar { - public TileEntityTripleOrderSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleOrderSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 11); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 11); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityDoubleWaterSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityDoubleWaterSolar.java index af66005..9f542f0 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityDoubleWaterSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityDoubleWaterSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityDoubleWaterSolar extends TileEntityWaterSolar { - public TileEntityDoubleWaterSolar() { - output = ConfigHandler.doubleCompressedSolarOutput; - } + public TileEntityDoubleWaterSolar() { + output = ConfigHandler.doubleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 4); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 4); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityTripleWaterSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityTripleWaterSolar.java index cb6dbd1..d79c76f 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityTripleWaterSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityTripleWaterSolar.java @@ -7,12 +7,12 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityTripleWaterSolar extends TileEntityWaterSolar { - public TileEntityTripleWaterSolar() { - output = ConfigHandler.tripleCompressedSolarOutput; - } + public TileEntityTripleWaterSolar() { + output = ConfigHandler.tripleCompressedSolarOutput; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 5); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 5); + } } diff --git a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityWaterSolar.java b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityWaterSolar.java index 8f6ead8..cce3329 100644 --- a/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityWaterSolar.java +++ b/src/main/java/tombenpotter/emt/common/tile/solars/water/TileEntityWaterSolar.java @@ -8,19 +8,19 @@ import tombenpotter.emt.common.util.ConfigHandler; public class TileEntityWaterSolar extends TileEntitySolarBase { - public TileEntityWaterSolar() { - output = ConfigHandler.compressedSolarOutput; - } + public TileEntityWaterSolar() { + output = ConfigHandler.compressedSolarOutput; + } - @Override - public void createEnergy() { - if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { - energySource.addEnergy(output); - } - } + @Override + public void createEnergy() { + if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { + energySource.addEnergy(output); + } + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 3); - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 3); + } } diff --git a/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java b/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java index ff857e2..59da976 100644 --- a/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java +++ b/src/main/java/tombenpotter/emt/common/util/ConfigHandler.java @@ -6,214 +6,215 @@ import java.io.File; public class ConfigHandler { - public static Configuration config; + public static Configuration config; - // sections - public static String RANDOM = "Random Configs"; - public static String RESEARCH = "Research"; - public static String VALUES = "Numeric Values"; - public static String OUTPUTS = "Essentia Generator Outputs"; + // sections + public static String RANDOM = "Random Configs"; + public static String RESEARCH = "Research"; + public static String VALUES = "Numeric Values"; + public static String OUTPUTS = "Essentia Generator Outputs"; - public static int etherealProcessorBaseSpeed; - public static int etherealProcessorBonus; - public static int chargeFocusProduction; - public static int armorBaubleProduction; - public static int inventoryBaubleProdution; - public static int wandChargeFocusCost; - - public static int aerGenerator; - public static int arborGenerator; - public static int auramGenerator; - public static int ignisGenerator; - public static int potentiaGenerator; + public static int etherealProcessorBaseSpeed; + public static int etherealProcessorBonus; + public static int chargeFocusProduction; + public static int armorBaubleProduction; + public static int inventoryBaubleProdution; + public static int wandChargeFocusCost; - // values - public static double wandChargerConsumption; - public static double compressedSolarOutput; - public static double doubleCompressedSolarOutput; - public static double nanoBootsSpeed; - public static double quantumBootsSpeed; - public static double nanoBootsJump; - public static double quantumBootsJump; - public static double tripleCompressedSolarOutput; + public static int aerGenerator; + public static int arborGenerator; + public static int auramGenerator; + public static int ignisGenerator; + public static int potentiaGenerator; - // essentias - public static double fireOutput; - public static double waterOutput; - public static double airOutput; - public static double earthOutput; - public static double orderOutput; - public static double entropyOutput; - public static double outputCap; + // values + public static double wandChargerConsumption; + public static double compressedSolarOutput; + public static double doubleCompressedSolarOutput; + public static double nanoBootsSpeed; + public static double quantumBootsSpeed; + public static double nanoBootsJump; + public static double quantumBootsJump; + public static double tripleCompressedSolarOutput; - // random stuff - public static boolean impactOfRain; - public static boolean capesOn; - public static boolean toolsInBore; - public static boolean nightVisionOff; - public static boolean enchanting; - public static boolean smoke; - public static boolean oneRingSpawn; - public static boolean removeAmberAndCinnabarMacerating; + // essentias + public static double fireOutput; + public static double waterOutput; + public static double airOutput; + public static double earthOutput; + public static double orderOutput; + public static double entropyOutput; + public static double outputCap; - // loot chance - public static int chanceOneRing; - public static int chanceTaintedMjolnir; + // random stuff + public static boolean impactOfRain; + public static boolean capesOn; + public static boolean toolsInBore; + public static boolean nightVisionOff; + public static boolean enchanting; + public static boolean smoke; + public static boolean oneRingSpawn; + public static boolean removeAmberAndCinnabarMacerating; - // research - public static boolean thaumiumDrillResearch; - public static boolean thaumiumChainsawResearch; - public static boolean thaumiumOmnitoolResearch; - public static boolean rockbreakerDrillResearch; - public static boolean streamChainsawResearch; - public static boolean electricGooglesResearch; - public static boolean nanoGooglesResearch; - public static boolean quantumGooglesResearch; - public static boolean ironOmnitoolResearch; - public static boolean diamondOmnitoolResearch; - public static boolean explosionFocusResearch; - public static boolean christmasFocusResearch; - public static boolean shieldFocusResearch; - public static boolean shieldBlockResearch; - public static boolean potentiaGeneratorResearch; - public static boolean ignisGeneratorResearch; - public static boolean auramGeneratorResearch; - public static boolean arborGeneratorResearch; - public static boolean wandChargingSationResearch; - public static boolean tinyUraniumResearch; - public static boolean thorHammerResearch; - public static boolean superchargedThorHammerResearch; - public static boolean compressedSolarsResearch; - public static boolean solarHelmetResearch; - public static boolean electricBootsResearch; - public static boolean nanoBootsResearch; - public static boolean quantumBootsResearch; - public static boolean electricScribingToolsResearch; - public static boolean etherealProcessorResearch; - public static boolean waterSolarsResearch; - public static boolean darkSolarsResearch; - public static boolean orderSolarsResearch; - public static boolean fireSolarsResearch; - public static boolean airSolarsResearch; - public static boolean earthSolarsResearch; - public static boolean saxumGenResearch; - public static boolean uuMInfusionResearch; - public static boolean portableNodeResarch; - public static boolean electricHoeGrowthResearch; - public static boolean chargeFocusResearch; - public static boolean wandChargeFocusResearch; - public static boolean inventoryChargingRing; - public static boolean armorChargingRing; - public static boolean thaumiumWingResearch; - public static boolean nanoWingResearch; - public static boolean quantumWingsResearch; - public static boolean infusedQuantumChestplate; - public static boolean aerGeneratorResearch; + // loot chance + public static int chanceOneRing; + public static int chanceTaintedMjolnir; - public static void init(File file) { - config = new Configuration(file); - syncConfig(); - } + // research + public static boolean thaumiumDrillResearch; + public static boolean thaumiumChainsawResearch; + public static boolean thaumiumOmnitoolResearch; + public static boolean rockbreakerDrillResearch; + public static boolean streamChainsawResearch; + public static boolean electricGooglesResearch; + public static boolean nanoGooglesResearch; + public static boolean quantumGooglesResearch; + public static boolean ironOmnitoolResearch; + public static boolean diamondOmnitoolResearch; + public static boolean explosionFocusResearch; + public static boolean christmasFocusResearch; + public static boolean shieldFocusResearch; + public static boolean shieldBlockResearch; + public static boolean potentiaGeneratorResearch; + public static boolean ignisGeneratorResearch; + public static boolean auramGeneratorResearch; + public static boolean arborGeneratorResearch; + public static boolean wandChargingSationResearch; + public static boolean tinyUraniumResearch; + public static boolean thorHammerResearch; + public static boolean superchargedThorHammerResearch; + public static boolean compressedSolarsResearch; + public static boolean solarHelmetResearch; + public static boolean electricBootsResearch; + public static boolean nanoBootsResearch; + public static boolean quantumBootsResearch; + public static boolean electricScribingToolsResearch; + public static boolean etherealProcessorResearch; + public static boolean waterSolarsResearch; + public static boolean darkSolarsResearch; + public static boolean orderSolarsResearch; + public static boolean fireSolarsResearch; + public static boolean airSolarsResearch; + public static boolean earthSolarsResearch; + public static boolean saxumGenResearch; + public static boolean uuMInfusionResearch; + public static boolean portableNodeResarch; + public static boolean electricHoeGrowthResearch; + public static boolean chargeFocusResearch; + public static boolean wandChargeFocusResearch; + public static boolean inventoryChargingRing; + public static boolean armorChargingRing; + public static boolean thaumiumWingResearch; + public static boolean nanoWingResearch; + public static boolean quantumWingsResearch; + public static boolean infusedQuantumChestplate; + public static boolean aerGeneratorResearch; - public static void syncConfig() { + public static void init(File file) { + config = new Configuration(file); + syncConfig(); + } - config.addCustomCategoryComment(VALUES, "The only way to change some numbers that my machines uses."); - config.addCustomCategoryComment(RESEARCH, "The only way to disable some researches. " + "Be careful, if you disable some researches, " + "all researches linked to it will be removed too. " + "Really, don't touch that unless you know exactly what you are doing."); - config.addCustomCategoryComment(OUTPUTS, "Change outputs linked to different Essentias here"); - config.addCustomCategoryComment(RANDOM, "Options that don't fit into the other categories."); + public static void syncConfig() { - capesOn = config.get(RANDOM, "Enable capes", true, "This config option is to enable or disable capes for people who have them. " + "Seriously, you shouldn't touch that unless you have another cape and " + "it conflicts with it.").getBoolean(capesOn); - toolsInBore = config.get(RANDOM, "Tools for Arcane Bore", false, "This will augment the durablilty of the tools, and will also decrease the EU cost to 1. " + "The tools should have the same number of uses than before.").getBoolean(toolsInBore); - nightVisionOff = config.get(RANDOM, "Disable nightvision helmets", false, "This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.").getBoolean(nightVisionOff); - enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.").getBoolean(enchanting); - smoke = config.get(RANDOM, "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); - oneRingSpawn = config.get(RANDOM, "Disable One Ring in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); - chanceTaintedMjolnir = config.get(RANDOM, "Tainted Mjolnir spawning change", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); - chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); - removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating); - impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain); + config.addCustomCategoryComment(VALUES, "The only way to change some numbers that my machines uses."); + config.addCustomCategoryComment(RESEARCH, "The only way to disable some researches. " + "Be careful, if you disable some researches, " + "all researches linked to it will be removed too. " + "Really, don't touch that unless you know exactly what you are doing."); + config.addCustomCategoryComment(OUTPUTS, "Change outputs linked to different Essentias here"); + config.addCustomCategoryComment(RANDOM, "Options that don't fit into the other categories."); - // DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 Perditio - 10,000 Terra - 2,000 - airOutput = config.get(OUTPUTS, "Aer Output", 15000).getDouble(airOutput); - waterOutput = config.get(OUTPUTS, "Aqua Output", 5000).getDouble(waterOutput); - fireOutput = config.get(OUTPUTS, "Ignis Output", 20000).getDouble(fireOutput); - orderOutput = config.get(OUTPUTS, "Ordo Output", 16000).getDouble(orderOutput); - entropyOutput = config.get(OUTPUTS, "Perditio Output", 10000).getDouble(entropyOutput); - earthOutput = config.get(OUTPUTS, "Terra Output", 2000).getDouble(earthOutput); - outputCap = config.get(OUTPUTS, "Output Cap", -1).getDouble(outputCap); + capesOn = config.get(RANDOM, "Enable capes", true, "This config option is to enable or disable capes for people who have them. " + "Seriously, you shouldn't touch that unless you have another cape and " + "it conflicts with it.").getBoolean(capesOn); + toolsInBore = config.get(RANDOM, "Tools for Arcane Bore", false, "This will augment the durablilty of the tools, and will also decrease the EU cost to 1. " + "The tools should have the same number of uses than before.").getBoolean(toolsInBore); + nightVisionOff = config.get(RANDOM, "Disable nightvision helmets", false, "This was added because of mods making you totally blind if using nightvision. For example, enable that when in the Deep Dark.").getBoolean(nightVisionOff); + enchanting = config.get(RANDOM, "Enable enchanting tools", false, "Warning: the enchantability is low.").getBoolean(enchanting); + smoke = config.get(RANDOM, "Disable smoke effect for boots", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); + oneRingSpawn = config.get(RANDOM, "Disable One Ring in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); + chanceTaintedMjolnir = config.get(RANDOM, "Tainted Mjolnir spawning change", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + chanceOneRing = config.get(RANDOM, "One Ring spawning chance", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + removeAmberAndCinnabarMacerating = config.get(RANDOM, "Clear Amber/Cinnabar Macerating", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating); + impactOfRain = config.get(RANDOM, "Impact of rain", true, "The impact of rain on all wings").getBoolean(impactOfRain); - wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption); - compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput); - doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput); - tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput); - nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); - quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); - nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - quantumBootsJump = config.get(VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - etherealProcessorBaseSpeed = config.get(VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace").getInt(); - etherealProcessorBonus = config.get(VALUES, "Ethereal Processor Bonus", 10, "This number is the chance of getting a Thaumium Ingot as a bonus when " + "processing an item in the machine. It is 1 out of the number you will enter. " + "The default is 1/10 chance.").getInt(); - chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64").getInt(); - armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt(); - inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt(); - wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt(); - - aerGenerator = config.get(VALUES, "Aer generator", 300, "EU/t").getInt(); - auramGenerator = config.get(VALUES, "Auram generator", 400, "EU/t").getInt(); - arborGenerator = config.get(VALUES, "Arbor generator", 450, "EU/t").getInt(); - ignisGenerator = config.get(VALUES, "Ignis generator", 400, "EU/t").getInt(); - potentiaGenerator = config.get(VALUES, "Potentia generator", 200, "EU/t").getInt(); + // DEFAULTS - Aer - 15,000 Aqua - 5,000 Ignis - 20,000 Ordo - 16,000 + // Perditio - 10,000 Terra - 2,000 + airOutput = config.get(OUTPUTS, "Aer Output", 15000).getDouble(airOutput); + waterOutput = config.get(OUTPUTS, "Aqua Output", 5000).getDouble(waterOutput); + fireOutput = config.get(OUTPUTS, "Ignis Output", 20000).getDouble(fireOutput); + orderOutput = config.get(OUTPUTS, "Ordo Output", 16000).getDouble(orderOutput); + entropyOutput = config.get(OUTPUTS, "Perditio Output", 10000).getDouble(entropyOutput); + earthOutput = config.get(OUTPUTS, "Terra Output", 2000).getDouble(earthOutput); + outputCap = config.get(OUTPUTS, "Output Cap", -1).getDouble(outputCap); - thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch); - thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch); - thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch); - rockbreakerDrillResearch = config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch); - streamChainsawResearch = config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch); - electricGooglesResearch = config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch); - nanoGooglesResearch = config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch); - quantumGooglesResearch = config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch); - ironOmnitoolResearch = config.get(RESEARCH, "Omnitool", false).getBoolean(ironOmnitoolResearch); - diamondOmnitoolResearch = config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch); - explosionFocusResearch = config.get(RESEARCH, "Explosion Focus", false).getBoolean(explosionFocusResearch); - christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch); - shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch); - shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch); - potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch); - ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch); - auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch); - arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch); - wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch); - tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch); - thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch); - superchargedThorHammerResearch = config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch); - compressedSolarsResearch = config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch); - solarHelmetResearch = config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch); - electricBootsResearch = config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch); - nanoBootsResearch = config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch); - quantumBootsResearch = config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch); - electricScribingToolsResearch = config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch); - etherealProcessorResearch = config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch); - waterSolarsResearch = config.get(RESEARCH, "Water Solar Panels", false).getBoolean(waterSolarsResearch); - darkSolarsResearch = config.get(RESEARCH, "Entropy Solar Panels", false).getBoolean(darkSolarsResearch); - orderSolarsResearch = config.get(RESEARCH, "Order Solar Panels", false).getBoolean(orderSolarsResearch); - fireSolarsResearch = config.get(RESEARCH, "Fire Solar Panels", false).getBoolean(fireSolarsResearch); - airSolarsResearch = config.get(RESEARCH, "Air Solar Panels", false).getBoolean(airSolarsResearch); - earthSolarsResearch = config.get(RESEARCH, "Earth Solar Panels", false).getBoolean(earthSolarsResearch); - saxumGenResearch = config.get(RESEARCH, "Saxum Generator", false).getBoolean(saxumGenResearch); - uuMInfusionResearch = config.get(RESEARCH, "UU-Mater Infusion", false).getBoolean(uuMInfusionResearch); - portableNodeResarch = config.get(RESEARCH, "Portable Node", false).getBoolean(portableNodeResarch); - electricHoeGrowthResearch = config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch); - chargeFocusResearch = config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch); - wandChargeFocusResearch = config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch); - inventoryChargingRing = config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing); - armorChargingRing = config.get(RESEARCH, "Armor Charging Ring", false).getBoolean(armorChargingRing); - thaumiumWingResearch = config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch); - nanoWingResearch = config.get(RESEARCH, "Nanosuit Wings", false).getBoolean(nanoWingResearch); - quantumWingsResearch = config.get(RESEARCH, "Quantum Wings", false).getBoolean(quantumWingsResearch); - infusedQuantumChestplate = config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate); - aerGeneratorResearch = config.get(RESEARCH, "Aer Generator", false).getBoolean(aerGeneratorResearch); + wandChargerConsumption = config.get(VALUES, "Wand Charging Station Consumption", 50000, "This is the number you have to modify if you want to make the Industrial Wand Charging " + "Station use more or less EU to charge 1 unit of Vis on your wand.").getDouble(wandChargerConsumption); + compressedSolarOutput = config.get(VALUES, "Compressed Solar Panel Output", 10, "This is the number you have to modify if you want to make the Compressed Solar Panel yield " + "more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(compressedSolarOutput); + doubleCompressedSolarOutput = config.get(VALUES, "Double Compressed Solar Panel Output", 100, "This is the number you have to modify if you want to make the Double Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(doubleCompressedSolarOutput); + tripleCompressedSolarOutput = config.get(VALUES, "Triple Compressed Solar Panel Output", 1000, "This is the number you have to modify if you want to make the Triple Compressed Solar Panel " + "yield more or less EU per tick. Really, you shouldn't touch that, " + "since it's pretty balanced as it is.").getDouble(tripleCompressedSolarOutput); + nanoBootsSpeed = config.get(VALUES, "Nano Boots of the Traveller Speed", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); + quantumBootsSpeed = config.get(VALUES, "Quantum Boots of the Traveller Speed", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); + nanoBootsJump = config.get(VALUES, "Nano Boots of the Traveller jump", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + quantumBootsJump = config.get(VALUES, "Quantum Boots of the Traveller jump", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + etherealProcessorBaseSpeed = config.get(VALUES, "Etheral Processor speed", 400, "Default is 400, the double of a regular furnace").getInt(); + etherealProcessorBonus = config.get(VALUES, "Ethereal Processor Bonus", 10, "This number is the chance of getting a Thaumium Ingot as a bonus when " + "processing an item in the machine. It is 1 out of the number you will enter. " + "The default is 1/10 chance.").getInt(); + chargeFocusProduction = config.get(VALUES, "Wand Focus: Charge production", 64, "Default is 64").getInt(); + armorBaubleProduction = config.get(VALUES, "Armor Charging Ring production", 32, "Default is 32").getInt(); + inventoryBaubleProdution = config.get(VALUES, "Inventory Charging Ring production", 32, "Default is 32").getInt(); + wandChargeFocusCost = config.get(VALUES, "Wand Focus: Wand Charging Cost", 40000, "Default is 40000").getInt(); - if (config.hasChanged()) { - config.save(); - } - } + aerGenerator = config.get(VALUES, "Aer generator", 300, "EU/t").getInt(); + auramGenerator = config.get(VALUES, "Auram generator", 400, "EU/t").getInt(); + arborGenerator = config.get(VALUES, "Arbor generator", 450, "EU/t").getInt(); + ignisGenerator = config.get(VALUES, "Ignis generator", 400, "EU/t").getInt(); + potentiaGenerator = config.get(VALUES, "Potentia generator", 200, "EU/t").getInt(); + + thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Drill", false).getBoolean(thaumiumDrillResearch); + thaumiumChainsawResearch = config.get(RESEARCH, "Thaumium Chainsaw", false).getBoolean(thaumiumChainsawResearch); + thaumiumDrillResearch = config.get(RESEARCH, "Thaumium Omnitool", false).getBoolean(thaumiumOmnitoolResearch); + rockbreakerDrillResearch = config.get(RESEARCH, "Drill of the Rockbreaker", false).getBoolean(rockbreakerDrillResearch); + streamChainsawResearch = config.get(RESEARCH, "Chainsaw of the Stream", false).getBoolean(streamChainsawResearch); + electricGooglesResearch = config.get(RESEARCH, "Electric Googles of Revealing", false).getBoolean(electricGooglesResearch); + nanoGooglesResearch = config.get(RESEARCH, "Nanosuit Googles of Revealing", false).getBoolean(nanoGooglesResearch); + quantumGooglesResearch = config.get(RESEARCH, "Quantum Googles of Revealing", false).getBoolean(quantumGooglesResearch); + ironOmnitoolResearch = config.get(RESEARCH, "Omnitool", false).getBoolean(ironOmnitoolResearch); + diamondOmnitoolResearch = config.get(RESEARCH, "Diamond Omnitool", false).getBoolean(diamondOmnitoolResearch); + explosionFocusResearch = config.get(RESEARCH, "Explosion Focus", false).getBoolean(explosionFocusResearch); + christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch); + shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch); + shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch); + potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false).getBoolean(potentiaGeneratorResearch); + ignisGeneratorResearch = config.get(RESEARCH, "Ignis Generator", false).getBoolean(ignisGeneratorResearch); + auramGeneratorResearch = config.get(RESEARCH, "Auram Generator", false).getBoolean(auramGeneratorResearch); + arborGeneratorResearch = config.get(RESEARCH, "Arbor Generator", false).getBoolean(arborGeneratorResearch); + wandChargingSationResearch = config.get(RESEARCH, "Industrial Wand Charging Station", false).getBoolean(wandChargingSationResearch); + tinyUraniumResearch = config.get(RESEARCH, "Tiny Piles of Uranium", false).getBoolean(tinyUraniumResearch); + thorHammerResearch = config.get(RESEARCH, "Mjolnir", false).getBoolean(thorHammerResearch); + superchargedThorHammerResearch = config.get(RESEARCH, "Supercharged Mjolnir", false).getBoolean(superchargedThorHammerResearch); + compressedSolarsResearch = config.get(RESEARCH, "Compressed Solars", false).getBoolean(compressedSolarsResearch); + solarHelmetResearch = config.get(RESEARCH, "Solar Helmet of Revealing", false).getBoolean(solarHelmetResearch); + electricBootsResearch = config.get(RESEARCH, "Electric Boots of the Traveller", false).getBoolean(electricBootsResearch); + nanoBootsResearch = config.get(RESEARCH, "Nano Boots of the Traveller", false).getBoolean(nanoBootsResearch); + quantumBootsResearch = config.get(RESEARCH, "Quantum Boots of the Traveller", false).getBoolean(quantumBootsResearch); + electricScribingToolsResearch = config.get(RESEARCH, "Electric Scribing Tools", false).getBoolean(electricScribingToolsResearch); + etherealProcessorResearch = config.get(RESEARCH, "Ethereal Processor", false).getBoolean(etherealProcessorResearch); + waterSolarsResearch = config.get(RESEARCH, "Water Solar Panels", false).getBoolean(waterSolarsResearch); + darkSolarsResearch = config.get(RESEARCH, "Entropy Solar Panels", false).getBoolean(darkSolarsResearch); + orderSolarsResearch = config.get(RESEARCH, "Order Solar Panels", false).getBoolean(orderSolarsResearch); + fireSolarsResearch = config.get(RESEARCH, "Fire Solar Panels", false).getBoolean(fireSolarsResearch); + airSolarsResearch = config.get(RESEARCH, "Air Solar Panels", false).getBoolean(airSolarsResearch); + earthSolarsResearch = config.get(RESEARCH, "Earth Solar Panels", false).getBoolean(earthSolarsResearch); + saxumGenResearch = config.get(RESEARCH, "Saxum Generator", false).getBoolean(saxumGenResearch); + uuMInfusionResearch = config.get(RESEARCH, "UU-Mater Infusion", false).getBoolean(uuMInfusionResearch); + portableNodeResarch = config.get(RESEARCH, "Portable Node", false).getBoolean(portableNodeResarch); + electricHoeGrowthResearch = config.get(RESEARCH, "Electric Hoe of Growth", false).getBoolean(electricHoeGrowthResearch); + chargeFocusResearch = config.get(RESEARCH, "Wand Focus: Charging", false).getBoolean(chargeFocusResearch); + wandChargeFocusResearch = config.get(RESEARCH, "Wand Focus: Wand Charging", false).getBoolean(wandChargeFocusResearch); + inventoryChargingRing = config.get(RESEARCH, "Inventory Charging Ring", false).getBoolean(inventoryChargingRing); + armorChargingRing = config.get(RESEARCH, "Armor Charging Ring", false).getBoolean(armorChargingRing); + thaumiumWingResearch = config.get(RESEARCH, "Thaumium Reinforced Wings", false).getBoolean(thaumiumWingResearch); + nanoWingResearch = config.get(RESEARCH, "Nanosuit Wings", false).getBoolean(nanoWingResearch); + quantumWingsResearch = config.get(RESEARCH, "Quantum Wings", false).getBoolean(quantumWingsResearch); + infusedQuantumChestplate = config.get(RESEARCH, "Infused Quantum Chestplate", false).getBoolean(infusedQuantumChestplate); + aerGeneratorResearch = config.get(RESEARCH, "Aer Generator", false).getBoolean(aerGeneratorResearch); + + if (config.hasChanged()) { + config.save(); + } + } } diff --git a/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java b/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java index 46ea8ca..64c9842 100644 --- a/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java +++ b/src/main/java/tombenpotter/emt/common/util/CraftingAspects.java @@ -5,53 +5,53 @@ import thaumcraft.api.aspects.AspectList; public class CraftingAspects { - public static AspectList thaumiumDrillCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16); - public static AspectList thaumiumChainsawCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16); - public static AspectList thaumicQuantumHelmetCrafting = new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25); - public static AspectList diamondOmnitoolCrafting = new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15); - public static AspectList thaumiumOmnitoolCrafting = new AspectList().add(Aspect.TOOL, 25).add(Aspect.MINE, 25).add(Aspect.ENERGY, 25).add(Aspect.WEAPON, 25); - public static AspectList thaumicNanoHelmetCrafting = new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16); - public static AspectList laserFocusCrafting = new AspectList().add(Aspect.FIRE, 30).add(Aspect.MOTION, 16).add(Aspect.WEAPON, 30).add(Aspect.DEATH, 16); - public static AspectList christmasFocusCrafting = new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20); - public static AspectList shieldFocusCrafting = new AspectList().add(Aspect.AIR, 16).add(Aspect.ARMOR, 20).add(Aspect.CRYSTAL, 16).add(Aspect.TRAP, 20).add(Aspect.LIFE, 16); - public static AspectList electricGogglesCrafting = new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20); - public static AspectList potentiaGeneratorCrafting = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.MAGIC, 32).add(Aspect.METAL, 32).add(Aspect.EXCHANGE, 32); - public static AspectList ignisGeneratorCrafting = new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8); - public static AspectList auramGeneratorCrafting = new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8); - public static AspectList arborGeneratorCrafting = new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8); - public static AspectList streamChaisnawCrafting = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.TREE, 48).add(Aspect.TOOL, 32).add(Aspect.WATER, 32); - public static AspectList rockbreakerDrillCrafting = new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32); - public static AspectList shieldBlockCrafting = new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); - public static AspectList tinyUraniumCrafting = new AspectList().add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); - public static AspectList thorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32); - public static AspectList superchargedThorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32); - public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.CRAFT, 48).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); - public static AspectList compressedSolars = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); - public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25); - public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32); - public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48); - public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64); - public static AspectList electricScribingTools = new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); - public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16); - public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList airSolars = new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); - public static AspectList uuMatterInfusions = new AspectList().add(Aspect.FIRE, 32).add(Aspect.WATER, 32).add(Aspect.AIR, 32).add(Aspect.EARTH, 32).add(Aspect.ORDER, 32).add(Aspect.ENTROPY, 32); - public static AspectList lesserUUMInfusions = new AspectList().add(Aspect.FIRE, 16).add(Aspect.WATER, 16).add(Aspect.AIR, 16).add(Aspect.EARTH, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); - public static AspectList cheapUUMInfusions = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); - public static AspectList cheapestUUMInfusions = new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 4).add(Aspect.AIR, 4).add(Aspect.EARTH, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4); - public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32); - public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.PLANT, 25).add(Aspect.CROP, 32).add(Aspect.MAGIC, 48); - public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32); - public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); - public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48); - public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48); - public static AspectList thaumiumWing = new AspectList().add(Aspect.FIRE, 48).add(Aspect.WATER, 48).add(Aspect.AIR, 48).add(Aspect.EARTH, 48).add(Aspect.ORDER, 48).add(Aspect.ENTROPY, 48); - public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32); - public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48); - public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); - public static AspectList uuMatterCrystal = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.AIR, 8).add(Aspect.CRYSTAL, 16).add(Aspect.COLD, 32).add(Aspect.MAGIC, 8); + public static AspectList thaumiumDrillCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.MINE, 16).add(Aspect.ENERGY, 16); + public static AspectList thaumiumChainsawCrafting = new AspectList().add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.ENERGY, 16); + public static AspectList thaumicQuantumHelmetCrafting = new AspectList().add(Aspect.ARMOR, 25).add(Aspect.SENSES, 25).add(Aspect.ENERGY, 25); + public static AspectList diamondOmnitoolCrafting = new AspectList().add(Aspect.ORDER, 15).add(Aspect.AIR, 15); + public static AspectList thaumiumOmnitoolCrafting = new AspectList().add(Aspect.TOOL, 25).add(Aspect.MINE, 25).add(Aspect.ENERGY, 25).add(Aspect.WEAPON, 25); + public static AspectList thaumicNanoHelmetCrafting = new AspectList().add(Aspect.ARMOR, 16).add(Aspect.SENSES, 16).add(Aspect.ENERGY, 16); + public static AspectList laserFocusCrafting = new AspectList().add(Aspect.FIRE, 30).add(Aspect.MOTION, 16).add(Aspect.WEAPON, 30).add(Aspect.DEATH, 16); + public static AspectList christmasFocusCrafting = new AspectList().add(Aspect.ORDER, 20).add(Aspect.AIR, 20); + public static AspectList shieldFocusCrafting = new AspectList().add(Aspect.AIR, 16).add(Aspect.ARMOR, 20).add(Aspect.CRYSTAL, 16).add(Aspect.TRAP, 20).add(Aspect.LIFE, 16); + public static AspectList electricGogglesCrafting = new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 20).add(Aspect.WATER, 20); + public static AspectList potentiaGeneratorCrafting = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.MAGIC, 32).add(Aspect.METAL, 32).add(Aspect.EXCHANGE, 32); + public static AspectList ignisGeneratorCrafting = new AspectList().add(Aspect.FIRE, 16).add(Aspect.EXCHANGE, 8); + public static AspectList auramGeneratorCrafting = new AspectList().add(Aspect.AURA, 16).add(Aspect.EXCHANGE, 8); + public static AspectList arborGeneratorCrafting = new AspectList().add(Aspect.TREE, 16).add(Aspect.EXCHANGE, 8); + public static AspectList streamChaisnawCrafting = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.TREE, 48).add(Aspect.TOOL, 32).add(Aspect.WATER, 32); + public static AspectList rockbreakerDrillCrafting = new AspectList().add(Aspect.TOOL, 32).add(Aspect.ENERGY, 48).add(Aspect.MINE, 32); + public static AspectList shieldBlockCrafting = new AspectList().add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); + public static AspectList tinyUraniumCrafting = new AspectList().add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.ORDER, 1).add(Aspect.ENTROPY, 1); + public static AspectList thorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.WEATHER, 48).add(Aspect.ELDRITCH, 32); + public static AspectList superchargedThorHammerCrafting = new AspectList().add(Aspect.WEAPON, 48).add(Aspect.ENERGY, 64).add(Aspect.BEAST, 32); + public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.CRAFT, 48).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); + public static AspectList compressedSolars = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); + public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.AIR, 32).add(Aspect.LIGHT, 25); + public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 32); + public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 25).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 48); + public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 32).add(Aspect.MOTION, 64); + public static AspectList electricScribingTools = new AspectList().add(Aspect.AIR, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); + public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 16).add(Aspect.MAGIC, 16).add(Aspect.CRAFT, 16); + public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList airSolars = new AspectList().add(Aspect.AIR, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 16).add(Aspect.MAGIC, 16).add(Aspect.EXCHANGE, 16); + public static AspectList uuMatterInfusions = new AspectList().add(Aspect.FIRE, 32).add(Aspect.WATER, 32).add(Aspect.AIR, 32).add(Aspect.EARTH, 32).add(Aspect.ORDER, 32).add(Aspect.ENTROPY, 32); + public static AspectList lesserUUMInfusions = new AspectList().add(Aspect.FIRE, 16).add(Aspect.WATER, 16).add(Aspect.AIR, 16).add(Aspect.EARTH, 16).add(Aspect.ORDER, 16).add(Aspect.ENTROPY, 16); + public static AspectList cheapUUMInfusions = new AspectList().add(Aspect.FIRE, 8).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8).add(Aspect.ORDER, 8).add(Aspect.ENTROPY, 8); + public static AspectList cheapestUUMInfusions = new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 4).add(Aspect.AIR, 4).add(Aspect.EARTH, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4); + public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 32).add(Aspect.AURA, 32).add(Aspect.GREED, 32); + public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 32).add(Aspect.PLANT, 25).add(Aspect.CROP, 32).add(Aspect.MAGIC, 48); + public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 25).add(Aspect.ENERGY, 32).add(Aspect.MECHANISM, 32); + public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32).add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64); + public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32).add(Aspect.MAGIC, 48); + public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32).add(Aspect.MAGIC, 48); + public static AspectList thaumiumWing = new AspectList().add(Aspect.FIRE, 48).add(Aspect.WATER, 48).add(Aspect.AIR, 48).add(Aspect.EARTH, 48).add(Aspect.ORDER, 48).add(Aspect.ENTROPY, 48); + public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32); + public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 48).add(Aspect.AIR, 32).add(Aspect.MECHANISM, 48).add(Aspect.ENERGY, 32).add(Aspect.ARMOR, 48); + public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.AIR, 8); + public static AspectList uuMatterCrystal = new AspectList().add(Aspect.CRYSTAL, 8).add(Aspect.COLD, 8).add(Aspect.MAGIC, 8); } diff --git a/src/main/java/tombenpotter/emt/common/util/CreativeTab.java b/src/main/java/tombenpotter/emt/common/util/CreativeTab.java new file mode 100644 index 0000000..329387e --- /dev/null +++ b/src/main/java/tombenpotter/emt/common/util/CreativeTab.java @@ -0,0 +1,34 @@ +package tombenpotter.emt.common.util; + +import tombenpotter.emt.common.init.ItemRegistry; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class CreativeTab extends CreativeTabs { + + public CreativeTab(String tabLabel) { + super(tabLabel); + setBackgroundImageName("emt.png"); + } + + @Override + public ItemStack getIconItemStack() { + return new ItemStack(ItemRegistry.rockbreakerDrill); + } + + @Override + public Item getTabIconItem() { + return new Item(); + } + + @Override + public boolean hasSearchBar() { + return true; + } + + @Override + public int getSearchbarWidth() { + return 60; + } +} diff --git a/src/main/java/tombenpotter/emt/common/util/CreativeTabEMT.java b/src/main/java/tombenpotter/emt/common/util/CreativeTabEMT.java deleted file mode 100644 index d94d8e2..0000000 --- a/src/main/java/tombenpotter/emt/common/util/CreativeTabEMT.java +++ /dev/null @@ -1,34 +0,0 @@ -package tombenpotter.emt.common.util; - -import tombenpotter.emt.common.init.ItemRegistry; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class CreativeTabEMT extends CreativeTabs { - - public CreativeTabEMT(String tabLabel) { - super(tabLabel); - setBackgroundImageName("emt.png"); - } - - @Override - public ItemStack getIconItemStack() { - return new ItemStack(ItemRegistry.rockbreakerDrill); - } - - @Override - public Item getTabIconItem() { - return new Item(); - } - - @Override - public boolean hasSearchBar() { - return true; - } - - @Override - public int getSearchbarWidth() { - return 60; - } -} diff --git a/src/main/java/tombenpotter/emt/common/util/DungeonChestGenerator.java b/src/main/java/tombenpotter/emt/common/util/DungeonChestGenerator.java index d817814..220f131 100644 --- a/src/main/java/tombenpotter/emt/common/util/DungeonChestGenerator.java +++ b/src/main/java/tombenpotter/emt/common/util/DungeonChestGenerator.java @@ -7,12 +7,12 @@ import net.minecraftforge.common.ChestGenHooks; public class DungeonChestGenerator { - public static void generateLoot() { - if (!ConfigHandler.thorHammerResearch) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.taintedThorHammer), 0, 1, ConfigHandler.chanceTaintedMjolnir)); - } - if (!ConfigHandler.oneRingSpawn) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.onering), 0, 1, ConfigHandler.chanceOneRing)); - } - } + public static void generateLoot() { + if (!ConfigHandler.thorHammerResearch) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.taintedThorHammer), 0, 1, ConfigHandler.chanceTaintedMjolnir)); + } + if (!ConfigHandler.oneRingSpawn) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.onering), 0, 1, ConfigHandler.chanceOneRing)); + } + } } diff --git a/src/main/java/tombenpotter/emt/common/util/EMTEventHandler.java b/src/main/java/tombenpotter/emt/common/util/EMTEventHandler.java new file mode 100644 index 0000000..fdcb436 --- /dev/null +++ b/src/main/java/tombenpotter/emt/common/util/EMTEventHandler.java @@ -0,0 +1,53 @@ +package tombenpotter.emt.common.util; + +import java.util.Random; + +import cpw.mods.fml.client.event.ConfigChangedEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; +import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; +import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingDropsEvent; +import thaumcraft.common.entities.monster.EntityTaintChicken; +import tombenpotter.emt.ElectroMagicTools; +import tombenpotter.emt.ModInformation; +import tombenpotter.emt.client.EMTKeys; +import tombenpotter.emt.common.init.ItemRegistry; +import tombenpotter.emt.common.network.PacketEMTKeys; +import tombenpotter.emt.proxies.ClientProxy; + +public class EMTEventHandler { + Random rnd = new Random(); + + @SubscribeEvent + public void onEntityLivingDrops(LivingDropsEvent event) { + if (event.entityLiving instanceof EntityCreeper) { + EntityCreeper creeper = (EntityCreeper) event.entityLiving; + if (creeper.getPowered()) { + event.entityLiving.entityDropItem(new ItemStack(ItemRegistry.itemEMTItems, 1, 6), 1); + } + } + if (event.entityLiving instanceof EntityTaintChicken) { + event.entityLiving.entityDropItem(new ItemStack(ItemRegistry.itemEMTItems, rnd.nextInt(3), 13), 1); + } + } + + @SubscribeEvent + public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { + if (event.modID.equals(ModInformation.modid)) { + ConfigHandler.syncConfig(); + ElectroMagicTools.logger.info("Refreshing configuration file."); + } + } + + @SubscribeEvent + public void clientTick(ClientTickEvent e) { + if (EMTKeys.keyUnequipPressed()) { + ElectroMagicTools.INSTANCE.sendToServer(new PacketEMTKeys()); + } + } +} diff --git a/src/main/java/tombenpotter/emt/common/util/EMTResearch.java b/src/main/java/tombenpotter/emt/common/util/EMTResearch.java index a676996..bcf05c3 100644 --- a/src/main/java/tombenpotter/emt/common/util/EMTResearch.java +++ b/src/main/java/tombenpotter/emt/common/util/EMTResearch.java @@ -17,320 +17,279 @@ import tombenpotter.emt.common.util.EMTResearchItem; import tombenpotter.emt.common.util.ResearchAspects; public class EMTResearch { + public static void register() { + addResearchTab(); + addResearch(); + } - public static void addResearchTab(){ - ResourceLocation background = new ResourceLocation(ModInformation.texturePath, "textures/misc/background.png"); - ResearchCategories.registerCategory("EMT", new ResourceLocation("electromagictools:textures/misc/emt.png"), background); - } + public static void addResearchTab() { + ResourceLocation background = new ResourceLocation(ModInformation.texturePath, "textures/misc/background.png"); + ResearchCategories.registerCategory("EMT", new ResourceLocation("electromagictools:textures/misc/emt.png"), background); + } - public static void addResearch() { - /** Research that can't be disabled **/ - new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electromagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1")); - - new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(ItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.diamondChainsaw)); + public static void addResearch() { + /** Research that can't be disabled **/ + new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electromagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1")); - new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumPlate)); + new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(ItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.diamondChainsaw)); - new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1")); + new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumPlate)); - new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(ItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1")); + new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1")); - new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1")); + new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(ItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1")); - new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(ItemRegistry.onering)).setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1")); + new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1")); - new EMTResearchItem("Feather Wings", "EMT", new AspectList(), 0, 2, 0, new ItemStack(ItemRegistry.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage(RecipeRegistry.cardboard), new ResearchPage(RecipeRegistry.featherWing), new ResearchPage(RecipeRegistry.featherWings)); + new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(ItemRegistry.onering)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1")); - /** Research that can be disabled **/ - if (!ConfigHandler.thaumiumDrillResearch) { - new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(ItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumDrill)); - } + new EMTResearchItem("Feather Wings", "EMT", new AspectList(), 0, 2, 0, new ItemStack(ItemRegistry.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(RecipeRegistry.cardboard), new ResearchPage(RecipeRegistry.featherWing), new ResearchPage(RecipeRegistry.featherWings)); - if (!ConfigHandler.thaumiumChainsawResearch) { - new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(ItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumChainsaw)); - } + /** Research that can be disabled **/ + if (!ConfigHandler.thaumiumDrillResearch) { + new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(ItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumDrill)); + } - if (!ConfigHandler.electricGooglesResearch) { - new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(ItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricGoggles)); - } + if (!ConfigHandler.thaumiumChainsawResearch) { + new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(ItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumChainsaw)); + } - if (!ConfigHandler.electricGooglesResearch) { - if (!ConfigHandler.nanoGooglesResearch) {; - new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(ItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumicNanoHelmet)); - } - } + if (!ConfigHandler.electricGooglesResearch) { + new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(ItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricGoggles)); + } - if (!ConfigHandler.electricGooglesResearch) { - if (!ConfigHandler.nanoGooglesResearch) { - if (!ConfigHandler.quantumGooglesResearch) { - new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(ItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumicQuantumHelmet)); - } - } - } + if (!ConfigHandler.electricGooglesResearch) { + if (!ConfigHandler.nanoGooglesResearch) { + ; + new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(ItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumicNanoHelmet)); + } + } - if (!ConfigHandler.ironOmnitoolResearch) { - new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(ItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.ironOmnitool)); - } + if (!ConfigHandler.electricGooglesResearch) { + if (!ConfigHandler.nanoGooglesResearch) { + if (!ConfigHandler.quantumGooglesResearch) { + new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(ItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumicQuantumHelmet)); + } + } + } - if (!ConfigHandler.ironOmnitoolResearch) { - if (!ConfigHandler.diamondOmnitoolResearch) { - new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(ItemRegistry.diamondOmnitool)).setSecondary().setParents("Iron Omnitool").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.diamondOmnitool), new ResearchPage(RecipeRegistry.ironOmnitoolToDiamond)); - } - } + if (!ConfigHandler.ironOmnitoolResearch) { + new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(ItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.ironOmnitool)); + } - if (!ConfigHandler.thaumiumDrillResearch && !ConfigHandler.thaumiumChainsawResearch) { - if (!ConfigHandler.thaumiumOmnitoolResearch) { - new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(ItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumOmnitool), new ResearchPage(RecipeRegistry.diamondOmnitoolToThaumium)); - } - } + if (!ConfigHandler.ironOmnitoolResearch) { + if (!ConfigHandler.diamondOmnitoolResearch) { + new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(ItemRegistry.diamondOmnitool)).setSecondary().setParents("Iron Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.diamondOmnitool), new ResearchPage(RecipeRegistry.ironOmnitoolToDiamond)); + } + } - if (!ConfigHandler.explosionFocusResearch) { - new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(ItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.explosionFocus)); - } + if (!ConfigHandler.thaumiumDrillResearch && !ConfigHandler.thaumiumChainsawResearch) { + if (!ConfigHandler.thaumiumOmnitoolResearch) { + new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(ItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumOmnitool), + new ResearchPage(RecipeRegistry.diamondOmnitoolToThaumium)); + } + } - if (!ConfigHandler.christmasFocusResearch) { - new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(ItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.christmasFocus)); - } + if (!ConfigHandler.explosionFocusResearch) { + new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(ItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.explosionFocus)); + } - if (!ConfigHandler.shieldFocusResearch) { - new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(ItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.shieldFocus)); - } + if (!ConfigHandler.christmasFocusResearch) { + new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(ItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.christmasFocus)); + } - if (!ConfigHandler.shieldFocusResearch) { - if (!ConfigHandler.shieldBlockResearch) { - new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(BlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.shieldBlock)); - } - } + if (!ConfigHandler.shieldFocusResearch) { + new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(ItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.shieldFocus)); + } - if (!ConfigHandler.potentiaGeneratorResearch) { - new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(BlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.potentiaGenerator)); - } + if (!ConfigHandler.shieldFocusResearch) { + if (!ConfigHandler.shieldBlockResearch) { + new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(BlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.shieldBlock)); + } + } - if (!ConfigHandler.potentiaGeneratorResearch) { - if (!ConfigHandler.ignisGeneratorResearch) { - new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.ignisGenerator)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(BlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.potentiaGenerator)); + } - if (!ConfigHandler.potentiaGeneratorResearch) { - if (!ConfigHandler.auramGeneratorResearch) { - new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.auramGenerator)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + if (!ConfigHandler.ignisGeneratorResearch) { + new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.ignisGenerator)); + } + } - if (!ConfigHandler.potentiaGeneratorResearch) { - if (!ConfigHandler.arborGeneratorResearch) { - new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.arborGenerator)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + if (!ConfigHandler.auramGeneratorResearch) { + new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.auramGenerator)); + } + } - if (!ConfigHandler.potentiaGeneratorResearch) { - if (!ConfigHandler.aerGeneratorResearch) { - new EMTResearchItem("Aer Generator", "EMT", ResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.aerGenerator)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + if (!ConfigHandler.arborGeneratorResearch) { + new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.arborGenerator)); + } + } - if (!ConfigHandler.potentiaGeneratorResearch) { - if (!ConfigHandler.wandChargingSationResearch) { - new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(BlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.wandRecharger)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + if (!ConfigHandler.aerGeneratorResearch) { + new EMTResearchItem("Aer Generator", "EMT", ResearchAspects.aerGenerator, -2, 6, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 4)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.aerGenerator)); + } + } - if (!ConfigHandler.thaumiumChainsawResearch) { - if (!ConfigHandler.streamChainsawResearch) { - new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(ItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.streamChainsaw)); - } - } + if (!ConfigHandler.potentiaGeneratorResearch) { + if (!ConfigHandler.wandChargingSationResearch) { + new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(BlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.wandRecharger)); + } + } - if (!ConfigHandler.thaumiumDrillResearch) { - if (!ConfigHandler.rockbreakerDrillResearch) { - new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(ItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.rockbreakerDrill)); - } - } + if (!ConfigHandler.thaumiumChainsawResearch) { + if (!ConfigHandler.streamChainsawResearch) { + new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(ItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.streamChainsaw)); + } + } - if (!ConfigHandler.tinyUraniumResearch) { - new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.tinyUranium)); - } + if (!ConfigHandler.thaumiumDrillResearch) { + if (!ConfigHandler.rockbreakerDrillResearch) { + new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(ItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.rockbreakerDrill)); + } + } - if (!ConfigHandler.thorHammerResearch) { - new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(ItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thorHammer)); - } + if (!ConfigHandler.tinyUraniumResearch) { + new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.tinyUranium)); + } - if (!ConfigHandler.thorHammerResearch) { - if (!ConfigHandler.superchargedThorHammerResearch) { - new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(ItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.superchargedThorHammer)); - } - } + if (!ConfigHandler.thorHammerResearch) { + new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(ItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thorHammer)); + } - if (!ConfigHandler.compressedSolarsResearch) { - new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(BlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.compressedSolar), new ResearchPage(RecipeRegistry.doubleCompressedSolar), new ResearchPage(RecipeRegistry.tripleCompressedSolar)); - } + if (!ConfigHandler.thorHammerResearch) { + if (!ConfigHandler.superchargedThorHammerResearch) { + new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(ItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.superchargedThorHammer)); + } + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.solarHelmetResearch) { - new EMTResearchItem("Solar Helmet of Revealing", "EMT", ResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(ItemRegistry.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.solarHelmetRevealing)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(BlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.compressedSolar), new ResearchPage(RecipeRegistry.doubleCompressedSolar), + new ResearchPage(RecipeRegistry.tripleCompressedSolar)); + } - if (!ConfigHandler.electricBootsResearch) { - new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(ItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricBootsTravel)); - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.solarHelmetResearch) { + new EMTResearchItem("Solar Helmet of Revealing", "EMT", ResearchAspects.solarHelmetRevealing, -2, -5, 1, new ItemStack(ItemRegistry.solarHelmetRevealing)).setSecondary().setParents("Compressed Solars").setParentsHidden("Quantum Goggles of Revealing").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.solarHelmetRevealing)); + } + } - if (!ConfigHandler.electricBootsResearch) { - if (!ConfigHandler.nanoBootsResearch) { - new EMTResearchItem("Nano Boots of the Traveller", "EMT", ResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(ItemRegistry.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.nanoBootsTravel)); - } - } + if (!ConfigHandler.electricBootsResearch) { + new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(ItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricBootsTravel)); + } - if (!ConfigHandler.electricBootsResearch) { - if (!ConfigHandler.nanoBootsResearch) { - if (!ConfigHandler.quantumBootsResearch) { - new EMTResearchItem("Quantum Boots of the Traveller", "EMT", ResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(ItemRegistry.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.quantumBootsTravel)); - } - } - } + if (!ConfigHandler.electricBootsResearch) { + if (!ConfigHandler.nanoBootsResearch) { + new EMTResearchItem("Nano Boots of the Traveller", "EMT", ResearchAspects.nanoBootsTravel, 4, 0, 2, new ItemStack(ItemRegistry.nanoBootsTraveller)).setParents("Electric Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.nanoBootsTravel)); + } + } - if (!ConfigHandler.electricScribingToolsResearch) { - new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(ItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricScribingTools)); - } + if (!ConfigHandler.electricBootsResearch) { + if (!ConfigHandler.nanoBootsResearch) { + if (!ConfigHandler.quantumBootsResearch) { + new EMTResearchItem("Quantum Boots of the Traveller", "EMT", ResearchAspects.quantumBootsTravel, 6, 0, 3, new ItemStack(ItemRegistry.quantumBootsTraveller)).setParents("Nano Boots of the Traveller").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.quantumBootsTravel)); + } + } + } - if (!ConfigHandler.etherealProcessorResearch) { - new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(BlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.etheralProcessor)); - } + if (!ConfigHandler.electricScribingToolsResearch) { + new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(ItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricScribingTools)); + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.waterSolarsResearch) { - new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.waterSolar), new ResearchPage(RecipeRegistry.doubleWaterSolar), new ResearchPage(RecipeRegistry.tripleWaterSolar)); - } - } + if (!ConfigHandler.etherealProcessorResearch) { + new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(BlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.etheralProcessor)); + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.darkSolarsResearch) { - new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.darkSolar), new ResearchPage(RecipeRegistry.doubleDarkSolar), new ResearchPage(RecipeRegistry.tripleDarkSolar)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.waterSolarsResearch) { + new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.waterSolar), new ResearchPage(RecipeRegistry.doubleWaterSolar), + new ResearchPage(RecipeRegistry.tripleWaterSolar)); + } + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.orderSolarsResearch) { - new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(BlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.orderSolar), new ResearchPage(RecipeRegistry.doubleOrderSolar), new ResearchPage(RecipeRegistry.tripleOrderSolar)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.darkSolarsResearch) { + new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.darkSolar), new ResearchPage(RecipeRegistry.doubleDarkSolar), + new ResearchPage(RecipeRegistry.tripleDarkSolar)); + } + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.fireSolarsResearch) { - new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.fireSolar), new ResearchPage(RecipeRegistry.doubleFireSolar), new ResearchPage(RecipeRegistry.tripleFireSolar)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.orderSolarsResearch) { + new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(BlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.orderSolar), new ResearchPage(RecipeRegistry.doubleOrderSolar), + new ResearchPage(RecipeRegistry.tripleOrderSolar)); + } + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.airSolarsResearch) { - new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.airSolar), new ResearchPage(RecipeRegistry.doubleAirSolar), new ResearchPage(RecipeRegistry.tripleAirSolar)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.fireSolarsResearch) { + new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.fireSolar), new ResearchPage(RecipeRegistry.doubleFireSolar), + new ResearchPage(RecipeRegistry.tripleFireSolar)); + } + } - if (!ConfigHandler.compressedSolarsResearch) { - if (!ConfigHandler.earthSolarsResearch) { - new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(BlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.earthSolar), new ResearchPage(RecipeRegistry.doubleEarthSolar), new ResearchPage(RecipeRegistry.tripleEarthSolar)); - } - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.airSolarsResearch) { + new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.airSolar), new ResearchPage(RecipeRegistry.doubleAirSolar), new ResearchPage(RecipeRegistry.tripleAirSolar)); + } + } - if (!ConfigHandler.uuMInfusionResearch) { - new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(ItemRegistry.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.uuMCrystal), new ResearchPage(RecipeRegistry.charcoalToCoal), new ResearchPage(RecipeRegistry.glowstoneDustToBlock), new ResearchPage(RecipeRegistry.stoneBricksToIronOre), new ResearchPage(RecipeRegistry.arcaneStoneToCopperOre), new ResearchPage(RecipeRegistry.arcaneStoneBricksToTinOre), new ResearchPage(RecipeRegistry.amberBlockToLeadOre), new ResearchPage(RecipeRegistry.amberBricksToUraniumOre), new ResearchPage(RecipeRegistry.shardToResin), new ResearchPage(RecipeRegistry.shardToRedstone), new ResearchPage(RecipeRegistry.shardToLapis), new ResearchPage(RecipeRegistry.ironToGold), new ResearchPage(RecipeRegistry.goldToDiamond), new ResearchPage(RecipeRegistry.diamondToUranium), new ResearchPage(RecipeRegistry.uraniumToIridium)); - } + if (!ConfigHandler.compressedSolarsResearch) { + if (!ConfigHandler.earthSolarsResearch) { + new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(BlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.earthSolar), new ResearchPage(RecipeRegistry.doubleEarthSolar), + new ResearchPage(RecipeRegistry.tripleEarthSolar)); + } + } - if (!ConfigHandler.portableNodeResarch) { - new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(BlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.portableNode)); - } + if (!ConfigHandler.uuMInfusionResearch) { + new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(ItemRegistry.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.uuMCrystal), new ResearchPage(RecipeRegistry.charcoalToCoal), + new ResearchPage(RecipeRegistry.glowstoneDustToBlock), new ResearchPage(RecipeRegistry.stoneBricksToIronOre), new ResearchPage(RecipeRegistry.arcaneStoneToCopperOre), new ResearchPage(RecipeRegistry.arcaneStoneBricksToTinOre), new ResearchPage(RecipeRegistry.amberBlockToLeadOre), new ResearchPage(RecipeRegistry.amberBricksToUraniumOre), + new ResearchPage(RecipeRegistry.shardToResin), new ResearchPage(RecipeRegistry.shardToRedstone), new ResearchPage(RecipeRegistry.shardToLapis), new ResearchPage(RecipeRegistry.ironToGold), new ResearchPage(RecipeRegistry.goldToDiamond), new ResearchPage(RecipeRegistry.diamondToUranium), new ResearchPage(RecipeRegistry.uraniumToIridium)); + } - if (!ConfigHandler.electricHoeGrowthResearch) { - new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(ItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricHoeGrowth)); - } + if (!ConfigHandler.portableNodeResarch) { + new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(BlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.portableNode)); + } - if (!ConfigHandler.chargeFocusResearch) { - new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(ItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.chargeFocus)); - } + if (!ConfigHandler.electricHoeGrowthResearch) { + new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(ItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.electricHoeGrowth)); + } - if (!ConfigHandler.wandChargeFocusResearch) { - new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(ItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.wandChargeFocus)); - } + if (!ConfigHandler.chargeFocusResearch) { + new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(ItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.chargeFocus)); + } - if (!ConfigHandler.inventoryChargingRing) { - new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(ItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.inventoryChargingRing)); - } + if (!ConfigHandler.wandChargeFocusResearch) { + new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(ItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.wandChargeFocus)); + } - if (!ConfigHandler.armorChargingRing) { - new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(ItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.armorChargingRing)); - } + if (!ConfigHandler.inventoryChargingRing) { + new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(ItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.inventoryChargingRing)); + } - if (!ConfigHandler.thaumiumWingResearch) { - new EMTResearchItem("Thaumium Reinforced Wings", "EMT", ResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(ItemRegistry.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumWing), new ResearchPage(RecipeRegistry.thaumiumWings)); - } + if (!ConfigHandler.armorChargingRing) { + new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(ItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.armorChargingRing)); + } - if (!ConfigHandler.nanoWingResearch && !ConfigHandler.thaumiumWingResearch) { - new EMTResearchItem("Nanosuit Wings", "EMT", ResearchAspects.nanoWing, 0, 6, 2, new ItemStack(ItemRegistry.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.nanoWings)); - } + if (!ConfigHandler.thaumiumWingResearch) { + new EMTResearchItem("Thaumium Reinforced Wings", "EMT", ResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(ItemRegistry.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.thaumiumWing), new ResearchPage(RecipeRegistry.thaumiumWings)); + } - if (!ConfigHandler.quantumWingsResearch && !ConfigHandler.thaumiumWingResearch && !ConfigHandler.nanoWingResearch) { - new EMTResearchItem("Quantum Wings", "EMT", ResearchAspects.quantumWing, 0, 8, 3, new ItemStack(ItemRegistry.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.quantumWings)); - } - - if(!ConfigHandler.infusedQuantumChestplate && !ConfigHandler.thaumiumWingResearch && !ConfigHandler.nanoWingResearch && !ConfigHandler.quantumWingsResearch){ - new EMTResearchItem("Infused Quantum Armor", "EMT", ResearchAspects.quantumWing, 0, 10, 4, new ItemStack(ItemRegistry.quantumArmor)).setParents("Quantum Wings").setConcealed().registerResearchItem() - .setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.infusedQuantumArmor)); - } - } + if (!ConfigHandler.nanoWingResearch && !ConfigHandler.thaumiumWingResearch) { + new EMTResearchItem("Nanosuit Wings", "EMT", ResearchAspects.nanoWing, 0, 6, 2, new ItemStack(ItemRegistry.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.nanoWings)); + } + + if (!ConfigHandler.quantumWingsResearch && !ConfigHandler.thaumiumWingResearch && !ConfigHandler.nanoWingResearch) { + new EMTResearchItem("Quantum Wings", "EMT", ResearchAspects.quantumWing, 0, 8, 3, new ItemStack(ItemRegistry.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.quantumWings)); + } + + if (!ConfigHandler.infusedQuantumChestplate && !ConfigHandler.thaumiumWingResearch && !ConfigHandler.nanoWingResearch && !ConfigHandler.quantumWingsResearch) { + new EMTResearchItem("Infused Quantum Armor", "EMT", ResearchAspects.quantumWing, 0, 10, 4, new ItemStack(ItemRegistry.quantumArmor)).setParents("Quantum Wings").setConcealed().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage(RecipeRegistry.infusedQuantumArmor)); + } + } } diff --git a/src/main/java/tombenpotter/emt/common/util/EMTResearchItem.java b/src/main/java/tombenpotter/emt/common/util/EMTResearchItem.java index 96e231c..3cd78a6 100644 --- a/src/main/java/tombenpotter/emt/common/util/EMTResearchItem.java +++ b/src/main/java/tombenpotter/emt/common/util/EMTResearchItem.java @@ -11,49 +11,49 @@ import thaumcraft.api.research.ResearchPage.PageType; public class EMTResearchItem extends ResearchItem { - public EMTResearchItem(String par1, String par2) { - super(par1, par2); - } + public EMTResearchItem(String par1, String par2) { + super(par1, par2); + } - public EMTResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ItemStack icon) { - super(par1, par2, tags, par3, par4, par5, icon); - } + public EMTResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ItemStack icon) { + super(par1, par2, tags, par3, par4, par5, icon); + } - public EMTResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ResourceLocation icon) { - super(par1, par2, tags, par3, par4, par5, icon); - } + public EMTResearchItem(String par1, String par2, AspectList tags, int par3, int par4, int par5, ResourceLocation icon) { + super(par1, par2, tags, par3, par4, par5, icon); + } - @Override - @SideOnly(Side.CLIENT) - public String getName() { - return TextHelper.localize("emt.rsname." + key); - } + @Override + @SideOnly(Side.CLIENT) + public String getName() { + return TextHelper.localize("emt.rsname." + key); + } - @Override - @SideOnly(Side.CLIENT) - public String getText() { - return "[EMT] " + TextHelper.localize("emt.tag." + key); - } + @Override + @SideOnly(Side.CLIENT) + public String getText() { + return "[EMT] " + TextHelper.localize("emt.tag." + key); + } - @Override - public ResearchItem setPages(ResearchPage... rp) { - for (ResearchPage page : rp) { - if (page.type == PageType.TEXT) - page.text = "emt.text." + key; + @Override + public ResearchItem setPages(ResearchPage... rp) { + for (ResearchPage page : rp) { + if (page.type == PageType.TEXT) + page.text = "emt.text." + key; - if (page.type == PageType.INFUSION_CRAFTING) { - if (parentsHidden == null || parentsHidden.length == 0) - parentsHidden = new String[]{"INFUSION"}; - else { - String[] newParents = new String[parentsHidden.length + 1]; - newParents[0] = "INFUSION"; - for (int i = 0; i < parentsHidden.length; i++) - newParents[i + 1] = parentsHidden[i]; - parentsHidden = newParents; - } - } - } + if (page.type == PageType.INFUSION_CRAFTING) { + if (parentsHidden == null || parentsHidden.length == 0) + parentsHidden = new String[] { "INFUSION" }; + else { + String[] newParents = new String[parentsHidden.length + 1]; + newParents[0] = "INFUSION"; + for (int i = 0; i < parentsHidden.length; i++) + newParents[i + 1] = parentsHidden[i]; + parentsHidden = newParents; + } + } + } - return super.setPages(rp); - } + return super.setPages(rp); + } } diff --git a/src/main/java/tombenpotter/emt/common/util/EssentiasOutputs.java b/src/main/java/tombenpotter/emt/common/util/EssentiasOutputs.java index 40224a3..f916dd1 100644 --- a/src/main/java/tombenpotter/emt/common/util/EssentiasOutputs.java +++ b/src/main/java/tombenpotter/emt/common/util/EssentiasOutputs.java @@ -7,35 +7,36 @@ import java.util.HashMap; public class EssentiasOutputs { - public static HashMap outputs = new HashMap(); + public static HashMap outputs = new HashMap(); - public static void addOutput(Aspect aspect) { - if (!aspect.isPrimal()) { - Aspect[] parents = aspect.getComponents(); - if (ConfigHandler.outputCap == (-1)) { - outputs.put(aspect.getTag(), (outputs.get(parents[0].getTag()) + outputs.get(parents[1].getTag()))); - } else { - double originalOutput = (outputs.get(parents[0].getTag()) + outputs.get(parents[1].getTag())); - if (originalOutput > ConfigHandler.outputCap) - outputs.put(aspect.getTag(), ConfigHandler.outputCap); - } - } - } + public static void addOutput(Aspect aspect) { + if (!aspect.isPrimal()) { + Aspect[] parents = aspect.getComponents(); + if (ConfigHandler.outputCap == (-1)) { + outputs.put(aspect.getTag(), (outputs.get(parents[0].getTag()) + outputs.get(parents[1].getTag()))); + } + else { + double originalOutput = (outputs.get(parents[0].getTag()) + outputs.get(parents[1].getTag())); + if (originalOutput > ConfigHandler.outputCap) + outputs.put(aspect.getTag(), ConfigHandler.outputCap); + } + } + } - public static void addOutputs() { - Collection aspectCollection = Aspect.aspects.values(); - for (Aspect aspect : aspectCollection) { - if (!aspect.isPrimal()) - addOutput(aspect); - } - } + public static void addOutputs() { + Collection aspectCollection = Aspect.aspects.values(); + for (Aspect aspect : aspectCollection) { + if (!aspect.isPrimal()) + addOutput(aspect); + } + } - public static void addPrimalOutputs() { - outputs.put(Aspect.FIRE.getTag(), ConfigHandler.fireOutput); - outputs.put(Aspect.WATER.getTag(), ConfigHandler.waterOutput); - outputs.put(Aspect.ORDER.getTag(), ConfigHandler.orderOutput); - outputs.put(Aspect.ENTROPY.getTag(), ConfigHandler.entropyOutput); - outputs.put(Aspect.EARTH.getTag(), ConfigHandler.earthOutput); - outputs.put(Aspect.AIR.getTag(), ConfigHandler.airOutput); - } + public static void addPrimalOutputs() { + outputs.put(Aspect.FIRE.getTag(), ConfigHandler.fireOutput); + outputs.put(Aspect.WATER.getTag(), ConfigHandler.waterOutput); + outputs.put(Aspect.ORDER.getTag(), ConfigHandler.orderOutput); + outputs.put(Aspect.ENTROPY.getTag(), ConfigHandler.entropyOutput); + outputs.put(Aspect.EARTH.getTag(), ConfigHandler.earthOutput); + outputs.put(Aspect.AIR.getTag(), ConfigHandler.airOutput); + } } diff --git a/src/main/java/tombenpotter/emt/common/util/EventHandlerEMT.java b/src/main/java/tombenpotter/emt/common/util/EventHandlerEMT.java deleted file mode 100644 index 759045f..0000000 --- a/src/main/java/tombenpotter/emt/common/util/EventHandlerEMT.java +++ /dev/null @@ -1,53 +0,0 @@ -package tombenpotter.emt.common.util; - -import java.util.Random; - -import cpw.mods.fml.client.event.ConfigChangedEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; -import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; -import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import thaumcraft.common.entities.monster.EntityTaintChicken; -import tombenpotter.emt.ElectroMagicTools; -import tombenpotter.emt.ModInformation; -import tombenpotter.emt.client.EMTKeys; -import tombenpotter.emt.common.init.ItemRegistry; -import tombenpotter.emt.common.network.PacketEMTKeys; -import tombenpotter.emt.proxies.ClientProxy; - -public class EventHandlerEMT { - Random rnd = new Random(); - - @SubscribeEvent - public void onEntityLivingDrops(LivingDropsEvent event) { - if (event.entityLiving instanceof EntityCreeper) { - EntityCreeper creeper = (EntityCreeper) event.entityLiving; - if (creeper.getPowered()) { - event.entityLiving.entityDropItem(new ItemStack(ItemRegistry.itemEMTItems, 1, 6), 1); - } - } - if (event.entityLiving instanceof EntityTaintChicken) { - event.entityLiving.entityDropItem(new ItemStack(ItemRegistry.itemEMTItems, rnd.nextInt(3), 13), 1); - } - } - - @SubscribeEvent - public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.modID.equals(ModInformation.modid)) { - ConfigHandler.syncConfig(); - ElectroMagicTools.logger.info("Refreshing configuration file."); - } - } - - @SubscribeEvent - public void clientTick(ClientTickEvent e) { - if(EMTKeys.keyUnequipPressed()){ - ElectroMagicTools.INSTANCE.sendToServer(new PacketEMTKeys()); - } - } -} diff --git a/src/main/java/tombenpotter/emt/common/util/IRefillable.java b/src/main/java/tombenpotter/emt/common/util/IRefillable.java deleted file mode 100644 index 2bd088e..0000000 --- a/src/main/java/tombenpotter/emt/common/util/IRefillable.java +++ /dev/null @@ -1,4 +0,0 @@ -package tombenpotter.emt.common.util; - -public interface IRefillable { -} diff --git a/src/main/java/tombenpotter/emt/common/util/RandomHelper.java b/src/main/java/tombenpotter/emt/common/util/RandomHelper.java index 4ee6e5e..22d5f1a 100644 --- a/src/main/java/tombenpotter/emt/common/util/RandomHelper.java +++ b/src/main/java/tombenpotter/emt/common/util/RandomHelper.java @@ -16,39 +16,43 @@ import java.util.Locale; public class RandomHelper { - public static boolean isRKMPressed(World world){ - if(FMLCommonHandler.instance().getSide().isClient()){ + public static boolean isRKMPressed(World world) { + if (FMLCommonHandler.instance().getSide().isClient()) { return Minecraft.getMinecraft().gameSettings.keyBindUseItem.getIsKeyPressed(); } - - - else return true; + + else + return true; } - - public static boolean placeTorch(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - for (int i = 0; i < player.inventory.mainInventory.length; i++) { - ItemStack torchStack = player.inventory.mainInventory[i]; - if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) continue; - Item item = torchStack.getItem(); - if (!(item instanceof ItemBlock)) continue; - int oldMeta = torchStack.getItemDamage(); - int oldSize = torchStack.stackSize; - boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); - if (player.capabilities.isCreativeMode) { - torchStack.setItemDamage(oldMeta); - torchStack.stackSize = oldSize; - } else if (torchStack.stackSize <= 0) { - ForgeEventFactory.onPlayerDestroyItem(player, torchStack); - player.inventory.mainInventory[i] = null; - } - if (result) return true; - } - return false; - } - - public static ItemStack getChargedItem(Item item, int charge){ - ItemStack stack = new ItemStack(item); + + public static boolean placeTorch(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + for (int i = 0; i < player.inventory.mainInventory.length; i++) { + ItemStack torchStack = player.inventory.mainInventory[i]; + if (torchStack == null || !torchStack.getUnlocalizedName().toLowerCase(Locale.US).contains("torch")) + continue; + Item item = torchStack.getItem(); + if (!(item instanceof ItemBlock)) + continue; + int oldMeta = torchStack.getItemDamage(); + int oldSize = torchStack.stackSize; + boolean result = torchStack.tryPlaceItemIntoWorld(player, world, x, y, z, side, xOffset, yOffset, zOffset); + if (player.capabilities.isCreativeMode) { + torchStack.setItemDamage(oldMeta); + torchStack.stackSize = oldSize; + } + else if (torchStack.stackSize <= 0) { + ForgeEventFactory.onPlayerDestroyItem(player, torchStack); + player.inventory.mainInventory[i] = null; + } + if (result) + return true; + } + return false; + } + + public static ItemStack getChargedItem(Item item, int charge) { + ItemStack stack = new ItemStack(item); ElectricItem.manager.charge(stack, charge, charge, true, false); return stack; - } + } } diff --git a/src/main/java/tombenpotter/emt/common/util/RegistryHandler.java b/src/main/java/tombenpotter/emt/common/util/RegistryHandler.java deleted file mode 100644 index 968cb0f..0000000 --- a/src/main/java/tombenpotter/emt/common/util/RegistryHandler.java +++ /dev/null @@ -1,9 +0,0 @@ -package tombenpotter.emt.common.util; - -public class RegistryHandler { - - public static void registerIc2PostRegistrys() { - EMTResearch.addResearchTab(); - EMTResearch.addResearch(); - } -} diff --git a/src/main/java/tombenpotter/emt/common/util/ResearchAspects.java b/src/main/java/tombenpotter/emt/common/util/ResearchAspects.java index c531bbd..2f95ec8 100644 --- a/src/main/java/tombenpotter/emt/common/util/ResearchAspects.java +++ b/src/main/java/tombenpotter/emt/common/util/ResearchAspects.java @@ -5,49 +5,49 @@ import thaumcraft.api.aspects.AspectList; public class ResearchAspects { - public static AspectList thaumiumDrillResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4); - public static AspectList thaumiumChainsawResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.WEAPON, 6).add(Aspect.TOOL, 4); - public static AspectList thaumicQuantumHelmet = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 4).add(Aspect.SENSES, 6); - public static AspectList diamondOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.TOOL, 3).add(Aspect.MINE, 2).add(Aspect.WEAPON, 2); - public static AspectList thaumiumOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4).add(Aspect.WEAPON, 6); - public static AspectList thaumicNanoHelmet = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.SENSES, 8).add(Aspect.ARMOR, 6); - public static AspectList laserFocusResearch = new AspectList().add(Aspect.FIRE, 3).add(Aspect.DEATH, 2).add(Aspect.WEAPON, 3); - public static AspectList christmasFocusResearch = new AspectList().add(Aspect.COLD, 2).add(Aspect.BEAST, 5).add(Aspect.LIFE, 6); - public static AspectList shieldFocusResearch = new AspectList().add(Aspect.ARMOR, 5).add(Aspect.AIR, 2).add(Aspect.CRYSTAL, 3).add(Aspect.TRAP, 2); - public static AspectList electricGogglesResearch = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 5).add(Aspect.SENSES, 6); - public static AspectList potentiaGeneratorResearch = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.EXCHANGE, 4).add(Aspect.METAL, 3); - public static AspectList ignisGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.FIRE, 3); - public static AspectList auramGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AURA, 3); - public static AspectList arborGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.TREE, 3); - public static AspectList streamChainsawResearch = new AspectList().add(Aspect.TOOL, 3).add(Aspect.TREE, 3).add(Aspect.WATER, 6).add(Aspect.ENERGY, 4); - public static AspectList rockbreakerDrillResearch = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.FIRE, 2).add(Aspect.MINE, 3); - public static AspectList shieldBlockResearch = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.TRAP, 2); - public static AspectList tinyUraniumResearch = new AspectList().add(Aspect.POISON, 4).add(Aspect.DEATH, 3).add(Aspect.EXCHANGE, 3); - public static AspectList thorHammerResearch = new AspectList().add(Aspect.WEAPON, 3).add(Aspect.WEATHER, 4).add(Aspect.ELDRITCH, 3); - public static AspectList superchargedThorHammerResearch = new AspectList().add(Aspect.WEAPON, 4).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4); - public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRAFT, 2).add(Aspect.EXCHANGE, 3).add(Aspect.GREED, 5); - public static AspectList compressedSolars = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.LIGHT, 3).add(Aspect.METAL, 2); - public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AIR, 2).add(Aspect.LIGHT, 4); - public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 2); - public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 3); - public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 4); - public static AspectList electricScribingTools = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.DARKNESS, 3).add(Aspect.CRAFT, 1); - public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 3).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); - public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList airSolars = new AspectList().add(Aspect.AIR, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); - public static AspectList uuMInfusion = new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); - public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 5).add(Aspect.AURA, 5).add(Aspect.GREED, 5); - public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.PLANT, 4).add(Aspect.CROP, 5).add(Aspect.MAGIC, 4); - public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 4); - public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AURA, 4).add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 5); - public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRYSTAL, 4).add(Aspect.MAGIC, 4); - public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 4).add(Aspect.MAGIC, 4); - public static AspectList thaumiumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8); - public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); - public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); - public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3); + public static AspectList thaumiumDrillResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4); + public static AspectList thaumiumChainsawResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.WEAPON, 6).add(Aspect.TOOL, 4); + public static AspectList thaumicQuantumHelmet = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 4).add(Aspect.SENSES, 6); + public static AspectList diamondOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.TOOL, 3).add(Aspect.MINE, 2).add(Aspect.WEAPON, 2); + public static AspectList thaumiumOmnitoolResearch = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.TOOL, 6).add(Aspect.MINE, 4).add(Aspect.WEAPON, 6); + public static AspectList thaumicNanoHelmet = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.SENSES, 8).add(Aspect.ARMOR, 6); + public static AspectList laserFocusResearch = new AspectList().add(Aspect.FIRE, 3).add(Aspect.DEATH, 2).add(Aspect.WEAPON, 3); + public static AspectList christmasFocusResearch = new AspectList().add(Aspect.COLD, 2).add(Aspect.BEAST, 5).add(Aspect.LIFE, 6); + public static AspectList shieldFocusResearch = new AspectList().add(Aspect.ARMOR, 5).add(Aspect.AIR, 2).add(Aspect.CRYSTAL, 3).add(Aspect.TRAP, 2); + public static AspectList electricGogglesResearch = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 5).add(Aspect.SENSES, 6); + public static AspectList potentiaGeneratorResearch = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.EXCHANGE, 4).add(Aspect.METAL, 3); + public static AspectList ignisGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.FIRE, 3); + public static AspectList auramGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AURA, 3); + public static AspectList arborGeneratorResearch = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.TREE, 3); + public static AspectList streamChainsawResearch = new AspectList().add(Aspect.TOOL, 3).add(Aspect.TREE, 3).add(Aspect.WATER, 6).add(Aspect.ENERGY, 4); + public static AspectList rockbreakerDrillResearch = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.FIRE, 2).add(Aspect.MINE, 3); + public static AspectList shieldBlockResearch = new AspectList().add(Aspect.ARMOR, 3).add(Aspect.TRAP, 2); + public static AspectList tinyUraniumResearch = new AspectList().add(Aspect.POISON, 4).add(Aspect.DEATH, 3).add(Aspect.EXCHANGE, 3); + public static AspectList thorHammerResearch = new AspectList().add(Aspect.WEAPON, 3).add(Aspect.WEATHER, 4).add(Aspect.ELDRITCH, 3); + public static AspectList superchargedThorHammerResearch = new AspectList().add(Aspect.WEAPON, 4).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4); + public static AspectList wandCharger = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRAFT, 2).add(Aspect.EXCHANGE, 3).add(Aspect.GREED, 5); + public static AspectList compressedSolars = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.LIGHT, 3).add(Aspect.METAL, 2); + public static AspectList solarHelmetRevealing = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AIR, 2).add(Aspect.LIGHT, 4); + public static AspectList electricBootsTravel = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 2); + public static AspectList nanoBootsTravel = new AspectList().add(Aspect.ENERGY, 3).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 3); + public static AspectList quantumBootsTravel = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 5).add(Aspect.MOTION, 4); + public static AspectList electricScribingTools = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.DARKNESS, 3).add(Aspect.CRAFT, 1); + public static AspectList etherealProcessor = new AspectList().add(Aspect.MECHANISM, 3).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); + public static AspectList waterSolars = new AspectList().add(Aspect.WATER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList darkSolars = new AspectList().add(Aspect.ENTROPY, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList orderSolars = new AspectList().add(Aspect.ORDER, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList fireSolars = new AspectList().add(Aspect.FIRE, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList airSolars = new AspectList().add(Aspect.AIR, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList earthSolars = new AspectList().add(Aspect.EARTH, 4).add(Aspect.MAGIC, 3).add(Aspect.ENERGY, 4); + public static AspectList uuMInfusion = new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 5); + public static AspectList portableNode = new AspectList().add(Aspect.MAGIC, 5).add(Aspect.AURA, 5).add(Aspect.GREED, 5); + public static AspectList electricHoeGrowth = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.PLANT, 4).add(Aspect.CROP, 5).add(Aspect.MAGIC, 4); + public static AspectList chargeFocus = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.ENERGY, 5).add(Aspect.MECHANISM, 4); + public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 5).add(Aspect.AURA, 4).add(Aspect.EXCHANGE, 4).add(Aspect.GREED, 5); + public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.CRYSTAL, 4).add(Aspect.MAGIC, 4); + public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.ARMOR, 4).add(Aspect.MAGIC, 4); + public static AspectList thaumiumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8); + public static AspectList nanoWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); + public static AspectList quantumWing = new AspectList().add(Aspect.FLIGHT, 5).add(Aspect.AIR, 5).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 4); + public static AspectList aerGenerator = new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.AIR, 3); } diff --git a/src/main/java/tombenpotter/emt/common/util/TextHelper.java b/src/main/java/tombenpotter/emt/common/util/TextHelper.java index 0aa3106..c0a3c7e 100644 --- a/src/main/java/tombenpotter/emt/common/util/TextHelper.java +++ b/src/main/java/tombenpotter/emt/common/util/TextHelper.java @@ -4,40 +4,40 @@ import net.minecraft.util.StatCollector; public class TextHelper { - /** - * Color Coding * - */ - public static final String BLACK = (char) 167 + "0"; - public static final String BLUE = (char) 167 + "1"; - public static final String GREEN = (char) 167 + "2"; - public static final String TEAL = (char) 167 + "3"; - public static final String RED = (char) 167 + "4"; - public static final String PURPLE = (char) 167 + "5"; - public static final String ORANGE = (char) 167 + "6"; - public static final String LIGHT_GRAY = (char) 167 + "7"; - public static final String GRAY = (char) 167 + "8"; - public static final String LIGHT_BLUE = (char) 167 + "9"; - public static final String BRIGHT_GREEN = (char) 167 + "a"; - public static final String BRIGHT_BLUE = (char) 167 + "b"; - public static final String LIGHT_RED = (char) 167 + "c"; - public static final String PINK = (char) 167 + "d"; - public static final String YELLOW = (char) 167 + "e"; - public static final String WHITE = (char) 167 + "f"; + /** + * Color Coding * + */ + public static final String BLACK = (char) 167 + "0"; + public static final String BLUE = (char) 167 + "1"; + public static final String GREEN = (char) 167 + "2"; + public static final String TEAL = (char) 167 + "3"; + public static final String RED = (char) 167 + "4"; + public static final String PURPLE = (char) 167 + "5"; + public static final String ORANGE = (char) 167 + "6"; + public static final String LIGHT_GRAY = (char) 167 + "7"; + public static final String GRAY = (char) 167 + "8"; + public static final String LIGHT_BLUE = (char) 167 + "9"; + public static final String BRIGHT_GREEN = (char) 167 + "a"; + public static final String BRIGHT_BLUE = (char) 167 + "b"; + public static final String LIGHT_RED = (char) 167 + "c"; + public static final String PINK = (char) 167 + "d"; + public static final String YELLOW = (char) 167 + "e"; + public static final String WHITE = (char) 167 + "f"; - /** - * Text formatting * - */ - public static final String OBFUSCATED = (char) 167 + "k"; - public static final String BOLD = (char) 167 + "l"; - public static final String STRIKETHROUGH = (char) 167 + "m"; - public static final String UNDERLINE = (char) 167 + "n"; - public static final String ITALIC = (char) 167 + "o"; - public static final String END = (char) 167 + "r"; + /** + * Text formatting * + */ + public static final String OBFUSCATED = (char) 167 + "k"; + public static final String BOLD = (char) 167 + "l"; + public static final String STRIKETHROUGH = (char) 167 + "m"; + public static final String UNDERLINE = (char) 167 + "n"; + public static final String ITALIC = (char) 167 + "o"; + public static final String END = (char) 167 + "r"; - /** - * Enable Localizationizing * - */ - public static String localize(String key) { - return StatCollector.translateToLocal(key); - } + /** + * Enable Localizationizing * + */ + public static String localize(String key) { + return StatCollector.translateToLocal(key); + } } diff --git a/src/main/java/tombenpotter/emt/proxies/ClientProxy.java b/src/main/java/tombenpotter/emt/proxies/ClientProxy.java index 8ce49d5..e2b299d 100644 --- a/src/main/java/tombenpotter/emt/proxies/ClientProxy.java +++ b/src/main/java/tombenpotter/emt/proxies/ClientProxy.java @@ -13,14 +13,14 @@ import tombenpotter.emt.common.entities.EntityLaser; public class ClientProxy extends CommonProxy { - @Override - public void load() { - registerRenders(); - EMTKeys.registerKeys(); - } + @Override + public void load() { + registerRenders(); + EMTKeys.registerKeys(); + } - public void registerRenders() { - RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); - RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan()); - } + public void registerRenders() { + RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); + RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan()); + } } diff --git a/src/main/java/tombenpotter/emt/proxies/CommonProxy.java b/src/main/java/tombenpotter/emt/proxies/CommonProxy.java index dfb2402..1babf6d 100644 --- a/src/main/java/tombenpotter/emt/proxies/CommonProxy.java +++ b/src/main/java/tombenpotter/emt/proxies/CommonProxy.java @@ -13,47 +13,47 @@ import tombenpotter.emt.common.tile.TileEntityIndustrialWandRecharge; public class CommonProxy implements IGuiHandler { - public void load() { - registerRenders(); - } + public void load() { + registerRenders(); + } - public void registerRenders() { - /* Empty in base proxy */ - } + public void registerRenders() { + /* Empty in base proxy */ + } - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - TileEntity entity = world.getTileEntity(x, y, z); + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + TileEntity entity = world.getTileEntity(x, y, z); - switch (ID) { - case 0: - if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { - return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity); - } - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } - default: - return null; - } - } + switch (ID) { + case 0: + if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { + return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity); + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } + default: + return null; + } + } - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - TileEntity entity = world.getTileEntity(x, y, z); + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + TileEntity entity = world.getTileEntity(x, y, z); - switch (ID) { - case 0: - if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { - return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity); - } - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } - default: - return null; - } - } + switch (ID) { + case 0: + if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { + return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity); + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } + default: + return null; + } + } } diff --git a/src/main/resources/assets/electromagictools/lang/en_US.lang b/src/main/resources/assets/electromagictools/lang/en_US.lang index 80aeddb..0456df5 100644 --- a/src/main/resources/assets/electromagictools/lang/en_US.lang +++ b/src/main/resources/assets/electromagictools/lang/en_US.lang @@ -37,30 +37,30 @@ tooltip.EMT.output.double.half.height=when the block is over Y = 160 tooltip.EMT.output.double.half.low=when the block is under Y = 10 #=============Entity Names============= -entity.EMT.entityLaser.name=Laser -entity.EMT.entityArcher.name=Guardian Snowman +entity.EMT.laser.name=Laser +entity.EMT.archer.name=Guardian Snowman #=============Item Names============= -item.EMT.emtitems.oreClusterUranium=Uranium Native Cluster -item.EMT.emtitems.crushedOreAmber.name=Crushed Amber Ore -item.EMT.emtitems.purifiedOreAmber.name=Purified Amber Ore -item.EMT.emtitems.crushedOreCinnabar.name=Crushed Cinnabar Ore -item.EMT.emtitems.purifiedOreCinnabar.name=Purified Cinnabar Ore -item.EMT.emtitems.thaumiumPlate.name=Thaumium Plate -item.EMT.emtitems.lightningSummoner.name=Lightning Summoner -item.EMT.emtitems.featherMesh.name=Feather Mesh -item.EMT.emtitems.glue.name=Glue -item.EMT.emtitems.ductTape.name=Duct Tape -item.EMT.emtitems.rubberBall.name=Rubber Ball -item.EMT.emtitems.cardboard.name=Cardboard Sheet -item.EMT.emtitems.featherGluedCardboardWing.name=Feather Glued Cardboard Wing -item.EMT.emtitems.denseIronSheet.name=Dense Iron Sheet -item.EMT.emtitems.taintedFeather.name=Tainted Feather -item.EMT.emtitems.thaumiumWing.name=Thaumium Reinforced Wing -item.EMT.emtitems.uumatterDrop.name=Crystallized UU-Matter Drop -item.EMT.emtbauble.euMaker.armor.name=Armor Charging Ring -item.EMT.emtbauble.euMaker.inventory.name=Inventory Charging Ring -item.EMT.item.bauble.oneRing.name=The One Ring +item.EMT.oreClusterUranium=Uranium Native Cluster +item.EMT.crushedOreAmber.name=Crushed Amber Ore +item.EMT.purifiedOreAmber.name=Purified Amber Ore +item.EMT.crushedOreCinnabar.name=Crushed Cinnabar Ore +item.EMT.purifiedOreCinnabar.name=Purified Cinnabar Ore +item.EMT.thaumiumPlate.name=Thaumium Plate +item.EMT.lightningSummoner.name=Lightning Summoner +item.EMT.featherMesh.name=Feather Mesh +item.EMT.glue.name=Glue +item.EMT.ductTape.name=Duct Tape +item.EMT.rubberBall.name=Rubber Ball +item.EMT.cardboard.name=Cardboard Sheet +item.EMT.featherGluedCardboardWing.name=Feather Glued Cardboard Wing +item.EMT.denseIronSheet.name=Dense Iron Sheet +item.EMT.taintedFeather.name=Tainted Feather +item.EMT.thaumiumWing.name=Thaumium Reinforced Wing +item.EMT.uumatterDrop.name=Crystallized UU-Matter Drop +item.EMT.bauble.euMaker.armor.name=Armor Charging Ring +item.EMT.bauble.euMaker.inventory.name=Inventory Charging Ring +item.EMT.bauble.oneRing.name=The One Ring item.EMT.goggles.electric.name=Electric Goggles of Revealing item.EMT.goggles.nano.name=Nanosuit Goggles of Revealing item.EMT.goggles.quantum.name=Quantum Goggles of Revealing @@ -73,7 +73,7 @@ item.EMT.wing.feather.name=Feather Duct-Taped Wings item.EMT.wing.thaumium.name=Thaumium Reinforced Wings item.EMT.wing.nano.name=Nanosuit Wings item.EMT.wing.quantum.name=Quantum Wings -ic2.EMT.quantum=Infused Quantum Chestplate +item.EMT.chestplates.infusedQuantum.name=Infused Quantum Chestplate item.EMT.hammer.broken.name=Broken Relic of Mjolnir item.EMT.hammer.name=Mjolnir item.EMT.hammer.electric.name=Supercharged Mjolnir diff --git a/src/main/resources/assets/electromagictools/lang/ru_RU.lang b/src/main/resources/assets/electromagictools/lang/ru_RU.lang index cf2c841..ce4334e 100644 --- a/src/main/resources/assets/electromagictools/lang/ru_RU.lang +++ b/src/main/resources/assets/electromagictools/lang/ru_RU.lang @@ -37,30 +37,30 @@ tooltip.EMT.output.double.half.height=если она находится выш tooltip.EMT.output.double.half.low=если она находится ниже Y = 10 #=============Enity Names============= -entity.EMT.entityLaser.name=Лазер -entity.EMT.entityArcher.name=Снеговик-хранитель +entity.EMT.laser.name=Лазер +entity.EMT.archer.name=Снеговик-хранитель #=============Item Names============= -item.EMT.emtitems.oreClusterUranium=Скопление чистого урана -item.EMT.emtitems.crushedOreAmber.name=Измельчённая янтарная руда -item.EMT.emtitems.purifiedOreAmber.name=Очищенная янтарная руда -item.EMT.emtitems.crushedOreCinnabar.name=Измельчённая киноварная руда -item.EMT.emtitems.purifiedOreCinnabar.name=Очищенная янтарная руда -item.EMT.emtitems.thaumiumPlate.name=Таум-пластина -item.EMT.emtitems.lightningSummoner.name=Призыватель молний -item.EMT.emtitems.featherMesh.name=Кучка перьев -item.EMT.emtitems.glue.name=Клей -item.EMT.emtitems.ductTape.name=Клейкая лента -item.EMT.emtitems.rubberBall.name=Резиновый шарик -item.EMT.emtitems.cardboard.name=Картонный лист -item.EMT.emtitems.featherGluedCardboardWing.name=Картонное крыло, обклеенное перьями -item.EMT.emtitems.denseIronSheet.name=Плотный железный лист -item.EMT.emtitems.taintedFeather.name=Заражённое перо -item.EMT.emtitems.thaumiumWing.name=Укреплённое таум-крыло -item.EMT.emtitems.uumatterDrop.name=Кристаллизированная капля материи -item.EMT.emtbauble.euMaker.armor.name=Кольцо для зарядки брони -item.EMT.emtbauble.euMaker.inventory.name=Кольцо для зарядки инвентаря -item.EMT.item.bauble.oneRing.name=Кольцо Всевластия +item.EMT.oreClusterUranium=Скопление чистого урана +item.EMT.crushedOreAmber.name=Измельчённая янтарная руда +item.EMT.purifiedOreAmber.name=Очищенная янтарная руда +item.EMT.crushedOreCinnabar.name=Измельчённая киноварная руда +item.EMT.purifiedOreCinnabar.name=Очищенная янтарная руда +item.EMT.thaumiumPlate.name=Таум-пластина +item.EMT.lightningSummoner.name=Призыватель молний +item.EMT.featherMesh.name=Кучка перьев +item.EMT.glue.name=Клей +item.EMT.ductTape.name=Клейкая лента +item.EMT.rubberBall.name=Резиновый шарик +item.EMT.cardboard.name=Картонный лист +item.EMT.featherGluedCardboardWing.name=Картонное крыло, обклеенное перьями +item.EMT.denseIronSheet.name=Плотный железный лист +item.EMT.taintedFeather.name=Заражённое перо +item.EMT.thaumiumWing.name=Укреплённое таум-крыло +item.EMT.uumatterDrop.name=Кристаллизированная капля материи +item.EMT.bauble.euMaker.armor.name=Кольцо для зарядки брони +item.EMT.bauble.euMaker.inventory.name=Кольцо для зарядки инвентаря +item.EMT.bauble.oneRing.name=Кольцо Всевластия item.EMT.goggles.electric.name=Электрические очки откровения item.EMT.goggles.nano.name=Нано-очки откровения item.EMT.goggles.quantum.name=Квантовые очки откровения @@ -73,7 +73,7 @@ item.EMT.wing.feather.name=Склеенные крылья из картона item.EMT.wing.thaumium.name=Укреплённые таум-крылья item.EMT.wing.nano.name=Нано-крылья item.EMT.wing.quantum.name=Квантовые крылья -ic2.EMT.quantum=Наполненный квантовый нагрудник +item.EMT.chestplates.infusedQuantum.name=Наполненный квантовый нагрудник item.EMT.hammer.broken.name=Сломанная реликвия Мьёлнира item.EMT.hammer.name=Мьёлнир item.EMT.hammer.electric.name=Сильнозаряженный Мьёлнир diff --git a/src/main/resources/assets/electromagictools/lang/zh_CN.lang b/src/main/resources/assets/electromagictools/lang/zh_CN.lang index 96ae58b..10a893a 100644 --- a/src/main/resources/assets/electromagictools/lang/zh_CN.lang +++ b/src/main/resources/assets/electromagictools/lang/zh_CN.lang @@ -37,30 +37,30 @@ tooltip.EMT.output.double.half.height=处于160层上方发电量 tooltip.EMT.output.double.half.low=处于10层以下发电量 #=============Entity Names============= -entity.EMT.entityLaser.name=镭射器 -entity.EMT.entityArcher.name=雪人守卫 +entity.EMT.laser.name=镭射器 +entity.EMT.archer.name=雪人守卫 #=============Item Names============= -item.EMT.emtitems.oreClusterUranium=铀矿簇 -item.EMT.emtitems.crushedOreAmber.name=粉碎琥珀矿 -item.EMT.emtitems.purifiedOreAmber.name=纯净的粉碎琥珀矿 -item.EMT.emtitems.crushedOreCinnabar.name=粉碎朱砂矿 -item.EMT.emtitems.purifiedOreCinnabar.name=纯净的粉碎朱砂矿 -item.EMT.emtitems.thaumiumPlate.name=神秘板 -item.EMT.emtitems.lightningSummoner.name=雷电碎片 -item.EMT.emtitems.featherMesh.name=织羽 -item.EMT.emtitems.glue.name=粘合剂 -item.EMT.emtitems.ductTape.name=布基胶带 -item.EMT.emtitems.rubberBall.name=橡胶球 -item.EMT.emtitems.cardboard.name=硬纸板 -item.EMT.emtitems.featherGluedCardboardWing.name=纸板羽翼 -item.EMT.emtitems.denseIronSheet.name=致密铁片 -item.EMT.emtitems.taintedFeather.name=腐化羽毛 -item.EMT.emtitems.thaumiumWing.name=神秘增强羽翼 -item.EMT.emtitems.uumatterDrop.name=结晶UU物质液滴 -item.EMT.emtbauble.euMaker.armor.name=装备充电指环 -item.EMT.emtbauble.euMaker.inventory.name=物品充电指环 -item.EMT.item.bauble.oneRing.name=魔戒 +item.EMT.oreClusterUranium=铀矿簇 +item.EMT.crushedOreAmber.name=粉碎琥珀矿 +item.EMT.purifiedOreAmber.name=纯净的粉碎琥珀矿 +item.EMT.crushedOreCinnabar.name=粉碎朱砂矿 +item.EMT.purifiedOreCinnabar.name=纯净的粉碎朱砂矿 +item.EMT.thaumiumPlate.name=神秘板 +item.EMT.lightningSummoner.name=雷电碎片 +item.EMT.featherMesh.name=织羽 +item.EMT.glue.name=粘合剂 +item.EMT.ductTape.name=布基胶带 +item.EMT.rubberBall.name=橡胶球 +item.EMT.cardboard.name=硬纸板 +item.EMT.featherGluedCardboardWing.name=纸板羽翼 +item.EMT.denseIronSheet.name=致密铁片 +item.EMT.taintedFeather.name=腐化羽毛 +item.EMT.thaumiumWing.name=神秘增强羽翼 +item.EMT.uumatterDrop.name=结晶UU物质液滴 +item.EMT.bauble.euMaker.armor.name=装备充电指环 +item.EMT.bauble.euMaker.inventory.name=物品充电指环 +item.EMT.bauble.oneRing.name=魔戒 item.EMT.goggles.electric.name=电子护目镜 item.EMT.goggles.nano.name=纳米揭示护目镜 item.EMT.goggles.quantum.name=量子揭示护目镜 @@ -73,7 +73,7 @@ item.EMT.wing.feather.name=粘合纸板羽翼 item.EMT.wing.thaumium.name=神秘羽翼 item.EMT.wing.nano.name=纳米羽翼 item.EMT.wing.quantum.name=量子羽翼 -ic2.EMT.quantum=注魔量子胸甲 +item.EMT.chestplates.infusedQuantum.name=注魔量子胸甲 item.EMT.hammer.broken.name=破损的雷神之锤 item.EMT.hammer.name=雷神之锤 item.EMT.hammer.electric.name=高压雷神之锤 diff --git a/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png b/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png new file mode 100644 index 0000000..259b8e7 Binary files /dev/null and b/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png differ diff --git a/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png.mcmeta b/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png.mcmeta new file mode 100644 index 0000000..4a650b1 --- /dev/null +++ b/src/main/resources/assets/electromagictools/textures/items/focus_chargeWand.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 5 + } +} diff --git a/src/main/resources/assets/electromagictools/textures/items/focus_wandCharge.png b/src/main/resources/assets/electromagictools/textures/items/focus_wandCharge.png deleted file mode 100644 index 4bb36a0..0000000 Binary files a/src/main/resources/assets/electromagictools/textures/items/focus_wandCharge.png and /dev/null differ