diff --git a/Changelog.txt b/Changelog.txt index 2005e0c..e484a1d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,20 +1,77 @@ Changelog of the mod : Electric Magic Tools, a Thaumcraft 4/Industrial-Craft 2 addon -------------------------------------------------------------------------------------------------------------------------------------------------------- +Version 1.1.1 : +Fixed a bug with The One Ring where mobs attacked you when you removed it while in creative. +New Thaumonomicon entries for a couple of things, thanks to Professor29. +Forgot to mention it, new Nanosuit Boots of the Traveller texture thanks to TehNut. +Removed Thaumium Plate and Lightning Summoner, and moved them to use other ids. This will delete existing ones. +Moved all the Solar Panels tooltips to require the use of the shift key to show themselves. +Adding wings, my take at the mix of Magic and Jetpacks. +Blacklist of the Etheral Processor now extends to anything containing armor, armour, helm, chestp, legging, boot, sword, shovel, axe or pick in its unlocalized name. +Added a drop to the Tainted Chicken, the Tainted Feather. Also added a crafting recipe for it. +Added a couple of crating components, used in the making of the wings. +Added a bunch of console outputs on the starting of the game so that I know exactly when it crashed if it died at startup. +Fixed a bug with the drill of the Rockbreaker that would make it use durability and eventually break when shift-breaking a block. +Added a different texture file for each solar panel, so that it can be changed more easily. +CyanideX remade all the EMT textures! Finally featuring cool looking stuff! Yey, thanks a lot to him! -Version 1.0.0 : First release of the mod. -Version 1.0.1 : Second release of the mod : fixes a crash due to the Omnitools. -Version 1.0.2 : Third release of the mod : adds the Wand Focus : Laser, and a christmas easter egg. Does not work on servers. -Version 1.0.3 : Attempt to fix the server crash of the mod. Attemps failed. -Version 1.0.3b : Second attempt to fix the server crash, it is again working in SMP. -Version 1.0.4 : Adds the Kris-tmas Focus and the Shield Focus -Version 1.0.5 : Added some Ignis/Potentia/Auram generators, Electric Goggles of revealing, Chainsaw of the Stream, and Drill of the Rockbreaker. -Version 1.0.6beta1 : Added an Industrial Wand Charging Station, some legendary tools, and a couple of other stuff. -Version 1.0.6beta2 : No new stuff, but switched to ForgeGradle (964) -Version 1.0.6beta3 : Added some enhanced boots of the traveller, and also capes for me and some friends -Version 1.0.7 : Updated to Thaumcraft 4.1.0x -Version 1.0.8 : Added some magical solar panels, different tiers and special capablities to all of them. -Version 1.0.9beta1 : Fixed the bug with the Drill of the Rockbreaker, added UU-Matter Infusion Recipes, fixed the recipe for the Quantum Solar Helmet of Revealing, added the Wand Focus: Charging, a cool particle effect existing when the Electric/Nano/Quantum boots of the traveller are worn (you an disable it in the config),a portable node (Azanor agreed about the balance), and an Elecric Hoe of Growth. -Version 1.0.9beta2 : Added a blacklist for the Ethereal Processor to anything that has "dust" in its OreDict entry. Included my build.gradle in the commit :) +Version 1.1.0 : +Updating to MC 1.7.2. +Added an Inventory Charging Bauble and an Armor Charging Bauble. +Added The One Ring, available only through dungeon loot. +Added a Wand Charging wand focus. + +Versions 1.0.9a, 1.0.9b, 1.0.9c, 1.0.9d : +Added a blacklist for the Ethereal Processor to anything that has "dust" in its OreDict entry. +Mainly bugfixes. + +Version 1.0.9 : +Fixed the bug with the Drill of the Rockbreaker. +Added UU-Matter Infusion Recipes. +Fixed the recipe for the Quantum Solar Helmet of Revealing. +Added the Wand Focus: Charging. +Added a cool particle effect existing when the Electric/Nano/Quantum boots of the traveller are worn (you an disable it in the config). +Added a portable node, and an Elecric Hoe of Growth. + +Version 1.0.8 : +Added some magical solar panels, different tiers and special abilities to all of them. + +Version 1.0.7 : +Updated to Thaumcraft 4.1.0x. + +Version 1.0.6 : +Added an Industrial Wand Charging Station. +Added some legendary tools. +A couple of other things. +Code wise, switching to Forge Gradle (#964). +Added some enhanced boots of the traveller, and capes for some friends and I. + +Version 1.0.5 : +Added some Ignis/Potentia/Auram generators. +Added Electric Goggles of revealing. +Added a Chainsaw of the Stream. +Added a Drill of the Rockbreaker. + +Version 1.0.4 : +Added the Kris-tmas Focus. +Added the Shield Focus + +Version 1.0.3b : +Second attempt to fix the server crash, it is again working in SMP. + +Version 1.0.3 : +Attempt to fix the server crash of the mod. Attempt failed. + +Version 1.0.2 : +Adds the Wand Focus : Laser. +Added a christmas easter egg. +Does not work on servers. + +Version 1.0.1 : +Fixes a crash due to the Omnitools. + +Version 1.0.0 : +First release of the mod. -------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/build.gradle b/build.gradle index e12d22a..af6ca82 100644 --- a/build.gradle +++ b/build.gradle @@ -17,12 +17,12 @@ buildscript { apply plugin: 'forge' -version = "1.1.0" +version = "1.1.1" group= "electricMagicTools.tombenpotter" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "ElectroMagicTools" minecraft { - version = "1.7.2-10.12.0.1057" + version = "1.7.2-10.12.2.1147" assetDir = "eclipse/assets" } diff --git a/capes.txt b/capes.txt index 116fe4a..b39b751 100644 --- a/capes.txt +++ b/capes.txt @@ -9,4 +9,5 @@ VMvinner:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/ca Drullkus:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png jztech101:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png Pixel_404:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png -Speedynutty68:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png \ No newline at end of file +Speedynutty68:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png +TheDrunkMafia:https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes/cape.png \ No newline at end of file diff --git a/capes/Thumbs.db b/capes/Thumbs.db index 8661b0a..e07e3ac 100644 Binary files a/capes/Thumbs.db and b/capes/Thumbs.db differ diff --git a/capes/cape.png b/capes/cape.png index a66b541..0d2eb18 100644 Binary files a/capes/cape.png and b/capes/cape.png differ diff --git a/src/api/java/ic2/api/Direction.class b/src/api/java/ic2/api/Direction.class index fdfd762..5705e5d 100644 Binary files a/src/api/java/ic2/api/Direction.class and b/src/api/java/ic2/api/Direction.class differ diff --git a/src/api/java/ic2/api/Direction.java b/src/api/java/ic2/api/Direction.java index 59b82fb..64350dd 100644 --- a/src/api/java/ic2/api/Direction.java +++ b/src/api/java/ic2/api/Direction.java @@ -54,11 +54,23 @@ public enum Direction { * @param tileEntity tile entity to check * @return Adjacent tile entity or null if none exists */ - public TileEntity applyToTileEntity(TileEntity tileEntity) { - int coords[] = { tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord }; + public TileEntity applyToTileEntity(TileEntity te) { + return applyTo(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord); + } + + /** + * Get the tile entity next to a position following this direction. + * + * @param world World to check + * @param x X coordinate to check from + * @param y Y coordinate to check from + * @param z Z coordinate to check from + * @return Adjacent tile entity or null if none exists + */ + public TileEntity applyTo(World world, int x, int y, int z) { + int coords[] = { x, y, z }; coords[dir/2] += getSign(); - World world = tileEntity.getWorldObj(); if (world != null && world.blockExists(coords[0], coords[1], coords[2])) { try { @@ -67,6 +79,7 @@ public enum Direction { throw new RuntimeException("error getting TileEntity at dim "+world.provider.dimensionId+" "+coords[0]+"/"+coords[1]+"/"+coords[2]); } } + return null; } diff --git a/src/api/java/ic2/api/crops/package-info.class b/src/api/java/ic2/api/crops/package-info.class new file mode 100644 index 0000000..1c2c0e1 Binary files /dev/null and b/src/api/java/ic2/api/crops/package-info.class differ diff --git a/src/api/java/ic2/api/crops/package-info.java b/src/api/java/ic2/api/crops/package-info.java new file mode 100644 index 0000000..04b8253 --- /dev/null +++ b/src/api/java/ic2/api/crops/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.crops; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/energy/event/package-info.class b/src/api/java/ic2/api/energy/event/package-info.class new file mode 100644 index 0000000..fc279ec Binary files /dev/null and b/src/api/java/ic2/api/energy/event/package-info.class differ diff --git a/src/api/java/ic2/api/energy/event/package-info.java b/src/api/java/ic2/api/energy/event/package-info.java new file mode 100644 index 0000000..40db6f8 --- /dev/null +++ b/src/api/java/ic2/api/energy/event/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.energy.event; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/energy/package-info.class b/src/api/java/ic2/api/energy/package-info.class new file mode 100644 index 0000000..baaed20 Binary files /dev/null and b/src/api/java/ic2/api/energy/package-info.class differ diff --git a/src/api/java/ic2/api/energy/package-info.java b/src/api/java/ic2/api/energy/package-info.java new file mode 100644 index 0000000..81d0bfe --- /dev/null +++ b/src/api/java/ic2/api/energy/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.energy; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/energy/prefab/package-info.class b/src/api/java/ic2/api/energy/prefab/package-info.class new file mode 100644 index 0000000..52651b1 Binary files /dev/null and b/src/api/java/ic2/api/energy/prefab/package-info.class differ diff --git a/src/api/java/ic2/api/energy/prefab/package-info.java b/src/api/java/ic2/api/energy/prefab/package-info.java new file mode 100644 index 0000000..c38f7e0 --- /dev/null +++ b/src/api/java/ic2/api/energy/prefab/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.energy.prefab; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.class b/src/api/java/ic2/api/energy/tile/IHeatSource.class new file mode 100644 index 0000000..4b24af9 Binary files /dev/null and b/src/api/java/ic2/api/energy/tile/IHeatSource.class differ diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.java b/src/api/java/ic2/api/energy/tile/IHeatSource.java new file mode 100644 index 0000000..7f6ff66 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/IHeatSource.java @@ -0,0 +1,24 @@ +package ic2.api.energy.tile; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IHeatSource { + + /* + * Return max heat transmission peer Tick (only theoretical bandwidth not available amount) + */ + int maxrequestHeatTick(ForgeDirection directionFrom); + + /* + * @param requested amount of heat to transfer + * + * @return transmitted amount of heat + * + * example: You Request 100 units of heat but the Source have only 50 units left + * + * requestHeat(100) : return 50 : so 50 units of heat remove from HeatSource + */ + + int requestHeat(ForgeDirection directionFrom,int requestheat); + +} diff --git a/src/api/java/ic2/api/energy/tile/package-info.class b/src/api/java/ic2/api/energy/tile/package-info.class new file mode 100644 index 0000000..fdee4a7 Binary files /dev/null and b/src/api/java/ic2/api/energy/tile/package-info.class differ diff --git a/src/api/java/ic2/api/energy/tile/package-info.java b/src/api/java/ic2/api/energy/tile/package-info.java new file mode 100644 index 0000000..3c60323 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.energy.tile; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/event/package-info.class b/src/api/java/ic2/api/event/package-info.class new file mode 100644 index 0000000..718d8f1 Binary files /dev/null and b/src/api/java/ic2/api/event/package-info.class differ diff --git a/src/api/java/ic2/api/event/package-info.java b/src/api/java/ic2/api/event/package-info.java new file mode 100644 index 0000000..d331b92 --- /dev/null +++ b/src/api/java/ic2/api/event/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.event; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/info/package-info.class b/src/api/java/ic2/api/info/package-info.class new file mode 100644 index 0000000..96b88b7 Binary files /dev/null and b/src/api/java/ic2/api/info/package-info.class differ diff --git a/src/api/java/ic2/api/info/package-info.java b/src/api/java/ic2/api/info/package-info.java new file mode 100644 index 0000000..59936e5 --- /dev/null +++ b/src/api/java/ic2/api/info/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.info; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/item/package-info.class b/src/api/java/ic2/api/item/package-info.class new file mode 100644 index 0000000..222a183 Binary files /dev/null and b/src/api/java/ic2/api/item/package-info.class differ diff --git a/src/api/java/ic2/api/item/package-info.java b/src/api/java/ic2/api/item/package-info.java new file mode 100644 index 0000000..44ecdce --- /dev/null +++ b/src/api/java/ic2/api/item/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.item; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/network/package-info.class b/src/api/java/ic2/api/network/package-info.class new file mode 100644 index 0000000..f4f1842 Binary files /dev/null and b/src/api/java/ic2/api/network/package-info.class differ diff --git a/src/api/java/ic2/api/network/package-info.java b/src/api/java/ic2/api/network/package-info.java new file mode 100644 index 0000000..25ea29e --- /dev/null +++ b/src/api/java/ic2/api/network/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.network; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/package-info.class b/src/api/java/ic2/api/package-info.class new file mode 100644 index 0000000..7caf699 Binary files /dev/null and b/src/api/java/ic2/api/package-info.class differ diff --git a/src/api/java/ic2/api/package-info.java b/src/api/java/ic2/api/package-info.java new file mode 100644 index 0000000..e6f1522 --- /dev/null +++ b/src/api/java/ic2/api/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/reactor/package-info.class b/src/api/java/ic2/api/reactor/package-info.class new file mode 100644 index 0000000..a94d26f Binary files /dev/null and b/src/api/java/ic2/api/reactor/package-info.class differ diff --git a/src/api/java/ic2/api/reactor/package-info.java b/src/api/java/ic2/api/reactor/package-info.java new file mode 100644 index 0000000..5194aee --- /dev/null +++ b/src/api/java/ic2/api/reactor/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.reactor; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.class b/src/api/java/ic2/api/recipe/RecipeInputOreDict.class index df8d64c..a068e8f 100644 Binary files a/src/api/java/ic2/api/recipe/RecipeInputOreDict.class and b/src/api/java/ic2/api/recipe/RecipeInputOreDict.class differ diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.java b/src/api/java/ic2/api/recipe/RecipeInputOreDict.java index a64d83f..89f73dc 100644 --- a/src/api/java/ic2/api/recipe/RecipeInputOreDict.java +++ b/src/api/java/ic2/api/recipe/RecipeInputOreDict.java @@ -1,5 +1,6 @@ package ic2.api.recipe; +import java.util.ArrayList; import java.util.List; import net.minecraft.item.ItemStack; @@ -26,6 +27,7 @@ public class RecipeInputOreDict implements IRecipeInput { List inputs = OreDictionary.getOres(input); for (ItemStack input1 : inputs) { + if (input1.getItem() == null) continue; // ignore invalid int metaRequired = meta == null ? input1.getItemDamage() : meta; if (subject.getItem() == input1.getItem() && @@ -44,7 +46,14 @@ public class RecipeInputOreDict implements IRecipeInput { @Override public List getInputs() { - return OreDictionary.getOres(input); + List ores = OreDictionary.getOres(input); + List ret = new ArrayList(ores.size()); + + for (ItemStack stack : ores) { + if (stack.getItem() != null) ret.add(stack); // ignore invalid + } + + return ret; } @Override diff --git a/src/api/java/ic2/api/recipe/package-info.class b/src/api/java/ic2/api/recipe/package-info.class new file mode 100644 index 0000000..f30b57f Binary files /dev/null and b/src/api/java/ic2/api/recipe/package-info.class differ diff --git a/src/api/java/ic2/api/recipe/package-info.java b/src/api/java/ic2/api/recipe/package-info.java new file mode 100644 index 0000000..44e70e7 --- /dev/null +++ b/src/api/java/ic2/api/recipe/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.recipe; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/tile/package-info.class b/src/api/java/ic2/api/tile/package-info.class new file mode 100644 index 0000000..226d455 Binary files /dev/null and b/src/api/java/ic2/api/tile/package-info.class differ diff --git a/src/api/java/ic2/api/tile/package-info.java b/src/api/java/ic2/api/tile/package-info.java new file mode 100644 index 0000000..5ebc76e --- /dev/null +++ b/src/api/java/ic2/api/tile/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.tile; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/util/package-info.class b/src/api/java/ic2/api/util/package-info.class new file mode 100644 index 0000000..4c91d91 Binary files /dev/null and b/src/api/java/ic2/api/util/package-info.class differ diff --git a/src/api/java/ic2/api/util/package-info.java b/src/api/java/ic2/api/util/package-info.java new file mode 100644 index 0000000..4dd2d93 --- /dev/null +++ b/src/api/java/ic2/api/util/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.util; +import cpw.mods.fml.common.API; + diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/CapeEventHandler.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/CapeEventHandler.java index 14e7632..e927735 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/CapeEventHandler.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/CapeEventHandler.java @@ -1,18 +1,25 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.client; -import java.awt.Graphics; -import java.awt.Image; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.ReflectionHelper; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.renderer.ThreadDownloadImageData; +import net.minecraftforge.client.event.RenderPlayerEvent; + +import javax.swing.*; +import java.awt.*; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.IOException; @@ -24,126 +31,117 @@ import java.net.URLConnection; import java.util.ArrayList; import java.util.HashMap; -import javax.swing.ImageIcon; - -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.client.renderer.ThreadDownloadImageData; -import net.minecraftforge.client.event.RenderPlayerEvent; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.ReflectionHelper; - public class CapeEventHandler { - private final String serverLocation = "https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes.txt"; - private final int timeout = 1000; + private final String serverLocation = "https://raw.github.com/Tombenpotter/Electro-Magic-Tools/master/capes.txt"; + private final int timeout = 1000; - private static final Graphics TEST_GRAPHICS = new BufferedImage(128, 128, BufferedImage.TYPE_INT_RGB).getGraphics(); - private HashMap cloaks = new HashMap(); - private ArrayList capePlayers = new ArrayList(); + private static final Graphics TEST_GRAPHICS = new BufferedImage(128, 128, BufferedImage.TYPE_INT_RGB).getGraphics(); + private HashMap cloaks = new HashMap(); + private ArrayList capePlayers = new ArrayList(); - public static CapeEventHandler instance; + public static CapeEventHandler instance; - public CapeEventHandler() { - buildCloakURLDatabase(); - instance = this; - } + public CapeEventHandler() { + buildCloakURLDatabase(); + instance = this; + } - @SubscribeEvent - public void onPreRenderSpecials(RenderPlayerEvent.Specials.Pre event) { - if (Loader.isModLoaded("shadersmod")) { - return; - } - if (event.entityPlayer instanceof AbstractClientPlayer) { - AbstractClientPlayer abstractClientPlayer = (AbstractClientPlayer) event.entityPlayer; + @SubscribeEvent + public void onPreRenderSpecials(RenderPlayerEvent.Specials.Pre event) { + if (Loader.isModLoaded("shadersmod")) { + return; + } + if (event.entityPlayer instanceof AbstractClientPlayer) { + AbstractClientPlayer abstractClientPlayer = (AbstractClientPlayer) event.entityPlayer; - if (!capePlayers.contains(abstractClientPlayer)) { - String cloakURL = cloaks.get(event.entityPlayer.getCommandSenderName()); + if (!capePlayers.contains(abstractClientPlayer)) { + String cloakURL = cloaks.get(event.entityPlayer.getCommandSenderName()); - if (cloakURL == null) { - return; - } + if (cloakURL == null) { + return; + } - capePlayers.add(abstractClientPlayer); + capePlayers.add(abstractClientPlayer); - ReflectionHelper.setPrivateValue(ThreadDownloadImageData.class, abstractClientPlayer.getTextureCape(), false, new String[] { "textureUploaded", "field_110559_g" }); + ReflectionHelper.setPrivateValue(ThreadDownloadImageData.class, abstractClientPlayer.getTextureCape(), false, new String[]{"textureUploaded", "field_110559_g"}); - new Thread(new CloakThread(abstractClientPlayer, cloakURL)).start(); - event.renderCape = true; - } - } - } + new Thread(new CloakThread(abstractClientPlayer, cloakURL)).start(); + event.renderCape = true; + } + } + } - public void buildCloakURLDatabase() { - URL url; - try { - url = new URL(serverLocation); - URLConnection con = url.openConnection(); - con.setConnectTimeout(timeout); - con.setReadTimeout(timeout); - InputStream io = con.getInputStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(io)); + public void buildCloakURLDatabase() { + URL url; + try { + url = new URL(serverLocation); + URLConnection con = url.openConnection(); + con.setConnectTimeout(timeout); + con.setReadTimeout(timeout); + InputStream io = con.getInputStream(); + BufferedReader br = new BufferedReader(new InputStreamReader(io)); - String str; - int linetracker = 1; - while ((str = br.readLine()) != null) { - if (!str.startsWith("--")) { - if (str.contains(":")) { - String nick = str.substring(0, str.indexOf(":")); - String link = str.substring(str.indexOf(":") + 1); - new Thread(new CloakPreload(link)).start(); - cloaks.put(nick, link); - } else { - System.err.println("[Electro-Magic Tools] [skins.txt] Syntax error on line " + linetracker + ": " + str); - } - } - linetracker++; - } + String str; + int linetracker = 1; + while ((str = br.readLine()) != null) { + if (!str.startsWith("--")) { + if (str.contains(":")) { + String nick = str.substring(0, str.indexOf(":")); + String link = str.substring(str.indexOf(":") + 1); + new Thread(new CloakPreload(link)).start(); + cloaks.put(nick, link); + } else { + System.err.println("[Electro-Magic Tools] [skins.txt] Syntax error on line " + linetracker + ": " + str); + } + } + linetracker++; + } - br.close(); - } catch (MalformedURLException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } + br.close(); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } - private class CloakThread implements Runnable { - AbstractClientPlayer abstractClientPlayer; - String cloakURL; + private class CloakThread implements Runnable { + AbstractClientPlayer abstractClientPlayer; + String cloakURL; - public CloakThread(AbstractClientPlayer player, String cloak) { - abstractClientPlayer = player; - cloakURL = cloak; - } + public CloakThread(AbstractClientPlayer player, String cloak) { + abstractClientPlayer = player; + cloakURL = cloak; + } - @Override - public void run() { - try { - Image cape = new ImageIcon(new URL(cloakURL)).getImage(); - BufferedImage bo = new BufferedImage(cape.getWidth(null), cape.getHeight(null), BufferedImage.TYPE_INT_ARGB); - bo.getGraphics().drawImage(cape, 0, 0, null); + @Override + public void run() { + try { + Image cape = new ImageIcon(new URL(cloakURL)).getImage(); + BufferedImage bo = new BufferedImage(cape.getWidth(null), cape.getHeight(null), BufferedImage.TYPE_INT_ARGB); + bo.getGraphics().drawImage(cape, 0, 0, null); - ReflectionHelper.setPrivateValue(ThreadDownloadImageData.class, abstractClientPlayer.getTextureCape(), bo, new String[] { "bufferedImage", "field_110560_d" }); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - } + ReflectionHelper.setPrivateValue(ThreadDownloadImageData.class, abstractClientPlayer.getTextureCape(), bo, new String[]{"bufferedImage", "field_110560_d"}); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + } - private class CloakPreload implements Runnable { - String cloakURL; + private class CloakPreload implements Runnable { + String cloakURL; - public CloakPreload(String link) { - cloakURL = link; - } + public CloakPreload(String link) { + cloakURL = link; + } - @Override - public void run() { - try { - TEST_GRAPHICS.drawImage(new ImageIcon(new URL(cloakURL)).getImage(), 0, 0, null); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - } + @Override + public void run() { + try { + TEST_GRAPHICS.drawImage(new ImageIcon(new URL(cloakURL)).getImage(), 0, 0, null); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/ClientProxy.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/ClientProxy.java index df63c9d..e3a9be9 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/ClientProxy.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/ClientProxy.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -20,13 +20,13 @@ import electricMagicTools.tombenpotter.electricmagictools.common.entities.Entity public class ClientProxy extends CommonProxy { - @Override - public void load() { - registerRenders(); - } + @Override + public void load() { + registerRenders(); + } - public void registerRenders() { - RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); - RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderArcher()); - } + public void registerRenders() { + RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); + RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderArcher()); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiEtherealMacerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiEtherealMacerator.java index 0ca2792..5ff7f59 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiEtherealMacerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiEtherealMacerator.java @@ -1,45 +1,44 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.client.gui; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerEtheralMacerator; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerEtheralMacerator; - 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("electricmagictools", "textures/guis/etherealmacerator.png"); + public static final ResourceLocation texture = new ResourceLocation(ElectricMagicTools.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("Ethereal Processor", 6, 6, 4210752); - this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString("Ethereal Processor", 6, 6, 4210752); + this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiIndustrialWandRecharger.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiIndustrialWandRecharger.java index 598de9f..4fb56f4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiIndustrialWandRecharger.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/gui/GuiIndustrialWandRecharger.java @@ -1,45 +1,44 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.client.gui; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerIndustrialWandRecharge; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerIndustrialWandRecharge; - 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("electricmagictools", "textures/guis/wandcharger.png"); + public static final ResourceLocation texture = new ResourceLocation(ElectricMagicTools.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("Industrial Wand Charging Station", 6, 6, 4210752); - this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); - } + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString("Industrial Wand Charging Station", 6, 6, 4210752); + this.fontRendererObj.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/model/ModelWings.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/model/ModelWings.java new file mode 100644 index 0000000..71f225c --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/model/ModelWings.java @@ -0,0 +1,49 @@ +package electricMagicTools.tombenpotter.electricmagictools.client.model; + +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelWings extends ModelBiped { + ModelRenderer rightWing; + ModelRenderer leftWing; + ModelRenderer center; + + public ModelWings() { + textureWidth = 64; + textureHeight = 64; + + rightWing = new ModelRenderer(this, 24, 0); + rightWing.addBox(-11F, 0F, 0F, 11, 13, 1); + rightWing.setRotationPoint(-2F, 0F, 3F); + rightWing.setTextureSize(64, 32); + rightWing.mirror = true; + setRotation(rightWing, 0F, 0.1570796F, 0F); + leftWing = new ModelRenderer(this, 0, 0); + leftWing.addBox(0F, 0F, 0F, 11, 13, 1); + leftWing.setRotationPoint(2F, 0F, 3F); + leftWing.setTextureSize(64, 32); + leftWing.mirror = true; + setRotation(leftWing, 0F, -0.1570796F, 0F); + center = new ModelRenderer(this, 0, 14); + center.addBox(0F, 0F, 0F, 8, 14, 1); + center.setRotationPoint(-4F, 0F, 3F); + center.setTextureSize(64, 32); + center.mirror = true; + setRotation(center, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + rightWing.render(f5); + leftWing.render(f5); + center.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderArcher.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderArcher.java index 4620123..e701fdf 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderArcher.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderArcher.java @@ -1,19 +1,19 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.client.renderer; -import net.minecraft.client.renderer.entity.RenderSnowMan; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.entity.RenderSnowMan; @SideOnly(Side.CLIENT) public class RenderArcher extends RenderSnowMan { diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderLaser.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderLaser.java index 1929870..a17a5ec 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderLaser.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/client/renderer/RenderLaser.java @@ -1,92 +1,91 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.client.renderer; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; - import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; - public class RenderLaser extends Render { - private static final ResourceLocation laserTexture = new ResourceLocation("electricmagictools:textures/models/lasermodel.png"); + private static final ResourceLocation laserTexture = new ResourceLocation(ElectricMagicTools.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/electricMagicTools/tombenpotter/electricmagictools/common/BlockRegistry.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/BlockRegistry.java index 7764a62..9927f87 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/BlockRegistry.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/BlockRegistry.java @@ -1,50 +1,45 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; -import net.minecraft.block.Block; import cpw.mods.fml.common.registry.GameRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockEMTMachines; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockEMTSolars; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockEMTSolars2; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockEssentiaGenerators; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockPortableNode; -import electricMagicTools.tombenpotter.electricmagictools.common.blocks.BlockShield; +import electricMagicTools.tombenpotter.electricmagictools.common.blocks.*; import electricMagicTools.tombenpotter.electricmagictools.common.items.blocks.ItemBlockEMTMachines; import electricMagicTools.tombenpotter.electricmagictools.common.items.blocks.ItemBlockEMTSolars; import electricMagicTools.tombenpotter.electricmagictools.common.items.blocks.ItemBlockEMTSolars2; import electricMagicTools.tombenpotter.electricmagictools.common.items.blocks.ItemBlockEssentiaGenerators; +import net.minecraft.block.Block; public class BlockRegistry { - 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 Block portableNode; - public static void registerEMTBlocks() { - shield = new BlockShield().setBlockName("shield"); - portableNode = new BlockPortableNode().setBlockName("portablenode"); - emtSolars = new BlockEMTSolars().setBlockName("emtsolars"); - essentiaGens = new BlockEssentiaGenerators().setBlockName("essentiaGens"); - emtMachines = new BlockEMTMachines().setBlockName("emtmachines"); - emtSolars2 = new BlockEMTSolars2().setBlockName("emtsolars2"); + public static void registerEMTBlocks() { + shield = new BlockShield().setBlockName("shield"); + portableNode = new BlockPortableNode().setBlockName("portablenode"); + emtSolars = new BlockEMTSolars().setBlockName("emtsolars"); + essentiaGens = new BlockEssentiaGenerators().setBlockName("essentiaGens"); + emtMachines = new BlockEMTMachines().setBlockName("emtmachines"); + emtSolars2 = new BlockEMTSolars2().setBlockName("emtsolars2"); - GameRegistry.registerBlock(shield, "Shield Block"); - GameRegistry.registerBlock(portableNode, "Portable Node"); - GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMT Solar Panels"); - GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "Essentia Generators"); - GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMT Machines"); - GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMT Solars 2"); - } + GameRegistry.registerBlock(shield, "Shield Block"); + GameRegistry.registerBlock(portableNode, "Portable Node"); + GameRegistry.registerBlock(emtSolars, ItemBlockEMTSolars.class, "EMT Solar Panels"); + GameRegistry.registerBlock(essentiaGens, ItemBlockEssentiaGenerators.class, "Essentia Generators"); + GameRegistry.registerBlock(emtMachines, ItemBlockEMTMachines.class, "EMT Machines"); + GameRegistry.registerBlock(emtSolars2, ItemBlockEMTSolars2.class, "EMT Solars 2"); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CommonProxy.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CommonProxy.java index dc7dcd7..b77a174 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CommonProxy.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CommonProxy.java @@ -1,19 +1,16 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; import cpw.mods.fml.common.network.IGuiHandler; import electricMagicTools.tombenpotter.electricmagictools.client.gui.GuiEtherealMacerator; import electricMagicTools.tombenpotter.electricmagictools.client.gui.GuiIndustrialWandRecharger; @@ -21,61 +18,62 @@ import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntity import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerEtheralMacerator; import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerIndustrialWandRecharge; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CommonProxy implements IGuiHandler { - public void load() { - registerRenders(); - } + public void load() { + registerRenders(); + } - public void registerRenders() { - /* Empty in common proxy */ - } + public void registerRenders() { + /* Empty in common 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); - } else { - return null; - } + switch (ID) { + case 0: + if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { + return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity); + } else { + return null; + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } else { + return null; + } + default: + return null; + } + } - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } else { - return null; - } - 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); + } else { + return null; + } + case 1: + if (entity != null && entity instanceof TileEntityEtherealMacerator) { + return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); + } else { + return null; + } + default: + return null; - switch (ID) { - case 0: - if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) { - return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity); - } else { - return null; - } - - case 1: - if (entity != null && entity instanceof TileEntityEtherealMacerator) { - return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity); - } else { - return null; - } - default: - return null; - - } - } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/Config.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/Config.java index 38aea23..9b163e9 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/Config.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/Config.java @@ -1,178 +1,191 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; -import net.minecraftforge.common.config.Configuration; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.common.config.Configuration; public class Config { - public static int essentiaGeneratorsDelay; - 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 essentiaGeneratorsDelay; + 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 double potentiaGenOutput; - public static double arborGenOutput; - public static double auramGenOutput; - public static double ignisGenOutput; - public static double saxumGenOutput; - 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 double potentiaGenOutput; + public static double arborGenOutput; + public static double auramGenOutput; + public static double ignisGenOutput; + public static double saxumGenOutput; + 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 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 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; - 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 int chanceOneRing; + public static int chanceTaintedMjolnir; - public static String CATEGORY_RESEARCH = "Research"; - public static String CATEGORY_VALUES = "Numeric Values"; + 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 void create(FMLPreInitializationEvent event) { - Configuration config = new Configuration(event.getSuggestedConfigurationFile()); - config.addCustomCategoryComment(CATEGORY_VALUES, "The only way to change some numbers that my machines uses."); - config.addCustomCategoryComment(CATEGORY_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."); + public static String CATEGORY_RESEARCH = "Research"; + public static String CATEGORY_VALUES = "Numeric Values"; - config.load(); + public static void create(FMLPreInitializationEvent event) { + Configuration config = new Configuration(event.getSuggestedConfigurationFile()); + config.addCustomCategoryComment(CATEGORY_VALUES, "The only way to change some numbers that my machines uses."); + config.addCustomCategoryComment(CATEGORY_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."); - /** Random Booleans **/ - capesOn = config.get(Configuration.CATEGORY_GENERAL, "Enable showing 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(Configuration.CATEGORY_GENERAL, "Making the tools worth begin used in the 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(Configuration.CATEGORY_GENERAL, "Disable totally the nightvision ability of the Nanosuit Googles of Revealing, " + "Quantum Googles of Revealing and of the Quantum Solar Helmet of Revealing", false).getBoolean(nightVisionOff); - enchanting = config.get(Configuration.CATEGORY_GENERAL, "Enable enchanting my tools and amors", false).getBoolean(enchanting); - smoke = config.get(Configuration.CATEGORY_GENERAL, "Disable the smoke effect for the Electric/Nano/Quantum Boots of the Traveller", false).getBoolean(smoke); - oneRingSpawn = config.get(Configuration.CATEGORY_GENERAL, "Disable the One Ring spawning in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); + config.load(); - /** EU Yield/Consumption modifier **/ - potentiaGenOutput = config.get("Numeric Values", "Potentia Generator EU Output", 3500, "This is the number you have to modify if you want to make the Potentia Generator yield " + "more or less EU per unit of essentia.").getDouble(potentiaGenOutput); - arborGenOutput = config.get("Numeric Values", "Arbor Generator EU Output", 325, "This is the number you have to modify if you want to make the Arbor Generator yield " + "more or less EU per unit of essentia.").getDouble(arborGenOutput); - auramGenOutput = config.get("Numeric Values", "Auram Generator EU Output", 3200, "This is the number you have to modify if you want to make the Auram Generator yield " + "more or less EU per unit of essentia.").getDouble(auramGenOutput); - ignisGenOutput = config.get("Numeric Values", "Ignis Generator EU Output", 3200, "This is the number you have to modify if you want to make the Ignis Generator yield " + "more or less EU per unit of essentia.").getDouble(ignisGenOutput); - saxumGenOutput = config.get("Numeric Values", "Saxum Generator Output", 350, "This is the number you have to modify if you want to make the Saxum Generator yield " + "more or less EU per unit of essentia.").getDouble(saxumGenOutput); - wandChargerConsumption = config.get("Numeric Values", "Industrial Wand Charging Station EU 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("Numeric Values", "Compressed Solar Panel EU 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("Numeric Values", "Double Compressed Solar Panel EU 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("Numeric Values", "Triple Compressed Solar Panel EU 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); - essentiaGeneratorsDelay = config.get("Numeric Values", "Essentia Generators draw rate", 120, "The number of ticks the Essentia Generators wait before using 2 Essentia. " + "If you want them to be slower, increase the number.").getInt(essentiaGeneratorsDelay); - nanoBootsSpeed = config.get("Numeric Values", "Speed of the Nano Boots of the Traveller", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); - quantumBootsSpeed = config.get("Numeric Values", "Speed of the Quantum Boots of the Traveller", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); - nanoBootsJump = config.get("Numeric Values", "Jump height for the Nano Boots of the Traveller", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - quantumBootsJump = config.get("Numeric Values", "Jump height for the Quantum Boots of the Traveller", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); - etherealProcessorBaseSpeed = config.get("Numeric Values", "Base Time the Etheral Processor takes to process a single item in number of ticks.", 400).getInt(); - etherealProcessorBonus = config.get("Numeric 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("Numeric Values", "Wand Focus: Charge production in EU/T", 64).getInt(); - armorBaubleProduction = config.get("Numeric Values", "Armor Charging Ring produciton in EU/T", 32).getInt(); - inventoryBaubleProdution = config.get("Numeric Values", "Inventory Charging Ring produciton in EU/T", 32).getInt(); - wandChargeFocusCost = config.get("Numeric Values", "Wand Focus: Wand Charging Cost in EU/T", 40000).getInt(); + /** Random Booleans **/ + capesOn = config.get(Configuration.CATEGORY_GENERAL, "Enable showing 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(Configuration.CATEGORY_GENERAL, "Making the tools worth begin used in the 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(Configuration.CATEGORY_GENERAL, "Disable totally the nightvision ability of the Nanosuit Googles of Revealing, " + "Quantum Googles of Revealing and of the Quantum Solar Helmet of Revealing", 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(Configuration.CATEGORY_GENERAL, "Enable enchanting my tools and amors", false, "Warning: the enchantability is low.").getBoolean(enchanting); + smoke = config.get(Configuration.CATEGORY_GENERAL, "Disable the smoke effect for the Electric/Nano/Quantum Boots of the Traveller", false, "This effect only appears when the player isn't on the ground").getBoolean(smoke); + oneRingSpawn = config.get(Configuration.CATEGORY_GENERAL, "Disable the One Ring spawning in dungeon chests", false, "There is no other way to get this item.").getBoolean(oneRingSpawn); + chanceTaintedMjolnir = config.get(Configuration.CATEGORY_GENERAL, "Chance for the Tainted Mjolnir to spawn inside of dungeon chests", 25, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + chanceOneRing = config.get(Configuration.CATEGORY_GENERAL, "Chance for The One Ring to spawn inside of dungeon chests", 15, "If you have a lot of mods adding dungeon loot, you should definetely increase this").getInt(); + removeAmberAndCinnabarMacerating = config.get(Configuration.CATEGORY_GENERAL, "Remove Existing Amber and Cinnabar Macerating Recipes", true, "This is here because of conflicts between mods that add the same input and different outputs").getBoolean(removeAmberAndCinnabarMacerating); - /** Disable Researches **/ - 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); + /** EU Yield/Consumption modifier **/ + potentiaGenOutput = config.get("Numeric Values", "Potentia Generator EU Output", 3500, "This is the number you have to modify if you want to make the Potentia Generator yield " + "more or less EU per unit of essentia.").getDouble(potentiaGenOutput); + arborGenOutput = config.get("Numeric Values", "Arbor Generator EU Output", 325, "This is the number you have to modify if you want to make the Arbor Generator yield " + "more or less EU per unit of essentia.").getDouble(arborGenOutput); + auramGenOutput = config.get("Numeric Values", "Auram Generator EU Output", 3200, "This is the number you have to modify if you want to make the Auram Generator yield " + "more or less EU per unit of essentia.").getDouble(auramGenOutput); + ignisGenOutput = config.get("Numeric Values", "Ignis Generator EU Output", 3200, "This is the number you have to modify if you want to make the Ignis Generator yield " + "more or less EU per unit of essentia.").getDouble(ignisGenOutput); + saxumGenOutput = config.get("Numeric Values", "Saxum Generator Output", 350, "This is the number you have to modify if you want to make the Saxum Generator yield " + "more or less EU per unit of essentia.").getDouble(saxumGenOutput); + wandChargerConsumption = config.get("Numeric Values", "Industrial Wand Charging Station EU 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("Numeric Values", "Compressed Solar Panel EU 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("Numeric Values", "Double Compressed Solar Panel EU 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("Numeric Values", "Triple Compressed Solar Panel EU 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); + essentiaGeneratorsDelay = config.get("Numeric Values", "Essentia Generators draw rate", 120, "The number of ticks the Essentia Generators wait before using 2 Essentia. " + "If you want them to be slower, increase the number.").getInt(essentiaGeneratorsDelay); + nanoBootsSpeed = config.get("Numeric Values", "Speed of the Nano Boots of the Traveller", 0.25, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsSpeed); + quantumBootsSpeed = config.get("Numeric Values", "Speed of the Quantum Boots of the Traveller", 0.5, "Watch out, that goes up REALLY quickly.").getDouble(quantumBootsSpeed); + nanoBootsJump = config.get("Numeric Values", "Jump height for the Nano Boots of the Traveller", 0.6, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + quantumBootsJump = config.get("Numeric Values", "Jump height for the Quantum Boots of the Traveller", 0.9, "Watch out, that goes up REALLY quickly.").getDouble(nanoBootsJump); + etherealProcessorBaseSpeed = config.get("Numeric Values", "Base Time the Etheral Processor takes to process a single item in number of ticks.", 400, "Default is 400, the double of a regular furnace").getInt(); + etherealProcessorBonus = config.get("Numeric 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("Numeric Values", "Wand Focus: Charge production in EU/T", 64, "Default is 64").getInt(); + armorBaubleProduction = config.get("Numeric Values", "Armor Charging Ring produciton in EU/T", 32, "Default is 32").getInt(); + inventoryBaubleProdution = config.get("Numeric Values", "Inventory Charging Ring produciton in EU/T", 32, "Default is 32").getInt(); + wandChargeFocusCost = config.get("Numeric Values", "Wand Focus: Wand Charging Cost in EU/T", 40000, "Default is 40000").getInt(); - config.save(); - } + /** Disable Researches **/ + 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); + + config.save(); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CreativeTab.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CreativeTab.java index 60e03a3..77f07a9 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CreativeTab.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/CreativeTab.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -15,10 +15,10 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class CreativeTab { - public static CreativeTabs tabTombenpotter = new CreativeTabs("Electro-Magic Tools") { - @Override - public Item getTabIconItem() { - return ItemRegistry.thaumiumDrill; - } - }; + public static CreativeTabs tabTombenpotter = new CreativeTabs("Electro-Magic Tools") { + @Override + public Item getTabIconItem() { + return ItemRegistry.thaumiumDrill; + } + }; } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/DungeonChestGenerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/DungeonChestGenerator.java new file mode 100644 index 0000000..540c79e --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/DungeonChestGenerator.java @@ -0,0 +1,18 @@ +package electricMagicTools.tombenpotter.electricmagictools.common; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraftforge.common.ChestGenHooks; + +public class DungeonChestGenerator { + + public static void generateLoot() { + if (Config.thorHammerResearch == false) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.taintedThorHammer), 0, 1, Config.chanceTaintedMjolnir)); + } + if (Config.oneRingSpawn == false) { + ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.emtBauble, 1, 2), 0, 1, Config.chanceOneRing)); + } + } + +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEntityRegistry.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEntityRegistry.java index e712de9..acfec60 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEntityRegistry.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEntityRegistry.java @@ -1,50 +1,50 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; +import cpw.mods.fml.common.registry.EntityRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityArcher; +import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityList.EntityEggInfo; import net.minecraft.entity.EntityLiving; -import cpw.mods.fml.common.registry.EntityRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityArcher; -import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; public class EMTEntityRegistry { - private static int startEID = 300; - private static int entityIDs = 0; - private static final Class ARCHER_CLASS = EntityArcher.class; + private static int startEID = 300; + private static int entityIDs = 0; + private static final Class ARCHER_CLASS = EntityArcher.class; - 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() { - EntityRegistry.registerModEntity(EntityLaser.class, "entityLaser", entityIDs++, ElectricMagicTools.instance, 80, 3, true); - EntityRegistry.registerModEntity(EntityArcher.class, "entityArcher", entityIDs++, ElectricMagicTools.instance, 80, 3, true); - registerEntityEgg(ARCHER_CLASS, 0x99111F, 0xE5685); - } + EntityRegistry.registerModEntity(EntityLaser.class, "entityLaser", entityIDs++, ElectricMagicTools.instance, 80, 3, true); + EntityRegistry.registerModEntity(EntityArcher.class, "entityArcher", entityIDs++, ElectricMagicTools.instance, 80, 3, true); + registerEntityEgg(ARCHER_CLASS, 0x99111F, 0xE5685); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEventHandler.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEventHandler.java index 4d092dd..c820a05 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEventHandler.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTEventHandler.java @@ -1,34 +1,38 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; 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 cpw.mods.fml.common.eventhandler.SubscribeEvent; +import thaumcraft.common.entities.monster.EntityTaintChicken; public class EMTEventHandler { - @SubscribeEvent - public void onEntityLivingDrops(LivingDropsEvent event) { - if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { - if (event.entityLiving instanceof EntityCreeper) { - EntityCreeper creeper = (EntityCreeper) event.entityLiving; - if (creeper.getPowered()) { - event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(ItemRegistry.lightningSummoner))); - } - } - } - } + @SubscribeEvent + public void onEntityLivingDrops(LivingDropsEvent event) { + if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) { + if (event.entityLiving instanceof EntityCreeper) { + EntityCreeper creeper = (EntityCreeper) event.entityLiving; + if (creeper.getPowered()) { + event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(ItemRegistry.itemEMTItems, 1, 6))); + } + } + if (event.entityLiving instanceof EntityTaintChicken) { + event.drops.add(new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(ItemRegistry.itemEMTItems, 1, 14))); + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTResearchItem.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTResearchItem.java index 8d770bd..9d8176c 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTResearchItem.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/EMTResearchItem.java @@ -1,25 +1,27 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- - * + * * Attention: this class originally belongs to the ThaumicTinkerer mod. * All I did was modifying it to fulfill my needs. - * + * * ThaumicTinkerer is Open Source and distributed under a * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * + * * http://www.minecraftforum.net/topic/1813058- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; @@ -27,54 +29,52 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.research.ResearchItem; import thaumcraft.api.research.ResearchPage; import thaumcraft.api.research.ResearchPage.PageType; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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 StatCollector.translateToLocal(key); - } + @Override + @SideOnly(Side.CLIENT) + public String getName() { + return StatCollector.translateToLocal(key); + } - @Override - @SideOnly(Side.CLIENT) - public String getText() { - return StatCollector.translateToLocal("[EMT] ") + StatCollector.translateToLocal("emt.tag." + key); - } + @Override + @SideOnly(Side.CLIENT) + public String getText() { + return StatCollector.translateToLocal("[EMT] ") + StatCollector.translateToLocal("emt.tag." + key); + } - @Override - public ResearchItem setPages(ResearchPage... par) { - for (ResearchPage page : par) { - if (page.type == PageType.TEXT) - page.text = "emt.text." + key; + @Override + public ResearchItem setPages(ResearchPage... par) { + for (ResearchPage page : par) { + 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(par); - } + return super.setPages(par); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ElectricMagicTools.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ElectricMagicTools.java index d94ed44..51bb5f8 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ElectricMagicTools.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ElectricMagicTools.java @@ -1,20 +1,17 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -28,81 +25,99 @@ import electricMagicTools.tombenpotter.electricmagictools.client.CapeEventHandle import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTInitRecipes; import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTPostInitRecipes; import electricMagicTools.tombenpotter.electricmagictools.common.recipes.UuMInfusionRecipes; +import net.minecraftforge.common.MinecraftForge; -@Mod(modid = ElectricMagicTools.modid, name = "Electro-MagicTools", version = "1.1.0", dependencies = "required-after:Thaumcraft ; required-after:IC2") +@Mod(modid = ElectricMagicTools.modid, name = "Electro-MagicTools", version = "1.1.1", dependencies = "required-after:Thaumcraft ; required-after:IC2") public class ElectricMagicTools { - @SidedProxy(clientSide = "electricMagicTools.tombenpotter.electricmagictools.client.ClientProxy", serverSide = "electricMagicTools.tombenpotter.electricmagictools.common.CommonProxy") - public static CommonProxy proxy; - @Instance(ElectricMagicTools.modid) - public static ElectricMagicTools instance; + @SidedProxy(clientSide = "electricMagicTools.tombenpotter.electricmagictools.client.ClientProxy", serverSide = "electricMagicTools.tombenpotter.electricmagictools.common.CommonProxy") + public static CommonProxy proxy; + @Instance(ElectricMagicTools.modid) + public static ElectricMagicTools instance; - public static final String modid = "Electro-MagicTools"; + public static final String modid = "Electro-MagicTools"; + public static final String texturePath = "electricmagictools"; - @EventHandler - public void preInit(FMLPreInitializationEvent event) { - /** Creating the config file **/ - Config.create(event); + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + FMLLog.info("[EMT] Electro-Magic Tools : Starting planning the world domination"); - /** Items Registry **/ - ItemRegistry.registerEMTItems(); + /** Creating the config file **/ + FMLLog.info("[EMT] Electro-Magic Tools : Creating/Reading the config file"); + Config.create(event); - /** Blocks registry **/ - BlockRegistry.registerEMTBlocks(); + /** Items Registry **/ + FMLLog.info("[EMT] Electro-Magic Tools : Registering the mod items"); + ItemRegistry.registerEMTItems(); - System.out.println("[EMT] Electro-Magic Tools : Successful PreInit"); - } + /** Blocks registry **/ + FMLLog.info("[EMT] Electro-Magic Tools : Registering the mod blocks"); + BlockRegistry.registerEMTBlocks(); - @EventHandler - public void load(FMLInitializationEvent event) { - /** Loading the proxies **/ - proxy.load(); + FMLLog.info("[EMT] Electro-Magic Tools : Planning complete"); + } - /** Making mobs drop additional items **/ - MinecraftForge.EVENT_BUS.register(new EMTEventHandler()); + @EventHandler + public void load(FMLInitializationEvent event) { + FMLLog.info("[EMT] Electro-Magic Tools : Starting gathering allies"); - /** Tile entities registry **/ - TileEntityRegistry.registerEMTTileEntites(); + /** Loading the proxies **/ + FMLLog.info("[EMT] Electro-Magic Tools : Loading the proxies"); + proxy.load(); - /** Generating in dungeon chests **/ - if (Config.thorHammerResearch == false) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.taintedThorHammer), 1, 1, 5)); - } - if (Config.oneRingSpawn == false) { - ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemRegistry.emtBauble, 1, 2), 1, 1, 3)); - } + /** Making mobs drop additional items **/ + FMLLog.info("[EMT] Electro-Magic Tools : Making mobs drop additional items"); + MinecraftForge.EVENT_BUS.register(new EMTEventHandler()); - /** Adding the recipes that go in Init **/ - EMTInitRecipes.add(); + /** Tile entities registry **/ + FMLLog.info("[EMT] Electro-Magic Tools : Registering Tile entities"); + TileEntityRegistry.registerEMTTileEntites(); - /** Entities Registry **/ - EMTEntityRegistry.registerEMTEntities(); + /** Generating loot in dungeon chests **/ + FMLLog.info("[EMT] Electro-Magic Tools : Generating loot in dungeon chests"); + DungeonChestGenerator.generateLoot(); - /** GUI Handler Registry **/ - NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); + /** Adding the recipes that go in Init **/ + FMLLog.info("[EMT] Electro-Magic Tools : Adding the Init recipes"); + EMTInitRecipes.add(); - /** Adds Capes **/ - if (event.getSide() == Side.CLIENT && Config.capesOn == true) { - MinecraftForge.EVENT_BUS.register(new CapeEventHandler()); - } + /** Entities Registry **/ + FMLLog.info("[EMT] Electro-Magic Tools : Registering entities"); + EMTEntityRegistry.registerEMTEntities(); - System.out.println("[EMT] Electro-Magic Tools : Successful Init"); - } + /** GUI Handler Registry **/ + FMLLog.info("[EMT] Electro-Magic Tools : Registering the GUI Handler"); + NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy); - @EventHandler - public void postInit(FMLPostInitializationEvent event) { - /** Adding the recipes that go in PostInit **/ - EMTPostInitRecipes.add(); + /** Adds Capes **/ + if (event.getSide() == Side.CLIENT && Config.capesOn == true) { + FMLLog.info("[EMT] Electro-Magic Tools : Adding capes"); + MinecraftForge.EVENT_BUS.register(new CapeEventHandler()); + } - /** Adding the UU-Matter Infusion recipes **/ - UuMInfusionRecipes.add(); + FMLLog.info("[EMT] Electro-Magic Tools : Allies gathered."); + } - /** Adding the EMT research tab to the Thaumonomicon **/ - ThaumonomiconResearch.addResearchTab(); + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + FMLLog.info("[EMT] Electro-Magic Tools : Starting the world takeover"); - /** Adding the actual research to the game **/ - ThaumonomiconResearch.addResearch(); + /** Adding the recipes that go in PostInit **/ + FMLLog.info("[EMT] Electro-Magic Tools : Adding PostInit recipes"); + EMTPostInitRecipes.add(); - System.out.println("[EMT] Electro-Magic Tools : Successful PostInit"); - } + /** Adding the UU-Matter Infusion recipes **/ + FMLLog.info("[EMT] Electro-Magic Tools : Adding the UU-Matter Infusion recipes"); + UuMInfusionRecipes.add(); + + /** Adding the EMT research tab to the Thaumonomicon **/ + FMLLog.info("[EMT] Electro-Magic Tools : Adding the EMT research tab to the Thaumonomicon"); + ThaumonomiconResearch.addResearchTab(); + + /** Adding the actual research to the game **/ + FMLLog.info("[EMT] Electro-Magic Tools : Adding research to the game"); + ThaumonomiconResearch.addResearch(); + + FMLLog.info("[EMT] Electro-Magic Tools : World takeover complete. Enjoy!"); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ItemRegistry.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ItemRegistry.java index c4b3c4c..97b8658 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ItemRegistry.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ItemRegistry.java @@ -1,139 +1,135 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; -import net.minecraft.item.Item; import cpw.mods.fml.common.registry.GameRegistry; import electricMagicTools.tombenpotter.electricmagictools.common.items.ItemEMTBaubles; import electricMagicTools.tombenpotter.electricmagictools.common.items.ItemEMTItems; import electricMagicTools.tombenpotter.electricmagictools.common.items.ItemElectricScribingTools; -import electricMagicTools.tombenpotter.electricmagictools.common.items.ItemLightningSummoner; -import electricMagicTools.tombenpotter.electricmagictools.common.items.ItemThaumiumPlate; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemElectricBootsTraveller; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemElectricGoggles; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemNanoBootsTraveller; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemNanoThaumicHelmet; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemQuantumBootsTraveller; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemQuantumThaumicHelmet; -import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.ItemSolarHelmetRevealing; -import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.ItemChargeFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.ItemChristmasFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.ItemExplosionFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.ItemShieldFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.ItemWandChargingFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemDiamondChainsaw; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemElectricHoeGrowth; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemOmnitoolDiamond; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemOmnitoolIron; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemOmnitoolThaumium; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemRockbreakerDrill; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemStreamChainsaw; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemThaumiumChainsaw; -import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.ItemThaumiumDrill; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots.ItemElectricBootsTraveller; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots.ItemNanoBootsTraveller; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots.ItemQuantumBootsTraveller; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles.ItemElectricGoggles; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles.ItemNanoThaumicHelmet; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles.ItemQuantumThaumicHelmet; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles.ItemSolarHelmetRevealing; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings.ItemFeatherWing; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings.ItemNanoWing; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings.ItemQuantumWing; +import electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings.ItemThaumiumReinforcedWing; +import electricMagicTools.tombenpotter.electricmagictools.common.items.foci.*; +import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.*; import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer.ItemElectricThorHammer; import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer.ItemTaintedThorHammer; import electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer.ItemThorHammer; +import net.minecraft.item.Item; public class ItemRegistry { - 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 thaumiumPlate; - public static Item solarHelmetRevealing; - public static Item thorHammer; - public static Item taintedThorHammer; - public static Item electricThorHammer; - public static Item lightningSummoner; - 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 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 void registerEMTItems() { - thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName("thaumiumdrill"); - thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName("thaumiumchainsaw"); - quantumThaumicHelmet = new ItemQuantumThaumicHelmet(3, 0).setUnlocalizedName("quantumthaumichelmet"); - diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName("diamondchainsaw"); - ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName("ironomnitool"); - diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName("diamondomnitool"); - thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName("thaumiumomnitool"); - nanoThaumicHelmet = new ItemNanoThaumicHelmet(3, 0).setUnlocalizedName("nanothaumichelmet"); - explosionFocus = new ItemExplosionFocus().setUnlocalizedName("laserfocus"); - christmasFocus = new ItemChristmasFocus().setUnlocalizedName("christmasfocus"); - shieldFocus = new ItemShieldFocus().setUnlocalizedName("shieldfocus"); - electricGoggles = new ItemElectricGoggles(3, 0).setUnlocalizedName("electricgoggles"); - streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName("streamchainsaw"); - rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName("rockbreakerdrill"); - thaumiumPlate = new ItemThaumiumPlate().setUnlocalizedName("thaumiumplate"); - solarHelmetRevealing = new ItemSolarHelmetRevealing(3, 0).setUnlocalizedName("solarhelmetrevealing"); - thorHammer = new ItemThorHammer().setUnlocalizedName("hammerthor"); - taintedThorHammer = new ItemTaintedThorHammer().setUnlocalizedName("taintedthorhammer"); - lightningSummoner = new ItemLightningSummoner().setUnlocalizedName("lightningsummoner"); - electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName("electricthorhammer"); - electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName("electricboots"); - nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName("nanobootstraveller"); - quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName("quantumbootstraveller"); - electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName("electricscribingtools"); - itemEMTItems = new ItemEMTItems().setUnlocalizedName("itememtitems"); - electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName("electrichoeofgrowth"); - chargeFocus = new ItemChargeFocus().setUnlocalizedName("chargefocus"); - emtBauble = new ItemEMTBaubles().setUnlocalizedName("emtbauble"); - wandChargeFocus = new ItemWandChargingFocus().setUnlocalizedName("wandchargefocus"); + public static void registerEMTItems() { + thaumiumDrill = new ItemThaumiumDrill().setUnlocalizedName("thaumiumdrill"); + thaumiumChainsaw = new ItemThaumiumChainsaw().setUnlocalizedName("thaumiumchainsaw"); + quantumThaumicHelmet = new ItemQuantumThaumicHelmet(3, 0).setUnlocalizedName("quantumthaumichelmet"); + diamondChainsaw = new ItemDiamondChainsaw().setUnlocalizedName("diamondchainsaw"); + ironOmnitool = new ItemOmnitoolIron().setUnlocalizedName("ironomnitool"); + diamondOmnitool = new ItemOmnitoolDiamond().setUnlocalizedName("diamondomnitool"); + thaumiumOmnitool = new ItemOmnitoolThaumium().setUnlocalizedName("thaumiumomnitool"); + nanoThaumicHelmet = new ItemNanoThaumicHelmet(3, 0).setUnlocalizedName("nanothaumichelmet"); + explosionFocus = new ItemExplosionFocus().setUnlocalizedName("laserfocus"); + christmasFocus = new ItemChristmasFocus().setUnlocalizedName("christmasfocus"); + shieldFocus = new ItemShieldFocus().setUnlocalizedName("shieldfocus"); + electricGoggles = new ItemElectricGoggles(3, 0).setUnlocalizedName("electricgoggles"); + streamChainsaw = new ItemStreamChainsaw().setUnlocalizedName("streamchainsaw"); + rockbreakerDrill = new ItemRockbreakerDrill().setUnlocalizedName("rockbreakerdrill"); + solarHelmetRevealing = new ItemSolarHelmetRevealing(3, 0).setUnlocalizedName("solarhelmetrevealing"); + thorHammer = new ItemThorHammer().setUnlocalizedName("hammerthor"); + taintedThorHammer = new ItemTaintedThorHammer().setUnlocalizedName("taintedthorhammer"); + electricThorHammer = new ItemElectricThorHammer().setUnlocalizedName("electricthorhammer"); + electricBootsTraveller = new ItemElectricBootsTraveller(3, 3).setUnlocalizedName("electricboots"); + nanoBootsTraveller = new ItemNanoBootsTraveller(3, 3).setUnlocalizedName("nanobootstraveller"); + quantumBootsTraveller = new ItemQuantumBootsTraveller(3, 3).setUnlocalizedName("quantumbootstraveller"); + electricScribingTools = new ItemElectricScribingTools().setUnlocalizedName("electricscribingtools"); + itemEMTItems = new ItemEMTItems().setUnlocalizedName("itememtitems"); + electricHoeGrowth = new ItemElectricHoeGrowth().setUnlocalizedName("electrichoeofgrowth"); + chargeFocus = new ItemChargeFocus().setUnlocalizedName("chargefocus"); + emtBauble = new ItemEMTBaubles().setUnlocalizedName("emtbauble"); + wandChargeFocus = new ItemWandChargingFocus().setUnlocalizedName("wandchargefocus"); + featherWing = new ItemFeatherWing().setUnlocalizedName("featherwing"); + thaumiumWing = new ItemThaumiumReinforcedWing().setUnlocalizedName("thaumiumwing"); + nanoWing = new ItemNanoWing().setUnlocalizedName("nanowing"); + quantumWing = new ItemQuantumWing().setUnlocalizedName("quantumwing"); - GameRegistry.registerItem(thaumiumDrill, "Thaumium Drill"); - GameRegistry.registerItem(thaumiumChainsaw, "Thaumium Chainsaw"); - GameRegistry.registerItem(quantumThaumicHelmet, "Quantum Goggles of Revealing"); - GameRegistry.registerItem(diamondChainsaw, "Diamond Chainsaw"); - GameRegistry.registerItem(ironOmnitool, "Omnitool"); - GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); - GameRegistry.registerItem(thaumiumOmnitool, "Thaumium Omnitool"); - GameRegistry.registerItem(nanoThaumicHelmet, "Nanosuit Goggles of Revealing"); - GameRegistry.registerItem(explosionFocus, "Wand Focus: Explosion"); - GameRegistry.registerItem(christmasFocus, "Wand Focus : Kris-tmas"); - GameRegistry.registerItem(shieldFocus, "Wand Focus : Shield"); - GameRegistry.registerItem(electricGoggles, "Electric Goggles of Revealing"); - GameRegistry.registerItem(streamChainsaw, "Chainsaw of the Stream"); - GameRegistry.registerItem(rockbreakerDrill, "Drill of the Rockbreaker"); - GameRegistry.registerItem(thaumiumPlate, "Thaumium Plate"); - GameRegistry.registerItem(solarHelmetRevealing, "Quantum Solar Helmet of Revealing"); - GameRegistry.registerItem(thorHammer, "Mjolnir"); - GameRegistry.registerItem(taintedThorHammer, "Broken Relic of Mjolnir"); - GameRegistry.registerItem(lightningSummoner, "Lightning Summoner"); - GameRegistry.registerItem(electricThorHammer, "Supercharged Mjolnir"); - GameRegistry.registerItem(electricBootsTraveller, "Electric Boots of the Traveller"); - GameRegistry.registerItem(nanoBootsTraveller, "Nano Boots of the Traveller"); - GameRegistry.registerItem(quantumBootsTraveller, "Quantum Boots of the Traveller"); - GameRegistry.registerItem(electricScribingTools, "Electric Scribing Tools"); - GameRegistry.registerItem(electricHoeGrowth, "Electric Hoe of Growth"); - GameRegistry.registerItem(chargeFocus, "Wand Focus: Charging"); - GameRegistry.registerItem(itemEMTItems, "EMT Items"); - GameRegistry.registerItem(emtBauble, "EMT Baubles"); - GameRegistry.registerItem(wandChargeFocus, "Wand Focus: Wand Charging"); - } + GameRegistry.registerItem(thaumiumDrill, "Thaumium Drill"); + GameRegistry.registerItem(thaumiumChainsaw, "Thaumium Chainsaw"); + GameRegistry.registerItem(quantumThaumicHelmet, "Quantum Goggles of Revealing"); + GameRegistry.registerItem(diamondChainsaw, "Diamond Chainsaw"); + GameRegistry.registerItem(ironOmnitool, "Omnitool"); + GameRegistry.registerItem(diamondOmnitool, "Diamond Omnitool"); + GameRegistry.registerItem(thaumiumOmnitool, "Thaumium Omnitool"); + GameRegistry.registerItem(nanoThaumicHelmet, "Nanosuit Goggles of Revealing"); + GameRegistry.registerItem(explosionFocus, "Wand Focus: Explosion"); + GameRegistry.registerItem(christmasFocus, "Wand Focus : Kris-tmas"); + GameRegistry.registerItem(shieldFocus, "Wand Focus : Shield"); + GameRegistry.registerItem(electricGoggles, "Electric Goggles of Revealing"); + GameRegistry.registerItem(streamChainsaw, "Chainsaw of the Stream"); + GameRegistry.registerItem(rockbreakerDrill, "Drill of the Rockbreaker"); + GameRegistry.registerItem(solarHelmetRevealing, "Quantum Solar Helmet of Revealing"); + GameRegistry.registerItem(thorHammer, "Mjolnir"); + GameRegistry.registerItem(taintedThorHammer, "Broken Relic of Mjolnir"); + GameRegistry.registerItem(electricThorHammer, "Supercharged Mjolnir"); + GameRegistry.registerItem(electricBootsTraveller, "Electric Boots of the Traveller"); + GameRegistry.registerItem(nanoBootsTraveller, "Nano Boots of the Traveller"); + GameRegistry.registerItem(quantumBootsTraveller, "Quantum Boots of the Traveller"); + GameRegistry.registerItem(electricScribingTools, "Electric Scribing Tools"); + GameRegistry.registerItem(electricHoeGrowth, "Electric Hoe of Growth"); + GameRegistry.registerItem(chargeFocus, "Wand Focus: Charging"); + GameRegistry.registerItem(itemEMTItems, "EMT Items"); + GameRegistry.registerItem(emtBauble, "EMT Baubles"); + GameRegistry.registerItem(wandChargeFocus, "Wand Focus: Wand Charging"); + GameRegistry.registerItem(featherWing, "Feather Wing"); + GameRegistry.registerItem(thaumiumWing, "Thaumium Reinforced Wing"); + GameRegistry.registerItem(nanoWing, "Nanosuit Wing"); + GameRegistry.registerItem(quantumWing, "Quantum Wing"); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/State of things.txt b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/State of things.txt deleted file mode 100644 index 440c5a2..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/State of things.txt +++ /dev/null @@ -1,12 +0,0 @@ -This .txt file is here so that I don't randomly forget to add stuff where it is needed. -Consider this as a TODO list. - - -Items---------------------------------------------------------------------------------------------------- -Iridium Wand cap-- 15% discount for everything -Rubberwood wand core-- Dunno yet - -Blocks--------------------------------------------------------------------------------------------------- -Electric deconstruction table-- A block that will decompose aspects faster, and be able to store more than one. -Unwanted Node Generator-- An advanced version of the generators that basically acts as a "trash can" for unwanted nodes? It accepts a node in a jar and consumes it, adding the power stored (based on aspects) to an internal battery? -Magical Windmillz diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ThaumonomiconResearch.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ThaumonomiconResearch.java index 0bde5d5..e76b6b8 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ThaumonomiconResearch.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/ThaumonomiconResearch.java @@ -1,16 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common; +import electricMagicTools.tombenpotter.electricmagictools.common.lib.ResearchAspects; +import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTInitRecipes; +import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTPostInitRecipes; +import electricMagicTools.tombenpotter.electricmagictools.common.recipes.UuMInfusionRecipes; import ic2.api.item.IC2Items; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; @@ -18,351 +22,369 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.research.ResearchCategories; import thaumcraft.api.research.ResearchItem; import thaumcraft.api.research.ResearchPage; -import electricMagicTools.tombenpotter.electricmagictools.common.lib.ResearchAspects; -import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTInitRecipes; -import electricMagicTools.tombenpotter.electricmagictools.common.recipes.EMTPostInitRecipes; -import electricMagicTools.tombenpotter.electricmagictools.common.recipes.UuMInfusionRecipes; public class ThaumonomiconResearch { - public static void addResearchTab() { - ResourceLocation background = new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png"); - ResearchCategories.registerCategory("EMT", new ResourceLocation("electricmagictools:textures/misc/emt.png"), background); - } + public static void addResearchTab() { + ResourceLocation background = new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png"); + ResearchCategories.registerCategory("EMT", new ResourceLocation("electricmagictools:textures/misc/emt.png"), background); + } - public static void addResearch() { - ResearchItem research; - String text; - // String text2; + public static void addResearch() { + ResearchItem research; + String text; + // String text2; - /** Research that can't be disabled **/ - text = "1"; - research = new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electricmagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text)); + /** Research that can't be disabled **/ + text = "1"; + research = new EMTResearchItem("Electric Magic Tools", "EMT", new AspectList(), 0, 0, 0, new ResourceLocation("electricmagictools:textures/misc/emt.png")).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text)); - text = "1"; - research = new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(ItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.diamondChainsaw)); + text = "1"; + research = new EMTResearchItem("Diamond Chainsaw", "EMT", new AspectList(), 5, -6, 0, new ItemStack(ItemRegistry.diamondChainsaw)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.diamondChainsaw)); - text = "1"; - research = new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(ItemRegistry.thaumiumPlate)).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumPlate)); + text = "1"; + research = new EMTResearchItem("Thaumium Plate", "EMT", new AspectList(), 6, -6, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 5)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumPlate)); - text = "1"; - research = new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text)); + text = "1"; + research = new EMTResearchItem("Macerating Native Ore Clusters", "EMT", new AspectList(), 5, -7, 0, IC2Items.getItem("smallGoldDust")).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text)); - text = "1"; - research = new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(ItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text)); + text = "1"; + research = new EMTResearchItem("The Legend", "EMT", new AspectList(), 5, -5, 0, new ItemStack(ItemRegistry.taintedThorHammer)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text)); - text = "1"; - research = new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(ItemRegistry.lightningSummoner)).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text)); + text = "1"; + research = new EMTResearchItem("Lightning Summoner", "EMT", new AspectList(), 6, -5, 0, new ItemStack(ItemRegistry.itemEMTItems, 1, 6)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text)); - text = "1"; - research = new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(ItemRegistry.emtBauble, 1, 2)).setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text)); + text = "1"; + research = new EMTResearchItem("The One Ring", "EMT", new AspectList(), 6, -7, 0, new ItemStack(ItemRegistry.emtBauble, 1, 2)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text)); - /** Research that can be disabled **/ - if (Config.thaumiumDrillResearch == false) { - text = "1"; - research = new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(ItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumDrill)); - } + text = "1"; + research = new EMTResearchItem("Feather Wings", "EMT", new AspectList(), 0, 2, 0, new ItemStack(ItemRegistry.featherWing)).setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.rubberBall), new ResearchPage(EMTInitRecipes.ductTape), new ResearchPage(EMTInitRecipes.featherMesh), new ResearchPage(EMTInitRecipes.cardboard), new ResearchPage(EMTInitRecipes.featherWing), new ResearchPage(EMTInitRecipes.featherWings)); - if (Config.thaumiumChainsawResearch == false) { - text = "1"; - research = new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(ItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumChainsaw)); - } + /** Research that can be disabled **/ + if (Config.thaumiumDrillResearch == false) { + text = "1"; + research = new EMTResearchItem("Thaumium Drill", "EMT", ResearchAspects.thaumiumDrillResearch, -1, -2, 1, new ItemStack(ItemRegistry.thaumiumDrill)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumDrill)); + } - if (Config.electricGooglesResearch == false) { - text = "1"; - research = new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(ItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricGoggles)); - } + if (Config.thaumiumChainsawResearch == false) { + text = "1"; + research = new EMTResearchItem("Thaumium Chainsaw", "EMT", ResearchAspects.thaumiumChainsawResearch, -2, -2, 1, new ItemStack(ItemRegistry.thaumiumChainsaw)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumChainsaw)); + } - if (Config.electricGooglesResearch == false) { - if (Config.nanoGooglesResearch == false) { - text = "1"; - research = new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(ItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicNanoHelmet)); - } - } + if (Config.electricGooglesResearch == false) { + text = "1"; + research = new EMTResearchItem("Electric Goggles", "EMT", ResearchAspects.electricGogglesResearch, 1, -2, 1, new ItemStack(ItemRegistry.electricGoggles)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricGoggles)); + } - if (Config.electricGooglesResearch == false) { - if (Config.nanoGooglesResearch == false) { - if (Config.quantumGooglesResearch == false) { - text = "1"; - research = new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(ItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicQuantumHelmet)); - } - } - } + if (Config.electricGooglesResearch == false) { + if (Config.nanoGooglesResearch == false) { + text = "1"; + research = new EMTResearchItem("Nanosuit Goggles of Revealing", "EMT", ResearchAspects.thaumicNanoHelmet, 2, -2, 2, new ItemStack(ItemRegistry.nanoThaumicHelmet)).setParents("Electric Goggles").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicNanoHelmet)); + } + } - if (Config.ironOmnitoolResearch == false) { - text = "1"; - research = new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(ItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.ironOmnitool)); - } + if (Config.electricGooglesResearch == false) { + if (Config.nanoGooglesResearch == false) { + if (Config.quantumGooglesResearch == false) { + text = "1"; + research = new EMTResearchItem("Quantum Goggles of Revealing", "EMT", ResearchAspects.thaumicQuantumHelmet, 3, -2, 3, new ItemStack(ItemRegistry.quantumThaumicHelmet)).setParents("Nanosuit Goggles of Revealing").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumicQuantumHelmet)); + } + } + } - if (Config.ironOmnitoolResearch == false) { - if (Config.diamondOmnitoolResearch == false) { - text = "1"; - research = new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(ItemRegistry.diamondOmnitool)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.diamondOmnitool), new ResearchPage(EMTPostInitRecipes.ironOmnitoolToDiamond)); - } - } + if (Config.ironOmnitoolResearch == false) { + text = "1"; + research = new EMTResearchItem("Iron Omnitool", "EMT", new AspectList(), -2, 0, 0, new ItemStack(ItemRegistry.ironOmnitool)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTInitRecipes.ironOmnitool)); + } - if (Config.thaumiumDrillResearch == false && Config.thaumiumChainsawResearch == false) { - if (Config.thaumiumOmnitoolResearch == false) { - text = "1"; - research = new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(ItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumOmnitool), new ResearchPage(EMTPostInitRecipes.diamondOmnitoolToThaumium)); - } - } + if (Config.ironOmnitoolResearch == false) { + if (Config.diamondOmnitoolResearch == false) { + text = "1"; + research = new EMTResearchItem("Diamond Omnitool", "EMT", ResearchAspects.diamondOmnitoolResearch, -4, 0, 1, new ItemStack(ItemRegistry.diamondOmnitool)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.diamondOmnitool), new ResearchPage(EMTPostInitRecipes.ironOmnitoolToDiamond)); + } + } - if (Config.explosionFocusResearch == false) { - text = "1"; - research = new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(ItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.explosionFocus)); - } + if (Config.thaumiumDrillResearch == false && Config.thaumiumChainsawResearch == false) { + if (Config.thaumiumOmnitoolResearch == false) { + text = "1"; + research = new EMTResearchItem("Thaumium Omnitool", "EMT", ResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(ItemRegistry.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumOmnitool), new ResearchPage(EMTPostInitRecipes.diamondOmnitoolToThaumium)); + } + } - if (Config.christmasFocusResearch == false) { - text = "1"; - research = new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(ItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.christmasFocus)); - } + if (Config.explosionFocusResearch == false) { + text = "1"; + research = new EMTResearchItem("Explosion Focus", "EMT", ResearchAspects.laserFocusResearch, 2, 3, 2, new ItemStack(ItemRegistry.explosionFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.explosionFocus)); + } - if (Config.shieldFocusResearch == false) { - text = "1"; - research = new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(ItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldFocus)); - } + if (Config.christmasFocusResearch == false) { + text = "1"; + research = new EMTResearchItem("Kris-tmas Focus", "EMT", ResearchAspects.christmasFocusResearch, 3, 3, 1, new ItemStack(ItemRegistry.christmasFocus)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.christmasFocus)); + } - if (Config.shieldFocusResearch == false) { - if (Config.shieldBlockResearch == false) { - text = "1"; - research = new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(BlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldBlock)); - } - } + if (Config.shieldFocusResearch == false) { + text = "1"; + research = new EMTResearchItem("Shield Focus", "EMT", ResearchAspects.shieldFocusResearch, 4, 3, 2, new ItemStack(ItemRegistry.shieldFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldFocus)); + } - if (Config.potentiaGeneratorResearch == false) { - text = "1"; - research = new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(BlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.potentiaGenerator)); - } + if (Config.shieldFocusResearch == false) { + if (Config.shieldBlockResearch == false) { + text = "1"; + research = new EMTResearchItem("Shield Block", "EMT", ResearchAspects.shieldBlockResearch, 4, 5, 1, new ItemStack(BlockRegistry.shield)).setSecondary().setParents("Shield Focus").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.shieldBlock)); + } + } - if (Config.potentiaGeneratorResearch == false) { - if (Config.ignisGeneratorResearch == false) { - text = "1"; - research = new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.ignisGenerator)); - } - } + if (Config.potentiaGeneratorResearch == false) { + text = "1"; + research = new EMTResearchItem("Potentia Generator", "EMT", ResearchAspects.potentiaGeneratorResearch, -2, 3, 3, new ItemStack(BlockRegistry.essentiaGens, 1, 0)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.potentiaGenerator)); + } - if (Config.potentiaGeneratorResearch == false) { - if (Config.auramGeneratorResearch == false) { - text = "1"; - research = new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.auramGenerator)); - } - } + if (Config.potentiaGeneratorResearch == false) { + if (Config.ignisGeneratorResearch == false) { + text = "1"; + research = new EMTResearchItem("Ignis Generator", "EMT", ResearchAspects.ignisGeneratorResearch, -3, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 1)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.ignisGenerator)); + } + } - if (Config.potentiaGeneratorResearch == false) { - if (Config.arborGeneratorResearch == false) { - text = "1"; - research = new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.arborGenerator)); - } - } + if (Config.potentiaGeneratorResearch == false) { + if (Config.auramGeneratorResearch == false) { + text = "1"; + research = new EMTResearchItem("Auram Generator", "EMT", ResearchAspects.auramGeneratorResearch, -1, 4, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 2)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.auramGenerator)); + } + } - // if(Config.potentiaGeneratorResearch == false) { - // if(Config.wandChargingSationResearch = false) { - text = "1"; - research = new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(BlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandRecharger)); - // } - // } + if (Config.potentiaGeneratorResearch == false) { + if (Config.arborGeneratorResearch == false) { + text = "1"; + research = new EMTResearchItem("Arbor Generator", "EMT", ResearchAspects.arborGeneratorResearch, -2, 5, 1, new ItemStack(BlockRegistry.essentiaGens, 1, 3)).setSecondary().setParents("Potentia Generator").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.arborGenerator)); + } + } - if (Config.thaumiumChainsawResearch == false) { - if (Config.streamChainsawResearch == false) { - text = "1"; - research = new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(ItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.streamChainsaw)); - } - } + // if(Config.potentiaGeneratorResearch == false) { + // if(Config.wandChargingSationResearch = false) { + text = "1"; + research = new EMTResearchItem("Industrial Wand Charging Station", "EMT", ResearchAspects.wandCharger, -4, 2, 3, new ItemStack(BlockRegistry.emtMachines, 1, 0)).setParents("Potentia Generator").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandRecharger)); + // } + // } - if (Config.thaumiumDrillResearch == false) { - if (Config.rockbreakerDrillResearch == false) { - text = "1"; - research = new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(ItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.rockbreakerDrill)); - } - } + if (Config.thaumiumChainsawResearch == false) { + if (Config.streamChainsawResearch == false) { + text = "1"; + research = new EMTResearchItem("Chainsaw of the Stream", "EMT", ResearchAspects.streamChainsawResearch, -3, -4, 3, new ItemStack(ItemRegistry.streamChainsaw)).setParents("Thaumium Chainsaw").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.streamChainsaw)); + } + } - if (Config.tinyUraniumResearch == false) { - text = "1"; - research = new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.tinyUranium)); - } + if (Config.thaumiumDrillResearch == false) { + if (Config.rockbreakerDrillResearch == false) { + text = "1"; + research = new EMTResearchItem("Drill of the Rockbreaker", "EMT", ResearchAspects.rockbreakerDrillResearch, 0, -4, 3, new ItemStack(ItemRegistry.rockbreakerDrill)).setParents("Thaumium Drill").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.rockbreakerDrill)); + } + } - if (Config.thorHammerResearch == false) { - text = "1"; - research = new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(ItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thorHammer)); - } + if (Config.tinyUraniumResearch == false) { + text = "1"; + research = new EMTResearchItem("Tiny Uranium", "EMT", ResearchAspects.tinyUraniumResearch, -5, -5, 1, IC2Items.getItem("Uran238")).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.tinyUranium)); + } - if (Config.thorHammerResearch == false) { - if (Config.superchargedThorHammerResearch == false) { - text = "1"; - research = new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(ItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.superchargedThorHammer)); - } - } + if (Config.thorHammerResearch == false) { + text = "1"; + research = new EMTResearchItem("Mjolnir", "EMT", ResearchAspects.thorHammerResearch, -5, 5, 3, new ItemStack(ItemRegistry.thorHammer)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thorHammer)); + } - if (Config.compressedSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(BlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.compressedSolar), new ResearchPage(EMTPostInitRecipes.doubleCompressedSolar), new ResearchPage(EMTPostInitRecipes.tripleCompressedSolar)); - } + if (Config.thorHammerResearch == false) { + if (Config.superchargedThorHammerResearch == false) { + text = "1"; + research = new EMTResearchItem("Supercharged Mjolnir", "EMT", ResearchAspects.superchargedThorHammerResearch, -6, 6, 3, new ItemStack(ItemRegistry.electricThorHammer)).setParents("Mjolnir").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.superchargedThorHammer)); + } + } - if (Config.compressedSolarsResearch == false) { - if (Config.solarHelmetResearch == false) { - text = "1"; - research = 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(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.solarHelmetRevealing)); - } - } + if (Config.compressedSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Compressed Solars", "EMT", ResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(BlockRegistry.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.compressedSolar), new ResearchPage(EMTPostInitRecipes.doubleCompressedSolar), new ResearchPage(EMTPostInitRecipes.tripleCompressedSolar)); + } - if (Config.electricBootsResearch == false) { - text = "1"; - research = new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(ItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricBootsTravel)); - } + if (Config.compressedSolarsResearch == false) { + if (Config.solarHelmetResearch == false) { + text = "1"; + research = 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(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.solarHelmetRevealing)); + } + } - if (Config.electricBootsResearch == false) { - if (Config.nanoBootsResearch == false) { - text = "1"; - research = 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(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoBootsTravel)); - } - } + if (Config.electricBootsResearch == false) { + text = "1"; + research = new EMTResearchItem("Electric Boots of the Traveller", "EMT", ResearchAspects.electricBootsTravel, 2, 0, 1, new ItemStack(ItemRegistry.electricBootsTraveller)).setSecondary().setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricBootsTravel)); + } - if (Config.electricBootsResearch == false) { - if (Config.nanoBootsResearch == false) { - if (Config.quantumBootsResearch == false) { - text = "1"; - research = 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(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumBootsTravel)); - } - } - } + if (Config.electricBootsResearch == false) { + if (Config.nanoBootsResearch == false) { + text = "1"; + research = 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(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoBootsTravel)); + } + } - if (Config.electricScribingToolsResearch == false) { - text = "1"; - research = new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(ItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricScribingTools)); - } + if (Config.electricBootsResearch == false) { + if (Config.nanoBootsResearch == false) { + if (Config.quantumBootsResearch == false) { + text = "1"; + research = 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(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumBootsTravel)); + } + } + } - if (Config.etherealProcessorResearch == false) { - text = "1"; - research = new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(BlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.etheralProcessor)); - } + if (Config.electricScribingToolsResearch == false) { + text = "1"; + research = new EMTResearchItem("Electric Scribing Tools", "EMT", ResearchAspects.electricScribingTools, -6, -5, 1, new ItemStack(ItemRegistry.electricScribingTools)).setSecondary().setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricScribingTools)); + } - if (Config.compressedSolarsResearch == false) { - if (Config.waterSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.waterSolar), new ResearchPage(EMTPostInitRecipes.doubleWaterSolar), new ResearchPage(EMTPostInitRecipes.tripleWaterSolar)); + if (Config.etherealProcessorResearch == false) { + text = "1"; + research = new EMTResearchItem("Etheral Processor", "EMT", ResearchAspects.etherealProcessor, -1, 2, 2, new ItemStack(BlockRegistry.emtMachines, 1, 1)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.etheralProcessor)); + } - } - } + if (Config.compressedSolarsResearch == false) { + if (Config.waterSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Water Infused Solar Panels", "EMT", ResearchAspects.waterSolars, -7, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.waterSolar), new ResearchPage(EMTPostInitRecipes.doubleWaterSolar), new ResearchPage(EMTPostInitRecipes.tripleWaterSolar)); - if (Config.compressedSolarsResearch == false) { - if (Config.darkSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.darkSolar), new ResearchPage(EMTPostInitRecipes.doubleDarkSolar), new ResearchPage(EMTPostInitRecipes.tripleDarkSolar)); - } - } + } + } - if (Config.compressedSolarsResearch == false) { - if (Config.orderSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(BlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.orderSolar), new ResearchPage(EMTPostInitRecipes.doubleOrderSolar), new ResearchPage(EMTPostInitRecipes.tripleOrderSolar)); - } - } + if (Config.compressedSolarsResearch == false) { + if (Config.darkSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Entropy Infused Solar Panels", "EMT", ResearchAspects.darkSolars, -8, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.darkSolar), new ResearchPage(EMTPostInitRecipes.doubleDarkSolar), new ResearchPage(EMTPostInitRecipes.tripleDarkSolar)); + } + } - if (Config.compressedSolarsResearch == false) { - if (Config.fireSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.fireSolar), new ResearchPage(EMTPostInitRecipes.doubleFireSolar), new ResearchPage(EMTPostInitRecipes.tripleFireSolar)); - } - } + if (Config.compressedSolarsResearch == false) { + if (Config.orderSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Order Infused Solar Panels", "EMT", ResearchAspects.orderSolars, -6, -8, 1, new ItemStack(BlockRegistry.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.orderSolar), new ResearchPage(EMTPostInitRecipes.doubleOrderSolar), new ResearchPage(EMTPostInitRecipes.tripleOrderSolar)); + } + } - if (Config.compressedSolarsResearch == false) { - if (Config.airSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.airSolar), new ResearchPage(EMTPostInitRecipes.doubleAirSolar), new ResearchPage(EMTPostInitRecipes.tripleAirSolar)); - } - } + if (Config.compressedSolarsResearch == false) { + if (Config.fireSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Fire Infused Solar Panels", "EMT", ResearchAspects.fireSolars, -5, -7, 1, new ItemStack(BlockRegistry.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.fireSolar), new ResearchPage(EMTPostInitRecipes.doubleFireSolar), new ResearchPage(EMTPostInitRecipes.tripleFireSolar)); + } + } - if (Config.compressedSolarsResearch == false) { - if (Config.earthSolarsResearch == false) { - text = "1"; - research = new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(BlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.earthSolar), new ResearchPage(EMTPostInitRecipes.doubleEarthSolar), new ResearchPage(EMTPostInitRecipes.tripleEarthSolar)); - } - } + if (Config.compressedSolarsResearch == false) { + if (Config.airSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Air Infused Solar Panels", "EMT", ResearchAspects.airSolars, -4, -6, 1, new ItemStack(BlockRegistry.emtSolars, 1, 15)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.airSolar), new ResearchPage(EMTPostInitRecipes.doubleAirSolar), new ResearchPage(EMTPostInitRecipes.tripleAirSolar)); + } + } - if (Config.uuMInfusionResearch == false) { - text = "1"; - research = new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, IC2Items.getItem("UuMatterCell")).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(UuMInfusionRecipes.charcoalToCoal), new ResearchPage(UuMInfusionRecipes.glowstoneDustToBlock), new ResearchPage(UuMInfusionRecipes.stoneBricksToIronOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneToCopperOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneBricksToTinOre), new ResearchPage(UuMInfusionRecipes.amberBlockToLeadOre), new ResearchPage(UuMInfusionRecipes.amberBricksToUraniumOre), new ResearchPage(UuMInfusionRecipes.shardToResin), new ResearchPage(UuMInfusionRecipes.shardToRedstone), new ResearchPage(UuMInfusionRecipes.shardToLapis), new ResearchPage(UuMInfusionRecipes.ironToGold), new ResearchPage(UuMInfusionRecipes.goldToDiamond), new ResearchPage(UuMInfusionRecipes.diamondToUranium), new ResearchPage( - UuMInfusionRecipes.uraniumToIridium)); - } + if (Config.compressedSolarsResearch == false) { + if (Config.earthSolarsResearch == false) { + text = "1"; + research = new EMTResearchItem("Earth Infused Solar Panels", "EMT", ResearchAspects.earthSolars, -6, -7, 1, new ItemStack(BlockRegistry.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.earthSolar), new ResearchPage(EMTPostInitRecipes.doubleEarthSolar), new ResearchPage(EMTPostInitRecipes.tripleEarthSolar)); + } + } - if (Config.portableNodeResarch == false) { - text = "1"; - research = new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(BlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.portableNode)); - } + if (Config.uuMInfusionResearch == false) { + text = "1"; + research = new EMTResearchItem("UU-Matter Infusion", "EMT", ResearchAspects.uuMInfusion, 5, 5, 3, IC2Items.getItem("UuMatterCell")).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(UuMInfusionRecipes.charcoalToCoal), new ResearchPage(UuMInfusionRecipes.glowstoneDustToBlock), new ResearchPage(UuMInfusionRecipes.stoneBricksToIronOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneToCopperOre), new ResearchPage(UuMInfusionRecipes.arcaneStoneBricksToTinOre), new ResearchPage(UuMInfusionRecipes.amberBlockToLeadOre), new ResearchPage(UuMInfusionRecipes.amberBricksToUraniumOre), new ResearchPage(UuMInfusionRecipes.shardToResin), new ResearchPage(UuMInfusionRecipes.shardToRedstone), new ResearchPage(UuMInfusionRecipes.shardToLapis), new ResearchPage(UuMInfusionRecipes.ironToGold), new ResearchPage(UuMInfusionRecipes.goldToDiamond), new ResearchPage(UuMInfusionRecipes.diamondToUranium), new ResearchPage( + UuMInfusionRecipes.uraniumToIridium)); + } - if (Config.electricHoeGrowthResearch == false) { - text = "1"; - research = new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(ItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricHoeGrowth)); - } + if (Config.portableNodeResarch == false) { + text = "1"; + research = new EMTResearchItem("Portable Node", "EMT", ResearchAspects.portableNode, 2, 5, 3, new ItemStack(BlockRegistry.portableNode)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.portableNode)); + } - if (Config.chargeFocusResearch == false) { - text = "1"; - research = new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(ItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.chargeFocus)); - } + if (Config.electricHoeGrowthResearch == false) { + text = "1"; + research = new EMTResearchItem("Electric Hoe of Growth", "EMT", ResearchAspects.electricHoeGrowth, -1, -4, 2, new ItemStack(ItemRegistry.electricHoeGrowth)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.electricHoeGrowth)); + } - if (Config.wandChargeFocusResearch == false) { - text = "1"; - research = new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(ItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandChargeFocus)); - } + if (Config.chargeFocusResearch == false) { + text = "1"; + research = new EMTResearchItem("Wand Focus: Charging", "EMT", ResearchAspects.chargeFocus, 5, 3, 2, new ItemStack(ItemRegistry.chargeFocus)).setParents("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.chargeFocus)); + } - if (Config.inventoryChargingRing == false) { - text = "1"; - research = new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(ItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.inventoryChargingRing)); - } + if (Config.wandChargeFocusResearch == false) { + text = "1"; + research = new EMTResearchItem("Wand Focus: Wand Charging", "EMT", ResearchAspects.wandChargeFocus, 7, 3, 3, new ItemStack(ItemRegistry.wandChargeFocus)).setParents("Wand Focus: Charging").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.wandChargeFocus)); + } - if (Config.armorChargingRing == false) { - text = "1"; - research = new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(ItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.armorChargingRing)); - } - } + if (Config.inventoryChargingRing == false) { + text = "1"; + research = new EMTResearchItem("Inventory Charging Ring", "EMT", ResearchAspects.inventoryChargingRing, 0, -5, 3, new ItemStack(ItemRegistry.emtBauble, 1, 1)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.inventoryChargingRing)); + } + + if (Config.armorChargingRing == false) { + text = "1"; + research = new EMTResearchItem("Armor Charging Ring", "EMT", ResearchAspects.armorChargingRing, 0, -7, 3, new ItemStack(ItemRegistry.emtBauble, 1, 0)).setSecondary().setParents("Inventory Charging Ring").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.armorChargingRing)); + } + + if (Config.thaumiumWingResearch == false) { + text = "1"; + research = new EMTResearchItem("Thaumium Reinforced Wings", "EMT", ResearchAspects.thaumiumWing, 0, 4, 0, new ItemStack(ItemRegistry.thaumiumWing)).setSecondary().setParents("Feather Wings").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.thaumiumWing), new ResearchPage(EMTPostInitRecipes.thaumiumWings)); + } + + if (Config.nanoWingResearch == false) { + text = "1"; + research = new EMTResearchItem("Nanosuit Wings", "EMT", ResearchAspects.nanoWing, 0, 6, 2, new ItemStack(ItemRegistry.nanoWing)).setParents("Thaumium Reinforced Wings").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.nanoWings)); + } + + if (Config.quantumWingsResearch == false) { + text = "1"; + research = new EMTResearchItem("Quantum Wings", "EMT", ResearchAspects.quantumWing, 0, 8, 3, new ItemStack(ItemRegistry.quantumWing)).setParents("Nanosuit Wings").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage(text), new ResearchPage(EMTPostInitRecipes.quantumWings)); + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/TileEntityRegistry.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/TileEntityRegistry.java index f14b91f..b837fbe 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/TileEntityRegistry.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/TileEntityRegistry.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -15,35 +15,35 @@ import cpw.mods.fml.common.registry.GameRegistry; public class TileEntityRegistry { - public static void registerEMTTileEntites() { + public static void registerEMTTileEntites() { - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPotentiaGenerator.class, "tileentityessentiagenerator"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIgnisGenerator.class, "tileentityignisgenerator"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityAuramGenerator.class, "tileentityauramgenerator"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityArborGenerator.class, "tileentityarborgenerator"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityCompressedSolar.class, "tileentitycompressedsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityWaterSolar.class, "tileentitywatersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDarkSolar.class, "tileentitydarksolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleDarkSolar.class, "tileentitytripledarksolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityOrderSolar.class, "tileentityordersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleOrderSolar.class, "tileentitytripleordersolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityFireSolar.class, "tileentityfiresolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleFireSolar.class, "tileentitytriplefiresolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityAirSolar.class, "tileentityairsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleAirSolar.class, "tileentitytripleairsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityEarthSolar.class, "tileentityearthsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); - GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPortableNode.class, "tileentityportablenode"); - } + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPotentiaGenerator.class, "tileentityessentiagenerator"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIgnisGenerator.class, "tileentityignisgenerator"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityAuramGenerator.class, "tileentityauramgenerator"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityArborGenerator.class, "tileentityarborgenerator"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityCompressedSolar.class, "tileentitycompressedsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleCompressedSolar.class, "tileentitydoublecompressedsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleCompressedSolar.class, "tileentitytriplecompressedsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator.class, "tileentityetherealmacerator"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityWaterSolar.class, "tileentitywatersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleWaterSolar.class, "tileentitydoublewatersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleWaterSolar.class, "tileentitytriplewatersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDarkSolar.class, "tileentitydarksolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleDarkSolar.class, "tileentitydoubledarksolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleDarkSolar.class, "tileentitytripledarksolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityOrderSolar.class, "tileentityordersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleOrderSolar.class, "tileentitydoubleordersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleOrderSolar.class, "tileentitytripleordersolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityFireSolar.class, "tileentityfiresolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleFireSolar.class, "tileentitydoublefiresolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleFireSolar.class, "tileentitytriplefiresolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityAirSolar.class, "tileentityairsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleAirSolar.class, "tileentitydoubleairsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleAirSolar.class, "tileentitytripleairsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityEarthSolar.class, "tileentityearthsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleEarthSolar.class, "tileentitydoubleearthsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleEarthSolar.class, "tileentitytripleearthsolar"); + GameRegistry.registerTileEntity(electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPortableNode.class, "tileentityportablenode"); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMT.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMT.java new file mode 100644 index 0000000..a024de5 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMT.java @@ -0,0 +1,81 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +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]; + + protected BlockEMT(Material material) { + super(material); + } + + @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 + 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 int damageDropped(int meta) { + return meta; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTMachines.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTMachines.java index e9d7f6b..66fb3b1 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTMachines.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTMachines.java @@ -1,21 +1,23 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.List; -import java.util.Random; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -26,149 +28,105 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; -public class BlockEMTMachines extends BlockContainer { +import java.util.List; +import java.util.Random; - public IIcon[] wandCharger = new IIcon[4]; - public IIcon[] etherealProcessor = new IIcon[4]; +public class BlockEMTMachines extends BlockEMT { - public BlockEMTMachines() { - super(Material.iron); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setHardness(4.0F); - } + public BlockEMTMachines() { + super(Material.iron); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setHardness(4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - this.wandCharger[0] = ir.registerIcon("electricmagictools:machines/top"); - this.wandCharger[1] = ir.registerIcon("electricmagictools:machines/bottom"); - this.wandCharger[2] = ir.registerIcon("electricmagictools:machines/side"); - this.wandCharger[3] = ir.registerIcon("electricmagictools:machines/wandcharger"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + this.blockIcon = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/top"); - this.etherealProcessor[0] = ir.registerIcon("electricmagictools:machines/etherealmaceratortop"); - this.etherealProcessor[1] = ir.registerIcon("electricmagictools:machines/etherealmacerator"); - this.etherealProcessor[2] = ir.registerIcon("electricmagictools:machines/etherealmaceratorfront"); - this.etherealProcessor[3] = ir.registerIcon("electricmagictools:machines/etherealmaceratorfrontactive"); - } + this.top[0] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/top"); + this.top[1] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/etherealmaceratortop"); - @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)); - } + this.bottom[0] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/side"); + this.bottom[1] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/etherealmacerator"); - @Override - public IIcon getIcon(int side, int meta) { - if (meta == 0) { - if (side <= 1) { - return this.wandCharger[0]; - } - if (side > 1) { - return this.wandCharger[3]; - } - } + this.side[0] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/side"); + this.side[1] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/etherealmacerator"); - if (meta == 1) { - if (side == 0) { - return this.etherealProcessor[1]; - } - if (side == 1) { - return this.etherealProcessor[0]; - } - if (side == 2) { - return this.etherealProcessor[3]; - } - if (side == 3) { - return this.etherealProcessor[3]; - } - } - return this.etherealProcessor[2]; - } + this.frontOff[0] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/wandcharger"); + this.frontOff[1] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/etherealmaceratorfront"); - @Override - public IIcon getIcon(IBlockAccess access, int i, int j, int k, int side) { - return super.getIcon(access, i, j, k, side); - } + this.frontOn[0] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/wandcharger"); + this.frontOn[1] = ir.registerIcon(ElectricMagicTools.texturePath + ":machines/etherealmaceratorfrontactive"); + } - @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); - } + @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)); + } - @Override - public TileEntity createNewTileEntity(World world, int md) { - return null; - } + @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 int damageDropped(int meta) { - return 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(ElectricMagicTools.instance, 0, world, x, y, z); + } else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { + player.openGui(ElectricMagicTools.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(ElectricMagicTools.instance, 0, world, x, y, z); - } else if (!world.isRemote && world.getTileEntity(x, y, z) instanceof TileEntityEtherealMacerator) { - player.openGui(ElectricMagicTools.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/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars.java index ebd7363..90067fd 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars.java @@ -1,416 +1,176 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.*; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; 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.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityAirSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityCompressedSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDarkSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleCompressedSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleDarkSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleFireSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleOrderSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleWaterSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityFireSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityOrderSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleCompressedSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleDarkSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleFireSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleOrderSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleWaterSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityWaterSolar; -public class BlockEMTSolars extends BlockContainer { +import java.util.List; - public IIcon[] compressedSolar = new IIcon[3]; - public IIcon[] doubleCompressedSolar = new IIcon[3]; - public IIcon[] tripleCompressedSolar = new IIcon[3]; - public IIcon[] waterSolar = new IIcon[3]; - public IIcon[] doubleWaterSolar = new IIcon[3]; - public IIcon[] tripleWaterSolar = new IIcon[3]; - public IIcon[] darkSolar = new IIcon[3]; - public IIcon[] doubleDarkSolar = new IIcon[3]; - public IIcon[] tripleDarkSolar = new IIcon[3]; - public IIcon[] orderSolar = new IIcon[3]; - public IIcon[] doubleOrderSolar = new IIcon[3]; - public IIcon[] tripleOrderSolar = new IIcon[3]; - public IIcon[] fireSolar = new IIcon[3]; - public IIcon[] doubleFireSolar = new IIcon[3]; - public IIcon[] tripleFireSolar = new IIcon[3]; - public IIcon[] airSolar = new IIcon[3]; +public class BlockEMTSolars extends BlockEMT { - public BlockEMTSolars() { - super(Material.iron); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setHardness(4.0F); - } + public BlockEMTSolars() { + super(Material.iron); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setHardness(4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.compressedSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.compressedSolar[1] = ri.registerIcon("electricmagictools:solars/side"); - this.compressedSolar[2] = ri.registerIcon("electricmagictools:solars/bottom"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.top[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/solartop"); + this.top[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/doublesolartop"); + this.top[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/triplesolartop"); + this.top[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/solartop"); + this.top[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/doublesolartop"); + this.top[5] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/triplesolartop"); + this.top[6] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/solartop"); + this.top[7] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/doublesolartop"); + this.top[8] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/triplesolartop"); + this.top[9] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/solartop"); + this.top[10] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/doublesolartop"); + this.top[11] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/triplesolartop"); + this.top[12] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/solartop"); + this.top[13] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/doublesolartop"); + this.top[14] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/triplesolartop"); + this.top[15] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/solartop"); - this.doubleCompressedSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleCompressedSolar[1] = ri.registerIcon("electricmagictools:solars/side"); - this.doubleCompressedSolar[2] = ri.registerIcon("electricmagictools:solars/bottom"); + this.bottom[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/bottom"); + this.bottom[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/bottom"); + this.bottom[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/bottom"); + this.bottom[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterbottom"); + this.bottom[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterbottom"); + this.bottom[5] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterbottom"); + this.bottom[6] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkbottom"); + this.bottom[7] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkbottom"); + this.bottom[8] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkbottom"); + this.bottom[9] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderbottom"); + this.bottom[10] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderbottom"); + this.bottom[11] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderbottom"); + this.bottom[12] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/firebottom"); + this.bottom[13] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/firebottom"); + this.bottom[14] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/firebottom"); + this.bottom[15] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airbottom"); - this.tripleCompressedSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleCompressedSolar[1] = ri.registerIcon("electricmagictools:solars/side"); - this.tripleCompressedSolar[2] = ri.registerIcon("electricmagictools:solars/bottom"); + this.frontOff[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.frontOff[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.frontOff[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.frontOff[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.frontOff[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.frontOff[5] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.frontOff[6] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.frontOff[7] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.frontOff[8] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.frontOff[9] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.frontOff[10] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.frontOff[11] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.frontOff[12] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.frontOff[13] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.frontOff[14] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.frontOff[15] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); - this.waterSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.waterSolar[1] = ri.registerIcon("electricmagictools:solars/waterside"); - this.waterSolar[2] = ri.registerIcon("electricmagictools:solars/waterbottom"); + this.side[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.side[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.side[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/side"); + this.side[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.side[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.side[5] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/water/waterside"); + this.side[6] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.side[7] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.side[8] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/dark/darkside"); + this.side[9] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.side[10] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.side[11] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/order/orderside"); + this.side[12] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.side[13] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.side[14] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/fire/fireside"); + this.side[15] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); + } - this.doubleWaterSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleWaterSolar[1] = ri.registerIcon("electricmagictools:solars/waterside"); - this.doubleWaterSolar[2] = ri.registerIcon("electricmagictools:solars/waterbottom"); + @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)); + } + } - this.tripleWaterSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleWaterSolar[1] = ri.registerIcon("electricmagictools:solars/waterside"); - this.tripleWaterSolar[2] = ri.registerIcon("electricmagictools:solars/waterbottom"); + @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); + } - this.darkSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.darkSolar[1] = ri.registerIcon("electricmagictools:solars/darkside"); - this.darkSolar[2] = ri.registerIcon("electricmagictools:solars/darkbottom"); - - this.doubleDarkSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleDarkSolar[1] = ri.registerIcon("electricmagictools:solars/darkside"); - this.doubleDarkSolar[2] = ri.registerIcon("electricmagictools:solars/darkbottom"); - - this.tripleDarkSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleDarkSolar[1] = ri.registerIcon("electricmagictools:solars/darkside"); - this.tripleDarkSolar[2] = ri.registerIcon("electricmagictools:solars/darkbottom"); - - this.orderSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.orderSolar[1] = ri.registerIcon("electricmagictools:solars/orderside"); - this.orderSolar[2] = ri.registerIcon("electricmagictools:solars/orderbottom"); - - this.doubleOrderSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleOrderSolar[1] = ri.registerIcon("electricmagictools:solars/orderside"); - this.doubleOrderSolar[2] = ri.registerIcon("electricmagictools:solars/orderbottom"); - - this.tripleOrderSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleOrderSolar[1] = ri.registerIcon("electricmagictools:solars/orderside"); - this.tripleOrderSolar[2] = ri.registerIcon("electricmagictools:solars/orderbottom"); - - this.fireSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.fireSolar[1] = ri.registerIcon("electricmagictools:solars/fireside"); - this.fireSolar[2] = ri.registerIcon("electricmagictools:solars/firebottom"); - - this.doubleFireSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleFireSolar[1] = ri.registerIcon("electricmagictools:solars/fireside"); - this.doubleFireSolar[2] = ri.registerIcon("electricmagictools:solars/firebottom"); - - this.tripleFireSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleFireSolar[1] = ri.registerIcon("electricmagictools:solars/fireside"); - this.tripleFireSolar[2] = ri.registerIcon("electricmagictools:solars/firebottom"); - - this.airSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.airSolar[1] = ri.registerIcon("electricmagictools:solars/airside"); - this.airSolar[2] = ri.registerIcon("electricmagictools:solars/airbottom"); - } - - @SideOnly(Side.CLIENT) - @SuppressWarnings({ "unchecked", "rawtypes" }) - 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)); - list.add(new ItemStack(id, 1, 5)); - list.add(new ItemStack(id, 1, 6)); - list.add(new ItemStack(id, 1, 7)); - list.add(new ItemStack(id, 1, 8)); - list.add(new ItemStack(id, 1, 9)); - list.add(new ItemStack(id, 1, 10)); - list.add(new ItemStack(id, 1, 11)); - list.add(new ItemStack(id, 1, 12)); - list.add(new ItemStack(id, 1, 13)); - list.add(new ItemStack(id, 1, 14)); - list.add(new ItemStack(id, 1, 15)); - } - - @Override - public IIcon getIcon(int side, int meta) { - if (meta == 0) { - if (side == 1) { - return this.compressedSolar[0]; - } - if (side > 1) { - return this.compressedSolar[1]; - } - } - - if (meta == 1) { - if (side == 1) { - return this.doubleCompressedSolar[0]; - } - if (side > 1) { - return this.doubleCompressedSolar[1]; - } - } - - if (meta == 2) { - if (side == 1) { - return this.tripleCompressedSolar[0]; - } - if (side > 1) { - return this.tripleCompressedSolar[1]; - } - } - - if (meta == 3) { - if (side == 0) { - return this.waterSolar[2]; - } - if (side == 1) { - return this.waterSolar[0]; - } - if (side > 1) { - return this.waterSolar[1]; - } - } - - if (meta == 4) { - if (side == 0) { - return this.doubleWaterSolar[2]; - } - if (side == 1) { - return this.doubleWaterSolar[0]; - } - if (side > 1) { - return this.doubleWaterSolar[1]; - } - } - - if (meta == 5) { - if (side == 0) { - return this.tripleWaterSolar[2]; - } - if (side == 1) { - return this.tripleWaterSolar[0]; - } - if (side > 1) { - return this.tripleWaterSolar[1]; - } - } - - if (meta == 6) { - if (side == 0) { - return this.darkSolar[2]; - } - if (side == 1) { - return this.darkSolar[0]; - } - if (side > 1) { - return this.darkSolar[1]; - } - } - - if (meta == 7) { - if (side == 0) { - return this.doubleDarkSolar[2]; - } - if (side == 1) { - return this.doubleDarkSolar[0]; - } - if (side > 1) { - return this.doubleDarkSolar[1]; - } - } - - if (meta == 8) { - if (side == 0) { - return this.tripleDarkSolar[2]; - } - if (side == 1) { - return this.tripleDarkSolar[0]; - } - if (side > 1) { - return this.tripleDarkSolar[1]; - } - } - - if (meta == 9) { - if (side == 0) { - return this.orderSolar[2]; - } - if (side == 1) { - return this.orderSolar[0]; - } - if (side > 1) { - return this.orderSolar[1]; - } - } - - if (meta == 10) { - if (side == 0) { - return this.doubleOrderSolar[2]; - } - if (side == 1) { - return this.doubleOrderSolar[0]; - } - if (side > 1) { - return this.doubleOrderSolar[1]; - } - } - - if (meta == 11) { - if (side == 0) { - return this.tripleOrderSolar[2]; - } - if (side == 1) { - return this.tripleOrderSolar[0]; - } - if (side > 1) { - return this.tripleOrderSolar[1]; - } - } - - if (meta == 12) { - if (side == 0) { - return this.fireSolar[2]; - } - if (side == 1) { - return this.fireSolar[0]; - } - if (side > 1) { - return this.fireSolar[1]; - } - } - - if (meta == 13) { - if (side == 0) { - return this.doubleFireSolar[2]; - } - if (side == 1) { - return this.doubleFireSolar[0]; - } - if (side > 1) { - return this.doubleFireSolar[1]; - } - } - - if (meta == 14) { - if (side == 0) { - return this.tripleFireSolar[2]; - } - if (side == 1) { - return this.tripleFireSolar[0]; - } - if (side > 1) { - return this.tripleFireSolar[1]; - } - } - - if (meta == 15) { - if (side == 0) { - return this.airSolar[2]; - } - if (side == 1) { - return this.airSolar[0]; - } - if (side > 1) { - return this.airSolar[1]; - } - } - return this.compressedSolar[2]; - } - - @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 int damageDropped(int meta) { - return meta; - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - return null; - } + @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/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars2.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars2.java index c5231b0..8c5f5f4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars2.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEMTSolars2.java @@ -1,174 +1,99 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.*; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; 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.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleAirSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityDoubleEarthSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityEarthSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleAirSolar; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.solars.TileEntityTripleEarthSolar; -public class BlockEMTSolars2 extends BlockContainer { +import java.util.List; - public IIcon[] compressedSolar = new IIcon[3]; - public IIcon[] doubleAirSolar = new IIcon[3]; - public IIcon[] tripleAirSolar = new IIcon[3]; - public IIcon[] earthSolar = new IIcon[3]; - public IIcon[] doubleEarthSolar = new IIcon[3]; - public IIcon[] tripleEarthSolar = new IIcon[3]; +public class BlockEMTSolars2 extends BlockEMT { - public BlockEMTSolars2() { - super(Material.iron); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setHardness(4.0F); - } + public BlockEMTSolars2() { + super(Material.iron); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setHardness(4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.compressedSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.compressedSolar[1] = ri.registerIcon("electricmagictools:solars/side"); - this.compressedSolar[2] = ri.registerIcon("electricmagictools:solars/bottom"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.top[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/doublesolartop"); + this.top[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/triplesolartop"); + this.top[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/solartop"); + this.top[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/doublesolartop"); + this.top[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/triplesolartop"); - this.doubleAirSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleAirSolar[1] = ri.registerIcon("electricmagictools:solars/airside"); - this.doubleAirSolar[2] = ri.registerIcon("electricmagictools:solars/airbottom"); + this.bottom[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airbottom"); + this.bottom[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airbottom"); + this.bottom[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthbottom"); + this.bottom[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthbottom"); + this.bottom[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthbottom"); - this.tripleAirSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleAirSolar[1] = ri.registerIcon("electricmagictools:solars/airside"); - this.tripleAirSolar[2] = ri.registerIcon("electricmagictools:solars/airbottom"); + this.frontOff[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); + this.frontOff[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); + this.frontOff[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); + this.frontOff[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); + this.frontOff[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); - this.earthSolar[0] = ri.registerIcon("electricmagictools:solars/solartop"); - this.earthSolar[1] = ri.registerIcon("electricmagictools:solars/earthside"); - this.earthSolar[2] = ri.registerIcon("electricmagictools:solars/earthbottom"); + this.side[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); + this.side[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/air/airside"); + this.side[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); + this.side[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); + this.side[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":solars/earth/earthside"); + } - this.doubleEarthSolar[0] = ri.registerIcon("electricmagictools:solars/doublesolartop"); - this.doubleEarthSolar[1] = ri.registerIcon("electricmagictools:solars/earthside"); - this.doubleEarthSolar[2] = ri.registerIcon("electricmagictools:solars/earthbottom"); + @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)); + } + } - this.tripleEarthSolar[0] = ri.registerIcon("electricmagictools:solars/triplesolartop"); - this.tripleEarthSolar[1] = ri.registerIcon("electricmagictools:solars/earthside"); - this.tripleEarthSolar[2] = ri.registerIcon("electricmagictools:solars/earthbottom"); - } + @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); + } - @SideOnly(Side.CLIENT) - @SuppressWarnings({ "unchecked", "rawtypes" }) - 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 IIcon getIcon(int side, int meta) { - if (meta == 0) { - if (side == 1) { - return this.doubleAirSolar[0]; - } - if (side > 1) { - return this.doubleAirSolar[1]; - } - } - - if (meta == 1) { - if (side == 1) { - return this.tripleAirSolar[0]; - } - if (side > 1) { - return this.tripleAirSolar[1]; - } - } - - if (meta == 2) { - if (side == 1) { - return this.earthSolar[0]; - } - if (side > 1) { - return this.earthSolar[1]; - } - } - - if (meta == 3) { - if (side == 1) { - return this.doubleEarthSolar[0]; - } - if (side > 1) { - return this.doubleEarthSolar[1]; - } - } - - if (meta == 4) { - if (side == 1) { - return this.tripleEarthSolar[0]; - } - if (side > 1) { - return this.tripleEarthSolar[1]; - } - } - return this.compressedSolar[2]; - } - - @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 int damageDropped(int meta) { - return meta; - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - // TODO Auto-generated method stub - return null; - } + @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/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEssentiaGenerators.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEssentiaGenerators.java index 6226a15..18359eb 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEssentiaGenerators.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockEssentiaGenerators.java @@ -1,162 +1,104 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.List; -import java.util.Random; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityArborGenerator; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityAuramGenerator; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIgnisGenerator; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPotentiaGenerator; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; 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.tileentity.TileEntity; -import net.minecraft.util.IIcon; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityArborGenerator; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityAuramGenerator; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIgnisGenerator; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPotentiaGenerator; -public class BlockEssentiaGenerators extends BlockContainer { +import java.util.List; +import java.util.Random; - public IIcon[] potentiaGen = new IIcon[3]; - public IIcon[] ignisGen = new IIcon[3]; - public IIcon[] auramGen = new IIcon[3]; - public IIcon[] arborGen = new IIcon[3]; - public IIcon[] saxumGen = new IIcon[3]; +public class BlockEssentiaGenerators extends BlockEMT { - public BlockEssentiaGenerators() { - super(Material.iron); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setHardness(4.0F); - } + public BlockEssentiaGenerators() { + super(Material.iron); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setHardness(4.0F); + } - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ri) { - this.potentiaGen[0] = ri.registerIcon("electricmagictools:essentiagenerator/potentiafront"); - this.potentiaGen[1] = ri.registerIcon("electricmagictools:essentiagenerator/side"); - this.potentiaGen[2] = ri.registerIcon("electricmagictools:essentiagenerator/top"); + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ri) { + this.blockIcon = ri.registerIcon(ElectricMagicTools.texturePath + ":machines/top"); - this.ignisGen[0] = ri.registerIcon("electricmagictools:essentiagenerator/ignisfront"); - this.ignisGen[1] = ri.registerIcon("electricmagictools:essentiagenerator/side"); - this.ignisGen[2] = ri.registerIcon("electricmagictools:essentiagenerator/top"); + for (int i = 0; i <= 3; i++) { + this.top[i] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/top"); + } - this.auramGen[0] = ri.registerIcon("electricmagictools:essentiagenerator/auramfront"); - this.auramGen[1] = ri.registerIcon("electricmagictools:essentiagenerator/side"); - this.auramGen[2] = ri.registerIcon("electricmagictools:essentiagenerator/top"); + for (int i = 0; i <= 3; i++) { + this.bottom[i] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/top"); + } - this.arborGen[0] = ri.registerIcon("electricmagictools:essentiagenerator/arborfront"); - this.arborGen[1] = ri.registerIcon("electricmagictools:essentiagenerator/side"); - this.arborGen[2] = ri.registerIcon("electricmagictools:essentiagenerator/top"); + for (int i = 0; i <= 3; i++) { + this.side[i] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/side"); + } - this.saxumGen[0] = ri.registerIcon("electricmagictools:essentiagenerator/saxumfront"); - this.saxumGen[1] = ri.registerIcon("electricmagictools:essentiagenerator/side"); - this.saxumGen[2] = ri.registerIcon("electricmagictools:essentiagenerator/top"); - } + this.frontOff[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/potentiafront"); + this.frontOff[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/ignisfront"); + this.frontOff[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/auramfront"); + this.frontOff[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":essentiagenerator/arborfront"); + } - @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)); - } + @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)); + } - @Override - public IIcon getIcon(int side, int meta) { - if (meta == 0) { - if (side == 1) { - return this.potentiaGen[2]; - } - if (side > 1) { - return this.potentiaGen[0]; - } - } + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 0) { + return new TileEntityPotentiaGenerator(); + } + if (meta == 1) { + return new TileEntityIgnisGenerator(); + } + if (meta == 2) { + return new TileEntityAuramGenerator(); + } + if (meta == 3) { + return new TileEntityArborGenerator(); + } + return super.createTileEntity(world, meta); + } - if (meta == 1) { - if (side == 1) { - return this.ignisGen[2]; - } - if (side > 1) { - return this.ignisGen[0]; - } - } + @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); + } - if (meta == 2) { - if (side == 1) { - return this.auramGen[2]; - } - if (side > 1) { - return this.auramGen[0]; - } - } - - if (meta == 3) { - if (side == 1) { - return this.arborGen[2]; - } - if (side > 1) { - return this.arborGen[0]; - } - } - return this.potentiaGen[1]; - } - - @Override - public TileEntity createTileEntity(World world, int meta) { - if (meta == 0) { - return new TileEntityPotentiaGenerator(); - } - if (meta == 1) { - return new TileEntityIgnisGenerator(); - } - if (meta == 2) { - return new TileEntityAuramGenerator(); - } - if (meta == 3) { - return new TileEntityArborGenerator(); - } - 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 int damageDropped(int par1) { - return par1; - } - - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { - float f = (float) par2 + 0.5F; - float f1 = (float) par3 + 1.0F; - float f2 = (float) par4 + 0.5F; - par1World.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - - @Override - public TileEntity createNewTileEntity(World var1, int var2) { - return null; - } + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { + float f = (float) par2 + 0.5F; + float f1 = (float) par3 + 1.0F; + float f2 = (float) par4 + 0.5F; + par1World.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockPortableNode.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockPortableNode.java index 1e77cfb..18bf7a7 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockPortableNode.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockPortableNode.java @@ -1,19 +1,21 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.List; -import java.util.Random; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPortableNode; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -25,79 +27,78 @@ import net.minecraft.util.IIcon; import net.minecraft.world.Explosion; import net.minecraft.world.World; import thaumcraft.common.blocks.BlockAiry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityPortableNode; + +import java.util.List; +import java.util.Random; public class BlockPortableNode extends BlockAiry { - public IIcon[] texture = new IIcon[1]; + public IIcon[] texture = new IIcon[1]; - public BlockPortableNode() { - this.setCreativeTab(CreativeTab.tabTombenpotter); - setBlockUnbreakable(); - } + public BlockPortableNode() { + this.setCreativeTab(CreativeTab.tabTombenpotter); + setBlockUnbreakable(); + } - @Override - public TileEntity createTileEntity(World world, int meta) { - return new TileEntityPortableNode(); - } + @Override + public TileEntity createTileEntity(World world, int meta) { + return new TileEntityPortableNode(); + } - @Override - public int quantityDropped(Random par1Random) { - return 0; - } + @Override + public int quantityDropped(Random par1Random) { + return 0; + } - @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; + } - public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { - return false; - } + public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { + return false; + } - public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - } + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + } - public boolean canDragonDestroy(World world, int x, int y, int z) { - return false; - } + public boolean canDragonDestroy(World world, int x, int y, int z) { + return false; + } - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister ri) { - this.texture[0] = ri.registerIcon("electricmagictools:portablenode"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister ri) { + this.texture[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":portablenode"); + } - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) { - return this.texture[0]; - } + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + 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)); - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item id, CreativeTabs tab, List list) { + list.add(new ItemStack(id, 1, 0)); + } - @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 && player.isSneaking() && player.getHeldItem() == null) { - world.setBlockToAir(x, y, z); - world.removeTileEntity(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 && player.isSneaking() && player.getHeldItem() == null) { + world.setBlockToAir(x, y, z); + world.removeTileEntity(x, y, z); + } + return true; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockShield.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockShield.java index 441f3d6..fb6a228 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockShield.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/blocks/BlockShield.java @@ -1,77 +1,78 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.blocks; -import java.util.Random; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.world.Explosion; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.Random; public class BlockShield extends Block { - public BlockShield() { - super(Material.rock); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setHardness(1F); - this.setResistance(200000000F); - } + public BlockShield() { + super(Material.rock); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setHardness(1F); + this.setResistance(200000000F); + } - @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("electricmagictools:shield"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister iconRegister) { + this.blockIcon = iconRegister.registerIcon(ElectricMagicTools.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; + } - public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { - return false; - } + public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { + return false; + } - public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { - } + public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { + } - public boolean canDragonDestroy(World world, int x, int y, int z) { - return false; - } + public boolean canDragonDestroy(World world, int x, int y, int z) { + return false; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityArcher.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityArcher.java index 1e1e867..a2b5265 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityArcher.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityArcher.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -36,95 +36,95 @@ 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(Blocks.web, 1, 1), 0.0F); - } + @Override + protected void dropRareDrop(int par1) { + this.entityDropItem(new ItemStack(Blocks.web, 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/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityLaser.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityLaser.java index 3e1c31e..870cbb4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityLaser.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/entities/EntityLaser.java @@ -1,18 +1,18 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.entities; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -25,326 +25,326 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class EntityLaser extends Entity implements IProjectile { - private int xTile = -1; - private int yTile = -1; - private int zTile = -1; - private Block inTile; - private int inData; - private boolean inGround; + private int xTile = -1; + private int yTile = -1; + private int zTile = -1; + private Block inTile; + private int inData; + private boolean inGround; - public Entity shootingEntity; - private int ticksInGround; - private int ticksInAir; + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; - public EntityLaser(World par1World) { - super(par1World); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } + public EntityLaser(World par1World) { + super(par1World); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } - public EntityLaser(World par1World, double par2, double par4, double par6) { - super(par1World); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - this.setPosition(par2, par4, par6); - this.yOffset = 0.0F; - } + public EntityLaser(World par1World, double par2, double par4, double par6) { + super(par1World); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(par2, par4, par6); + this.yOffset = 0.0F; + } - public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) { - super(par1World); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = par2EntityLivingBase; + public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) { + super(par1World); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = par2EntityLivingBase; - this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; - double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; - double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 3.0F) - this.posY; - double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; - double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); + this.posY = par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; + double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; + double d1 = par3EntityLivingBase.boundingBox.minY + (double) (par3EntityLivingBase.height / 3.0F) - this.posY; + double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; + double d3 = (double) MathHelper.sqrt_double(d0 * d0 + d2 * d2); - if (d3 >= 1.0E-7D) { - float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - 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.yOffset = 0.0F; - float f4 = (float) d3 * 0.2F; - this.setThrowableHeading(d0, d1 + (double) f4, d2, par4, par5); - } - } + if (d3 >= 1.0E-7D) { + float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + 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.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); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = par2EntityLivingBase; + public EntityLaser(World par1World, EntityLivingBase par2EntityLivingBase, float par3) { + super(par1World); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = par2EntityLivingBase; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.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); - this.setPosition(this.posX, this.posY, this.posZ); - this.yOffset = 0.0F; - this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); - this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); - this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); - this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F); - } + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double) par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.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); + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F); + } - protected void entityInit() { - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - } + protected void entityInit() { + this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + } - public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) { - float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5); - par1 /= (double) f2; - par3 /= (double) f2; - par5 /= (double) f2; - par1 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; - par3 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; - par5 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; - par1 *= (double) par7; - par3 *= (double) par7; - par5 *= (double) par7; - this.motionX = par1; - this.motionY = par3; - this.motionZ = par5; - float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); - this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f3) * 180.0D / Math.PI); - this.ticksInGround = 0; - } + public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) { + float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5); + par1 /= (double) f2; + par3 /= (double) f2; + par5 /= (double) f2; + par1 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; + par3 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; + par5 += this.rand.nextGaussian() * (double) (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) par8; + par1 *= (double) par7; + par3 *= (double) par7; + par5 *= (double) par7; + this.motionX = par1; + this.motionY = par3; + this.motionZ = par5; + float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } - @SideOnly(Side.CLIENT) - public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) { - this.setPosition(par1, par3, par5); - this.setRotation(par7, par8); - } + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) { + this.setPosition(par1, par3, par5); + this.setRotation(par7, par8); + } - @SideOnly(Side.CLIENT) - public void setVelocity(double par1, double par3, double par5) { - this.motionX = par1; - this.motionY = par3; - this.motionZ = par5; + @SideOnly(Side.CLIENT) + public void setVelocity(double par1, double par3, double par5) { + this.motionX = par1; + this.motionY = par3; + this.motionZ = par5; - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { - float f = MathHelper.sqrt_double(par1 + par5); - this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f) / Math.PI); - this.prevRotationPitch = this.rotationPitch; - this.prevRotationYaw = this.rotationYaw; - this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); - this.ticksInGround = 0; - } - } + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { + float f = MathHelper.sqrt_double(par1 + par5); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(par1, par5) / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(par3, (double) f) / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } - @SuppressWarnings("rawtypes") - public void onUpdate() { - super.onUpdate(); + @SuppressWarnings("rawtypes") + public void onUpdate() { + super.onUpdate(); - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { - float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI); - } + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { + float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI); + } - Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - if (block.getMaterial() != Material.air) { - block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); - AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); + Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); + if (block.getMaterial() != Material.air) { + block.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); - if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) { - this.inGround = true; - } - } - Block i = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); + if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) { + this.inGround = true; + } + } + Block i = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - i.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); - AxisAlignedBB axisalignedbb = i.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); + i.setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); + AxisAlignedBB axisalignedbb = i.getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); - if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) { - this.inGround = true; - } + if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) { + this.inGround = true; + } - 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); - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true); - this.setDead(); - if (j == this.inTile && k == this.inData) { - ++this.ticksInGround; + 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); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true); + this.setDead(); + if (j == this.inTile && k == this.inData) { + ++this.ticksInGround; - if (this.ticksInGround == 1200) { - this.setDead(); - } - } else { - this.inGround = false; - this.motionX *= (double) (this.rand.nextFloat() * 0.2F); - this.motionY *= (double) (this.rand.nextFloat() * 0.2F); - this.motionZ *= (double) (this.rand.nextFloat() * 0.2F); - this.ticksInGround = 0; - this.ticksInAir = 0; - } - } else { - ++this.ticksInAir; - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31, false); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (this.ticksInGround == 1200) { + this.setDead(); + } + } else { + this.inGround = false; + this.motionX *= (double) (this.rand.nextFloat() * 0.2F); + this.motionY *= (double) (this.rand.nextFloat() * 0.2F); + this.motionZ *= (double) (this.rand.nextFloat() * 0.2F); + this.ticksInGround = 0; + this.ticksInAir = 0; + } + } else { + ++this.ticksInAir; + Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31, false); + vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - if (movingobjectposition != null) { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + if (movingobjectposition != null) { + vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; - int l; - float f1; + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int l; + float f1; - for (l = 0; l < list.size(); ++l) { - Entity entity1 = (Entity) list.get(l); + for (l = 0; l < list.size(); ++l) { + Entity entity1 = (Entity) list.get(l); - if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { - f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) f1, (double) f1, (double) f1); - MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31); + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double) f1, (double) f1, (double) f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31); - if (movingobjectposition1 != null) { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); - if (d1 < d0 || d0 == 0.0D) { - entity = entity1; - d0 = d1; - } - } - } - } + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } - if (entity != null) { - movingobjectposition = new MovingObjectPosition(entity); - } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } - if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { - EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit; + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { + EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit; - if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) { - movingobjectposition = null; - } - } + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) { + movingobjectposition = null; + } + } - float f2; - float f3; + float f2; + float f3; - if (movingobjectposition != null) { - if (movingobjectposition.entityHit != null) { - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + if (movingobjectposition != null) { + if (movingobjectposition.entityHit != null) { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - { - this.motionX *= -0.10000000149011612D; - this.motionY *= -0.10000000149011612D; - this.motionZ *= -0.10000000149011612D; - this.rotationYaw += 180.0F; - this.prevRotationYaw += 180.0F; - this.ticksInAir = 0; - } - } else { - this.xTile = movingobjectposition.blockX; - this.yTile = movingobjectposition.blockY; - this.zTile = movingobjectposition.blockZ; - this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); - this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); - this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ)); - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / (double) f2 * 0.05000000074505806D; - this.posY -= this.motionY / (double) f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D; - this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); - this.inGround = true; - } - } + { + this.motionX *= -0.10000000149011612D; + this.motionY *= -0.10000000149011612D; + this.motionZ *= -0.10000000149011612D; + this.rotationYaw += 180.0F; + this.prevRotationYaw += 180.0F; + this.ticksInAir = 0; + } + } else { + this.xTile = movingobjectposition.blockX; + this.yTile = movingobjectposition.blockY; + this.zTile = movingobjectposition.blockZ; + this.inTile = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); + this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); + this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / (double) f2 * 0.05000000074505806D; + this.posY -= this.motionY / (double) f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / (double) f2 * 0.05000000074505806D; + this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.inGround = true; + } + } - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { - ; - } + for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { + ; + } - while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { - this.prevRotationPitch += 360.0F; - } + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } - while (this.rotationYaw - this.prevRotationYaw < -180.0F) { - this.prevRotationYaw -= 360.0F; - } + while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } - while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { - this.prevRotationYaw += 360.0F; - } + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } - this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; - this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; - float f4 = 0.99F; - f1 = 0.05F; + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + float f4 = 0.99F; + f1 = 0.05F; - if (this.isInWater()) { - for (int j1 = 0; j1 < 4; ++j1) { - f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ); - } + if (this.isInWater()) { + for (int j1 = 0; j1 < 4; ++j1) { + f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) f3, this.posY - this.motionY * (double) f3, this.posZ - this.motionZ * (double) f3, this.motionX, this.motionY, this.motionZ); + } - f4 = 0.8F; - } + f4 = 0.8F; + } - this.motionX *= (double) f4; - this.motionY *= (double) f4; - this.motionZ *= (double) f4; - this.motionY -= (double) f1; - this.setPosition(this.posX, this.posY, this.posZ); - } - } + this.motionX *= (double) f4; + this.motionY *= (double) f4; + this.motionZ *= (double) f4; + this.motionY -= (double) f1; + this.setPosition(this.posX, this.posY, this.posZ); + } + } - 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 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 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 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 onCollide(Entity par1Entity) { - if (!this.worldObj.isRemote) - ; - { - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true); - } + public void onCollide(Entity par1Entity) { + if (!this.worldObj.isRemote) + ; + { + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 3, true); + } - } + } - @SideOnly(Side.CLIENT) - public float getShadowSize() { - return 0.0F; - } + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTBaubles.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTBaubles.java index 82f11b1..85a0ae1 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTBaubles.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTBaubles.java @@ -1,158 +1,211 @@ package electricMagicTools.tombenpotter.electricmagictools.common.items; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import baubles.api.BaubleType; import baubles.api.IBauble; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import electricMagicTools.tombenpotter.electricmagictools.common.Config; import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.lib.TextHelper; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; + +import java.util.List; +import java.util.Random; public class ItemEMTBaubles extends Item implements IBauble { - public IIcon[] icon = new IIcon[16]; + public IIcon[] icon = new IIcon[16]; + public static int wornTick; + public Random random = new Random(); - public ItemEMTBaubles() { - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(0); - this.setMaxStackSize(1); - setHasSubtypes(true); - } + public ItemEMTBaubles() { + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(0); + this.setMaxStackSize(1); + setHasSubtypes(true); - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - switch (itemstack.getItemDamage()) { - case 0: { - name = "euMaker.armor"; - break; - } - case 1: { - name = "euMaker.inventory"; - break; - } - case 2: { - name = "oneRing"; - break; - } - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + wornTick = 0; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon("electricmagictools:armoreumaker"); - this.icon[1] = ri.registerIcon("electricmagictools:inventoryeumaker"); - this.icon[2] = ri.registerIcon("electricmagictools:onering"); - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + switch (itemstack.getItemDamage()) { + case 0: { + name = "euMaker.armor"; + break; + } + case 1: { + name = "euMaker.inventory"; + break; + } + case 2: { + name = "oneRing"; + break; + } + default: + name = "nothing"; + break; + } + return getUnlocalizedName() + "." + name; + } - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - return this.icon[meta]; - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":armoreumaker"); + this.icon[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":inventoryeumaker"); + this.icon[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":onering"); + } - @SuppressWarnings({ "rawtypes", "unchecked" }) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { - list.add(new ItemStack(this, 1, 0)); - list.add(new ItemStack(this, 1, 1)); - list.add(new ItemStack(this, 1, 2)); - } + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return this.icon[meta]; + } - @SideOnly(Side.CLIENT) - public boolean hasEffect(ItemStack stack) { - if (stack.getItemDamage() == 2) { - return true; - } else { - return false; - } - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) { + list.add(new ItemStack(this, 1, 0)); + list.add(new ItemStack(this, 1, 1)); + list.add(new ItemStack(this, 1, 2)); + } - @Override - public BaubleType getBaubleType(ItemStack stack) { - if (stack.getItemDamage() <= 2) { - return BaubleType.RING; - } else { - return null; - } - } + @SideOnly(Side.CLIENT) + public boolean hasEffect(ItemStack stack) { + if (stack.getItemDamage() == 2) { + return true; + } else { + return false; + } + } - @Override - public void onWornTick(ItemStack stack, EntityLivingBase player) { - if (stack != null) { - if (stack.getItemDamage() == 0) { - if (player instanceof EntityPlayer) { - int energyLeft = Config.armorBaubleProduction; - for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) { - if (energyLeft > 0) { - if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) { - int sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - } - } - } - } - if (stack != null) { - if (stack.getItemDamage() == 1) { - if (player instanceof EntityPlayer) { - int energyLeft = Config.inventoryBaubleProdution; - for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) { - if (energyLeft > 0) { - if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) { - int sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } - } - } - } - } + @Override + public BaubleType getBaubleType(ItemStack stack) { + if (stack.getItemDamage() <= 2) { + return BaubleType.RING; + } else { + return null; + } + } - if (stack != null && stack.getItemDamage() == 2) { - if (player instanceof EntityPlayer) { - ((EntityPlayer) player).capabilities.disableDamage = true; - } - } - } + @Override + public void onWornTick(ItemStack stack, EntityLivingBase player) { + if (!player.worldObj.isRemote) { + if (stack != null) { + if (stack.getItemDamage() == 0) { + if (player instanceof EntityPlayer) { + int energyLeft = Config.armorBaubleProduction; + for (int i = 0; i < ((EntityPlayer) player).inventory.armorInventory.length; i++) { + if (energyLeft > 0) { + if ((((EntityPlayer) player).inventory.armorInventory[i] != null) && (((EntityPlayer) player).inventory.armorInventory[i].getItem() instanceof IElectricItem)) { + int sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.armorInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + } + } + } + } + if (stack != null) { + if (stack.getItemDamage() == 1) { + if (player instanceof EntityPlayer) { + int energyLeft = Config.inventoryBaubleProdution; + for (int i = 0; i < ((EntityPlayer) player).inventory.mainInventory.length; i++) { + if (energyLeft > 0) { + if ((((EntityPlayer) player).inventory.mainInventory[i] != null) && (((EntityPlayer) player).inventory.mainInventory[i].getItem() instanceof IElectricItem)) { + int sentPacket = ElectricItem.manager.charge(((EntityPlayer) player).inventory.mainInventory[i], energyLeft, 4, false, false); + energyLeft -= sentPacket; + } + } + } + } + } + } - @Override - public void onEquipped(ItemStack stack, EntityLivingBase player) { - if (stack != null && stack.getItemDamage() == 2) { - player.setInvisible(true); - } - } + if (stack != null && stack.getItemDamage() == 2) { + if (player instanceof EntityPlayer) { + ((EntityPlayer) player).capabilities.disableDamage = true; - @Override - public void onUnequipped(ItemStack stack, EntityLivingBase player) { - if (stack != null && stack.getItemDamage() == 2) { - player.setInvisible(false); - if (player instanceof EntityPlayer) - ((EntityPlayer) player).capabilities.disableDamage = false; - } - } + wornTick++; - @Override - public boolean canEquip(ItemStack stack, EntityLivingBase player) { - return true; - } + NBTTagCompound tag = new NBTTagCompound(); + tag.setInteger("MindCorruption", wornTick); + ((EntityPlayer) player).writeToNBT(tag); + int corruption = tag.getInteger("MindCorruption"); + if (tag != null && corruption != wornTick) { + wornTick = corruption; + } - @Override - public boolean canUnequip(ItemStack stack, EntityLivingBase player) { - return true; - } + if (corruption == 0) + ((EntityPlayer) player).addChatMessage(new ChatComponentText(TextHelper.darkPurple + "You have worn the Ring. Your soul has now been forever " + TextHelper.darkPurple + "tainted. " + TextHelper.darkRed + TextHelper.italics + "Beware of wearing the ring. The tainting will only " + TextHelper.darkRed + TextHelper.italics + "increase, and strange things will start happening.")); + + if (corruption > 6000 && corruption < 24000 && random.nextInt(2000) == 0) + player.addPotionEffect(new PotionEffect(Potion.blindness.id, 500, 2, false)); + + if (corruption >= 6000 && corruption < 24000 && random.nextInt(2000) == 0) + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 2, false)); + + if (corruption >= 24000 && corruption < 72000 && random.nextInt(2000) == 0) { + for (int i = 0; i <= 5; i++) + ((EntityPlayer) player).capabilities.disableDamage = false; + + player.attackEntityFrom(DamageSource.magic, 5); + } + + if (corruption >= 72000 && corruption < 120000 && random.nextInt(4000) == 0) { + for (int i = 0; i <= 100; i++) + ((EntityPlayer) player).capabilities.disableDamage = false; + + player.motionY = 2; + } + + if (corruption >= 120000 && random.nextInt(10000) == 0) { + for (int i = 0; i <= 510; i++) + ((EntityPlayer) player).capabilities.disableDamage = false; + + player.addPotionEffect(new PotionEffect(Potion.wither.id, 5000, 4, false)); + } + } + } + } + } + + @Override + public void onEquipped(ItemStack stack, EntityLivingBase player) { + if (stack != null && stack.getItemDamage() == 2) { + player.setInvisible(true); + } + } + + @Override + public void onUnequipped(ItemStack stack, EntityLivingBase player) { + if (stack != null && stack.getItemDamage() == 2) { + player.setInvisible(false); + if (player instanceof EntityPlayer && !((EntityPlayer) player).capabilities.isCreativeMode) + ((EntityPlayer) player).capabilities.disableDamage = false; + } + } + + @Override + public boolean canEquip(ItemStack stack, EntityLivingBase player) { + return true; + } + + @Override + public boolean canUnequip(ItemStack stack, EntityLivingBase player) { + return true; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTItems.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTItems.java index 76a8bb5..0ac6a04 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTItems.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemEMTItems.java @@ -1,90 +1,215 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items; -import java.util.List; - -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 cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.common.config.Config; +import thaumcraft.common.lib.InventoryHelper; + +import java.util.List; public class ItemEMTItems extends Item { - public IIcon[] icon = new IIcon[16]; + public IIcon[] icon = new IIcon[500]; - public ItemEMTItems() { - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(0); - this.setMaxStackSize(64); - setHasSubtypes(true); - } + public ItemEMTItems() { + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(0); + this.setMaxStackSize(64); + setHasSubtypes(true); + OreDictionary.registerOre("plateThaumium", new ItemStack(this, 1, 5)); + OreDictionary.registerOre("slimeball", new ItemStack(this, 1, 8)); + } - @Override - public String getUnlocalizedName(ItemStack itemstack) { - String name = ""; - 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; - } - default: - name = "nothing"; - break; - } - return getUnlocalizedName() + "." + name; - } + @Override + public String getUnlocalizedName(ItemStack itemstack) { + String name = ""; + 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 = "denseIronSheet"; + break; + } + case 14: { + name = "taintedFeather"; + break; + } + case 15: { + name = "thaumiumWing"; + break; + } + default: + name = "nothing"; + break; + } + return getUnlocalizedName() + "." + name; + } - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ri) { - this.icon[0] = ri.registerIcon("electricmagictools:clusteruranium"); - this.icon[1] = ri.registerIcon("electricmagictools:crushedamber"); - this.icon[2] = ri.registerIcon("electricmagictools:purifiedamber"); - this.icon[3] = ri.registerIcon("electricmagictools:crushedcinnabar"); - this.icon[4] = ri.registerIcon("electricmagictools:purifiedcinnabar"); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ri) { + this.icon[0] = ri.registerIcon(ElectricMagicTools.texturePath + ":clusteruranium"); + this.icon[1] = ri.registerIcon(ElectricMagicTools.texturePath + ":crushedamber"); + this.icon[2] = ri.registerIcon(ElectricMagicTools.texturePath + ":purifiedamber"); + this.icon[3] = ri.registerIcon(ElectricMagicTools.texturePath + ":crushedcinnabar"); + this.icon[4] = ri.registerIcon(ElectricMagicTools.texturePath + ":purifiedcinnabar"); + this.icon[5] = ri.registerIcon(ElectricMagicTools.texturePath + ":thaumiumplate"); + this.icon[6] = ri.registerIcon(ElectricMagicTools.texturePath + ":lightningsummoner"); + this.icon[7] = ri.registerIcon(ElectricMagicTools.texturePath + ":feathermesh"); + this.icon[8] = ri.registerIcon(ElectricMagicTools.texturePath + ":glue"); + this.icon[9] = ri.registerIcon(ElectricMagicTools.texturePath + ":ducttape"); + this.icon[10] = ri.registerIcon(ElectricMagicTools.texturePath + ":rubberball"); + this.icon[11] = ri.registerIcon(ElectricMagicTools.texturePath + ":cardboard"); + this.icon[12] = ri.registerIcon(ElectricMagicTools.texturePath + ":feathercarboardwing"); + this.icon[13] = ri.registerIcon(ElectricMagicTools.texturePath + ":denseironsheet"); + this.icon[14] = ri.registerIcon(ElectricMagicTools.texturePath + ":taintedfeather"); + this.icon[15] = ri.registerIcon(ElectricMagicTools.texturePath + ":thaumiumWing"); + } - @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) { - // list.add(new ItemStack(this, 1, 0)); - list.add(new ItemStack(this, 1, 1)); - list.add(new ItemStack(this, 1, 2)); - list.add(new ItemStack(this, 1, 3)); - list.add(new ItemStack(this, 1, 4)); - } + @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)); + } + } + + @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 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 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() == 14)) && ((entity instanceof EntityLivingBase)) && (!((EntityLivingBase) entity).isEntityUndead()) && (!((EntityLivingBase) entity).isPotionActive(Config.potionFluxTaintID)) && (world.rand.nextInt(4321) <= stack.stackSize)) { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Config.potionFluxTaintID, 120, 0, false)); + if ((entity instanceof EntityPlayer)) { + InventoryHelper.consumeInventoryItem((EntityPlayer) entity, stack.getItem(), stack.getItemDamage()); + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemElectricScribingTools.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemElectricScribingTools.java index a83a43e..6815fa5 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemElectricScribingTools.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemElectricScribingTools.java @@ -1,81 +1,80 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import thaumcraft.api.IScribeTools; import thaumcraft.common.items.ItemInkwell; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +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(CreativeTab.tabTombenpotter); - this.setMaxDamage(400); - this.setMaxStackSize(1); - } + public ItemElectricScribingTools() { + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(400); + this.setMaxStackSize(1); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 1; - } + @Override + public int getTier(ItemStack itemStack) { + return 1; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 5; - } + @Override + public int 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())); - } - } + @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())); + } + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemLightningSummoner.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemLightningSummoner.java deleted file mode 100644 index 3818ffe..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemLightningSummoner.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.MovingObjectPosition.MovingObjectType; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemLightningSummoner extends Item { - - public ItemLightningSummoner() { - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(1); - this.setMaxStackSize(64); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:lightningsummoner"); - } - - @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(2, player); - return itemstack; - } - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemThaumiumPlate.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemThaumiumPlate.java deleted file mode 100644 index 42b71f8..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/ItemThaumiumPlate.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; -import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemThaumiumPlate extends Item { - - public ItemThaumiumPlate() { - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(0); - this.setMaxStackSize(64); - OreDictionary.registerOre("plateThaumium", this); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:thaumiumplate"); - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricBootsTraveller.java deleted file mode 100644 index acfd69a..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricBootsTraveller.java +++ /dev/null @@ -1,261 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - * - * Attention: this class originally belongs to the ThaumicTinkerer mod. - * All I did was modifying it to fulfill my needs. - * - * ThaumicTinkerer is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * http://www.minecraftforum.net/topic/1813058- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IMetalArmor; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.common.Thaumcraft; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor { - - public int maxCharge = 10000; - @SuppressWarnings({ "unchecked", "rawtypes" }) - public static List playersWith1Step = new ArrayList(); - - public ItemElectricBootsTraveller(int par3, int par4) { - super(ArmorMaterial.DIAMOND, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(CreativeTab.tabTombenpotter); - if (ticks()) - 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) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:electricboots"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/electricboots.png"; - } - - boolean ticks() { - return true; - } - - @SubscribeEvent - public void onEntityUpdate(LivingUpdateEvent event) { - if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - ItemStack armor = player.getCurrentArmor(3 - armorType); - if (armor != null && armor.getItem() == this) - tickPlayer(player); - } - } - - void tickPlayer(EntityPlayer player) { - if (player.worldObj.isRemote) - player.stepHeight = player.isSneaking() ? 0.5F : 1F; - if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) - player.moveFlying(0F, 1F, player.capabilities.isFlying ? 0.075F : 0.15F); - player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; - player.fallDistance = 0F; - } - - @SubscribeEvent - public void onPlayerJump(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 += 0.3; - } - } - - @SubscribeEvent(priority = EventPriority.HIGH) - public void onLivingUpdate(LivingUpdateEvent event) { - if (event.entityLiving instanceof EntityPlayer && event.entityLiving.worldObj.isRemote) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - - boolean highStepListed = playersWith1Step.contains(player.getCommandSenderName()); - boolean hasHighStep = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; - - if (hasHighStep && !highStepListed) - playersWith1Step.add(player.getCommandSenderName()); - - if (!hasHighStep && highStepListed) { - playersWith1Step.remove(player.getCommandSenderName()); - player.stepHeight = 0.5F; - } - } - } - - @Override - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { - return true; - } - - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - @Override - public int getTier(ItemStack itemStack) { - return 2; - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 100; - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } - - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } - - public int getEnergyPerDamage() { - return 100; - } - - @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(); - int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); - } - - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } - - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 2%"); - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 2; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if (Config.smoke == false && player.onGround == false) { - int miny = (int) (player.boundingBox.minY - 2.0D); - Thaumcraft.proxy.smokeSpiral(player.worldObj, player.posX, player.boundingBox.minY + player.height / 2.0F, player.posZ, 1.5F, player.worldObj.rand.nextInt(620), miny); - } - } - - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } - - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } - -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricGoggles.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricGoggles.java deleted file mode 100644 index 9eebe28..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemElectricGoggles.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import thaumcraft.api.aspects.Aspect; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ItemElectricGoggles extends ItemQuantumThaumicHelmet { - - public int maxCharge = 10000; - - public ItemElectricGoggles(int par3, int par4) { - super(par3, par4); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:electricgoggles"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/electricgoggles.png"; - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 5; - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - public int getEnergyPerDamage() { - return 100; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 10; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 5%"); - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoBootsTraveller.java deleted file mode 100644 index 737b248..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoBootsTraveller.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - * - * Attention: this class originally belongs to the ThaumicTinkerer mod. - * All I did was modifying it to fulfill my needs. - * - * ThaumicTinkerer is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * http://www.minecraftforum.net/topic/1813058- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -import thaumcraft.api.aspects.Aspect; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; - -public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller { - - public int maxCharge = 500000; - - public ItemNanoBootsTraveller(int par3, int par4) { - super(par3, par4); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:nanobootstravel"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/nanobootstravel.png"; - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 4; - } - - @Override - void tickPlayer(EntityPlayer player) { - if (player.worldObj.isRemote) - player.stepHeight = player.isSneaking() ? 0.5F : 1F; - if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) - player.moveFlying(0F, 1F, (float) (player.capabilities.isFlying ? 0.075F : Config.nanoBootsSpeed)); - player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; - player.fallDistance = 0F; - } - - @SubscribeEvent - @Override - public void onPlayerJump(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 += Config.nanoBootsJump; - } - } - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 1000; - } - - public int getEnergyPerDamage() { - return 200; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 4%"); - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoThaumicHelmet.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoThaumicHelmet.java deleted file mode 100644 index dd827a8..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemNanoThaumicHelmet.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import ic2.api.item.ElectricItem; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import thaumcraft.api.aspects.Aspect; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemNanoThaumicHelmet extends ItemQuantumThaumicHelmet { - - public int maxCharge = 100000; - - public ItemNanoThaumicHelmet(int par3, int par4) { - super(par3, par4); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(27); - this.setMaxStackSize(1); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:nanothaumichelmet"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/thaumicnanohelmet.png"; - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 6; - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - public int getEnergyPerDamage() { - return 1000; - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if (Config.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)); - } - } - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 100; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 6%"); - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumBootsTraveller.java deleted file mode 100644 index f8b36ab..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumBootsTraveller.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - * - * Attention: this class originally belongs to the ThaumicTinkerer mod. - * All I did was modifying it to fulfill my needs. - * - * ThaumicTinkerer is Open Source and distributed under a - * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License - * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) - * - * http://www.minecraftforum.net/topic/1813058- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; -import thaumcraft.api.aspects.Aspect; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; - -public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller { - - public int maxCharge = 1000000; - - public ItemQuantumBootsTraveller(int par3, int par4) { - super(par3, par4); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:quantumbootstravel"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/quantumbootstravel.png"; - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 5; - } - - @Override - void tickPlayer(EntityPlayer player) { - if (player.worldObj.isRemote) - player.stepHeight = player.isSneaking() ? 0.5F : 1F; - if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) - player.moveFlying(0F, 1F, (float) (player.capabilities.isFlying ? 0.075F : Config.quantumBootsSpeed)); - player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; - player.fallDistance = 0F; - } - - @SubscribeEvent - @Override - public void onPlayerJump(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 += Config.quantumBootsJump; - } - } - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 1000; - } - - public int getEnergyPerDamage() { - return 200; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 5%"); - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumThaumicHelmet.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumThaumicHelmet.java deleted file mode 100644 index 8e8b915..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemQuantumThaumicHelmet.java +++ /dev/null @@ -1,250 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IMetalArmor; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import thaumcraft.api.IGoggles; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemQuantumThaumicHelmet extends ItemArmor implements IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor { - @SuppressWarnings({ "unchecked", "rawtypes" }) - private static final Map potionCost = new HashMap(); - - public ItemQuantumThaumicHelmet(int par3, int par4) { - super(ArmorMaterial.DIAMOND, par3, par4); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(27); - this.setMaxStackSize(1); - - 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)); - } - - public int maxCharge = 10000000; - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:quantumthaumichelmet"); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return "electricmagictools:textures/models/thaumicquantumhelmet.png"; - } - - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - @Override - public int getTier(ItemStack itemStack) { - return 2; - } - - @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); - } - - 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 (Config.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)); - } - } - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 10000; - } - - @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())); - } - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } - - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 8%"); - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 8; - } - - @Override - public boolean showNodes(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 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(); - int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); - } - - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } - - public int getEnergyPerDamage() { - return 10000; - } - - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } - - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } - - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemSolarHelmetRevealing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemSolarHelmetRevealing.java deleted file mode 100644 index ea09d88..0000000 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/ItemSolarHelmetRevealing.java +++ /dev/null @@ -1,319 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 Tombenpotter. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. - * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. - * http://www.minecraftforum.net/topic/1585216- - ******************************************************************************/ -package electricMagicTools.tombenpotter.electricmagictools.common.items.armor; - -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import thaumcraft.api.IGoggles; -import thaumcraft.api.IVisDiscountGear; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; - -public class ItemSolarHelmetRevealing extends ItemArmor implements ISpecialArmor, IRevealer, IVisDiscountGear, IGoggles, IElectricItem { - - public int maxCharge = 10000000; - 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(); - - @SuppressWarnings("unchecked") - public ItemSolarHelmetRevealing(int par3, int par4) { - super(ArmorMaterial.IRON, par3, par4); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.maxCharge = 1000000; - this.genDay = 256; - this.genNight = 128; - - 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)); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { - return "electricmagictools:textures/models/solarrevealinghelmet.png"; - } - - @SuppressWarnings("unchecked") - @Override - public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { - if (Config.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)); - } - } - - 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); - - 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)) { - int 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)) { - int 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 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; - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:solarrevealinghelmet"); - } - - @Override - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { - return true; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("Vis discount: 7%"); - } - - @Override - public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { - return 7; - } - - @Override - public boolean showNodes(ItemStack itemstack, EntityLivingBase 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(); - int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); - } - - public double getDamageAbsorptionRatio() { - return 1.1000000000000001D; - } - - public int getEnergyPerDamage() { - return 10000; - } - - private double getBaseAbsorptionRatio() { - return 0.14999999999999999D; - } - - @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())); - } - } - - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return true; - } - - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } - - @Override - public int getTier(ItemStack itemStack) { - return 1; - } - - @Override - public int getTransferLimit(ItemStack itemStack) { - return 1000; - } - - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } - - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } - - @Override - public Item getChargedItem(ItemStack itemStack) { - return this; - } - - @Override - public Item getEmptyItem(ItemStack itemStack) { - return this; - } -} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemElectricBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemElectricBootsTraveller.java new file mode 100644 index 0000000..cc5bd35 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemElectricBootsTraveller.java @@ -0,0 +1,261 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + * + * Attention: this class originally belongs to the ThaumicTinkerer mod. + * All I did was modifying it to fulfill my needs. + * + * ThaumicTinkerer is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * http://www.minecraftforum.net/topic/1813058- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IMetalArmor; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.common.Thaumcraft; + +import java.util.ArrayList; +import java.util.List; + +public class ItemElectricBootsTraveller extends ItemArmor implements IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor { + + public int maxCharge = 10000; + @SuppressWarnings({"unchecked", "rawtypes"}) + public static List playersWith1Step = new ArrayList(); + + public ItemElectricBootsTraveller(int par3, int par4) { + super(ArmorMaterial.DIAMOND, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(CreativeTab.tabTombenpotter); + if (ticks()) + 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) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":electricboots"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/electricboots.png"; + } + + boolean ticks() { + return true; + } + + @SubscribeEvent + public void onEntityUpdate(LivingUpdateEvent event) { + if (event.entityLiving instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entityLiving; + ItemStack armor = player.getCurrentArmor(3 - armorType); + if (armor != null && armor.getItem() == this) + tickPlayer(player); + } + } + + void tickPlayer(EntityPlayer player) { + if (player.worldObj.isRemote) + player.stepHeight = player.isSneaking() ? 0.5F : 1F; + if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) + player.moveFlying(0F, 1F, player.capabilities.isFlying ? 0.075F : 0.15F); + player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; + player.fallDistance = 0F; + } + + @SubscribeEvent + public void onPlayerJump(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 += 0.3; + } + } + + @SubscribeEvent(priority = EventPriority.HIGH) + public void onLivingUpdate(LivingUpdateEvent event) { + if (event.entityLiving instanceof EntityPlayer && event.entityLiving.worldObj.isRemote) { + EntityPlayer player = (EntityPlayer) event.entityLiving; + + boolean highStepListed = playersWith1Step.contains(player.getCommandSenderName()); + boolean hasHighStep = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this; + + if (hasHighStep && !highStepListed) + playersWith1Step.add(player.getCommandSenderName()); + + if (!hasHighStep && highStepListed) { + playersWith1Step.remove(player.getCommandSenderName()); + player.stepHeight = 0.5F; + } + } + } + + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 2; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 100; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } + + public int getEnergyPerDamage() { + return 100; + } + + @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(); + int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); + } + + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } + + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 2%"); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 2; + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (Config.smoke == false && player.onGround == false) { + int miny = (int) (player.boundingBox.minY - 2.0D); + Thaumcraft.proxy.smokeSpiral(player.worldObj, player.posX, player.boundingBox.minY + player.height / 2.0F, player.posZ, 1.5F, player.worldObj.rand.nextInt(620), miny); + } + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemNanoBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemNanoBootsTraveller.java new file mode 100644 index 0000000..b3eb1b6 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemNanoBootsTraveller.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + * + * Attention: this class originally belongs to the ThaumicTinkerer mod. + * All I did was modifying it to fulfill my needs. + * + * ThaumicTinkerer is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * http://www.minecraftforum.net/topic/1813058- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemNanoBootsTraveller extends ItemElectricBootsTraveller { + + public int maxCharge = 500000; + + public ItemNanoBootsTraveller(int par3, int par4) { + super(par3, par4); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":nanobootstravel"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/nanobootstravel.png"; + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 4; + } + + @Override + void tickPlayer(EntityPlayer player) { + if (player.worldObj.isRemote) + player.stepHeight = player.isSneaking() ? 0.5F : 1F; + if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) + player.moveFlying(0F, 1F, (float) (player.capabilities.isFlying ? 0.075F : Config.nanoBootsSpeed)); + player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; + player.fallDistance = 0F; + } + + @SubscribeEvent + @Override + public void onPlayerJump(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 += Config.nanoBootsJump; + } + } + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 1000; + } + + public int getEnergyPerDamage() { + return 200; + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 4%"); + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemQuantumBootsTraveller.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemQuantumBootsTraveller.java new file mode 100644 index 0000000..f63b0ba --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/boots/ItemQuantumBootsTraveller.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + * + * Attention: this class originally belongs to the ThaumicTinkerer mod. + * All I did was modifying it to fulfill my needs. + * + * ThaumicTinkerer is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * http://www.minecraftforum.net/topic/1813058- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.boots; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemQuantumBootsTraveller extends ItemElectricBootsTraveller { + + public int maxCharge = 1000000; + + public ItemQuantumBootsTraveller(int par3, int par4) { + super(par3, par4); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":quantumbootstravel"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/quantumbootstravel.png"; + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 5; + } + + @Override + void tickPlayer(EntityPlayer player) { + if (player.worldObj.isRemote) + player.stepHeight = player.isSneaking() ? 0.5F : 1F; + if ((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F) + player.moveFlying(0F, 1F, (float) (player.capabilities.isFlying ? 0.075F : Config.quantumBootsSpeed)); + player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F; + player.fallDistance = 0F; + } + + @SubscribeEvent + @Override + public void onPlayerJump(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 += Config.quantumBootsJump; + } + } + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 1000; + } + + public int getEnergyPerDamage() { + return 200; + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 5%"); + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemElectricGoggles.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemElectricGoggles.java new file mode 100644 index 0000000..6819205 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemElectricGoggles.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemElectricGoggles extends ItemQuantumThaumicHelmet { + + public int maxCharge = 10000; + + public ItemElectricGoggles(int par3, int par4) { + super(par3, par4); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":electricgoggles"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/electricgoggles.png"; + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 5; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + public int getEnergyPerDamage() { + return 100; + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 10; + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 5%"); + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemNanoThaumicHelmet.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemNanoThaumicHelmet.java new file mode 100644 index 0000000..74713cb --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemNanoThaumicHelmet.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemNanoThaumicHelmet extends ItemQuantumThaumicHelmet { + + public int maxCharge = 100000; + + public ItemNanoThaumicHelmet(int par3, int par4) { + super(par3, par4); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(27); + this.setMaxStackSize(1); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":nanothaumichelmet"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/thaumicnanohelmet.png"; + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 6; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + public int getEnergyPerDamage() { + return 1000; + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (Config.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)); + } + } + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 100; + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 6%"); + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemQuantumThaumicHelmet.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemQuantumThaumicHelmet.java new file mode 100644 index 0000000..11b2712 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemQuantumThaumicHelmet.java @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IMetalArmor; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import thaumcraft.api.IGoggles; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.nodes.IRevealer; + +import java.util.*; + +public class ItemQuantumThaumicHelmet extends ItemArmor implements IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static final Map potionCost = new HashMap(); + + public ItemQuantumThaumicHelmet(int par3, int par4) { + super(ArmorMaterial.DIAMOND, par3, par4); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(27); + this.setMaxStackSize(1); + + 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)); + } + + public int maxCharge = 10000000; + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":quantumthaumichelmet"); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/thaumicquantumhelmet.png"; + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 2; + } + + @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); + } + + 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 (Config.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)); + } + } + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 10000; + } + + @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())); + } + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 8%"); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 8; + } + + @Override + public boolean showNodes(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 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(); + int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); + } + + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } + + public int getEnergyPerDamage() { + return 10000; + } + + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemSolarHelmetRevealing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemSolarHelmetRevealing.java new file mode 100644 index 0000000..c23c126 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/goggles/ItemSolarHelmetRevealing.java @@ -0,0 +1,315 @@ +/******************************************************************************* + * Copyright (c) 2014 Tombenpotter. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html + * + * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. + * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. + * http://www.minecraftforum.net/topic/1585216- + ******************************************************************************/ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.goggles; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import thaumcraft.api.IGoggles; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.nodes.IRevealer; + +import java.util.*; + +public class ItemSolarHelmetRevealing extends ItemArmor implements ISpecialArmor, IRevealer, IVisDiscountGear, IGoggles, IElectricItem { + + public int maxCharge = 10000000; + 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(); + + @SuppressWarnings("unchecked") + public ItemSolarHelmetRevealing(int par3, int par4) { + super(ArmorMaterial.IRON, par3, par4); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.maxCharge = 1000000; + this.genDay = 256; + this.genNight = 128; + + 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)); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layerType) { + return ElectricMagicTools.texturePath + ":textures/models/solarrevealinghelmet.png"; + } + + @SuppressWarnings("unchecked") + @Override + public void onArmorTick(World worldObj, EntityPlayer player, ItemStack itemStack) { + if (Config.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)); + } + } + + 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); + + 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)) { + int 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)) { + int 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 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; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":solarrevealinghelmet"); + } + + @Override + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player) { + return true; + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 7%"); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 7; + } + + @Override + public boolean showNodes(ItemStack itemstack, EntityLivingBase 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(); + int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(0, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); + } + + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } + + public int getEnergyPerDamage() { + return 10000; + } + + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } + + @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())); + } + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return true; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 1; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 1000; + } + + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemFeatherWing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemFeatherWing.java new file mode 100644 index 0000000..45b8691 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemFeatherWing.java @@ -0,0 +1,79 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.client.model.ModelWings; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.EnumHelper; + +public class ItemFeatherWing extends ItemArmor { + + public ItemFeatherWing() { + super(EnumHelper.addArmorMaterial("EMTWINGFEATHER", 1, new int[]{2, 2, 2, 2}, 6), 7, 1); + this.setMaxStackSize(1); + this.setMaxDamage(120); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.isDamageable(); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":featherwings"); + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/featherwing.png"; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + return new ModelWings(); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + if (world.isRemote) { + boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed(); + boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed(); + boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed(); + + if (isJumping) { + player.motionY = 0.25; + player.fallDistance = 0; + } + + if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) { + player.motionY *= 0.9; + player.fallDistance = 0; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) + player.motionY = -0.6; + + if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode) + player.motionY = -0.3; + + if (isSneaking && !player.onGround) { + player.motionY = -0.6; + player.fallDistance = 0F; + } + + if (player.fallDistance > 0.0F) + player.fallDistance -= 0.25F; + } + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemNanoWing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemNanoWing.java new file mode 100644 index 0000000..19437b6 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemNanoWing.java @@ -0,0 +1,211 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.client.model.ModelWings; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IMetalArmor; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemNanoWing extends ItemArmor implements IVisDiscountGear, IElectricItem, ISpecialArmor, IMetalArmor { + + public int maxCharge = 100000; + + public ItemNanoWing() { + super(ArmorMaterial.DIAMOND, 7, 1); + this.setMaxStackSize(1); + this.setMaxDamage(27); + this.setCreativeTab(CreativeTab.tabTombenpotter); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 5; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":nanowings"); + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/nanowing.png"; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + return new ModelWings(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 5"); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + if (world.isRemote) { + boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed(); + boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed(); + boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed(); + + if (isJumping) { + player.motionY = 0.7; + player.fallDistance = 0; + } + + if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) { + player.motionY *= 0.3; + player.fallDistance = 0; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) + player.motionY = -0.4; + + if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode) + player.motionY = -0.2; + + if (isSneaking && !player.onGround) { + player.motionY = -0.6; + player.fallDistance = 0; + } + } + if (player.fallDistance > 0.0F) + player.fallDistance -= 0.75F; + } + + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 3; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 1000; + } + + @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())); + } + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } + + public int getEnergyPerDamage() { + return 100; + } + + @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(); + int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); + } + + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } + + private double getBaseAbsorptionRatio() { + return 0.14999999999999999D; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemQuantumWing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemQuantumWing.java new file mode 100644 index 0000000..634f7fc --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemQuantumWing.java @@ -0,0 +1,210 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.client.model.ModelWings; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IMetalArmor; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemQuantumWing extends ItemArmor implements IVisDiscountGear, IElectricItem, ISpecialArmor, IMetalArmor { + + public int maxCharge = 1000000; + + public ItemQuantumWing() { + super(ArmorMaterial.DIAMOND, 7, 1); + this.setMaxStackSize(1); + this.setMaxDamage(27); + this.setCreativeTab(CreativeTab.tabTombenpotter); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 6; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":quantumwings"); + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/quantumwing.png"; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + return new ModelWings(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 6"); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + if (world.isRemote) { + boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed(); + boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed(); + boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed(); + + if (isJumping) + player.motionY = 0.85; + + if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) + player.motionY *= 0.3; + + if (player.isInWater() && !player.capabilities.isCreativeMode) + player.motionY = -0.1; + + if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode) + player.motionY = -0.05; + + if (isSneaking && isHoldingJump) + player.motionY = 0; + + if (isSneaking && !player.onGround && !isHoldingJump) + player.motionY = -0.6; + + + if (player.fallDistance > 0.0F) + player.fallDistance = 0F; + } + } + + @Override + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player) { + return true; + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } + + @Override + public int getTier(ItemStack itemStack) { + return 3; + } + + @Override + public int getTransferLimit(ItemStack itemStack) { + return 10000; + } + + @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())); + } + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } + + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } + + public int getEnergyPerDamage() { + return 100; + } + + @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(); + int damageLimit = energyPerDamage <= 0 ? 0 : (25 * ElectricItem.manager.getCharge(armor)) / energyPerDamage; + return new net.minecraftforge.common.ISpecialArmor.ArmorProperties(3, absorptionRatio, 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 void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false); + } + + public double getDamageAbsorptionRatio() { + return 1.1000000000000001D; + } + + private double getBaseAbsorptionRatio() { + return 0.34999999999999999D; + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemThaumiumReinforcedWing.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemThaumiumReinforcedWing.java new file mode 100644 index 0000000..7a724b5 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/armor/wings/ItemThaumiumReinforcedWing.java @@ -0,0 +1,94 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.items.armor.wings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.client.model.ModelWings; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.IRepairable; +import thaumcraft.api.IVisDiscountGear; +import thaumcraft.api.aspects.Aspect; + +import java.util.List; + +public class ItemThaumiumReinforcedWing extends ItemArmor implements IVisDiscountGear, IRepairable { + + public ItemThaumiumReinforcedWing() { + super(ArmorMaterial.IRON, 7, 1); + this.setMaxStackSize(1); + this.setMaxDamage(250); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.isDamageable(); + } + + @Override + public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) { + return 4; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":thaumiumwings"); + } + + @Override + @SideOnly(Side.CLIENT) + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return ElectricMagicTools.texturePath + ":textures/models/thaumiumwing.png"; + } + + @Override + @SideOnly(Side.CLIENT) + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + return new ModelWings(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("Vis discount: 4"); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + if (world.isRemote) { + boolean isJumping = Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed(); + boolean isHoldingJump = Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed(); + boolean isSneaking = Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed(); + + if (isJumping) { + player.motionY = 0.5; + player.fallDistance = 0; + } + + if (isHoldingJump && !player.onGround && player.motionY < 0 && !player.capabilities.isCreativeMode) { + player.motionY *= 0.5; + player.fallDistance = 0; + } + + if (player.isInWater() && !player.capabilities.isCreativeMode) + player.motionY = -0.6; + + if ((player.worldObj.isRaining() || player.worldObj.isThundering()) && !player.capabilities.isCreativeMode) + player.motionY = -0.3; + + if (isSneaking && !player.onGround) { + player.motionY = -0.6; + player.fallDistance = 0; + } + + if (player.fallDistance > 0.0F) + player.fallDistance -= 0.5F; + } + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTMachines.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTMachines.java index 9bc5f56..3cb7f9e 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTMachines.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTMachines.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -17,35 +17,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/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars.java index 9736dd5..b426f86 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars.java @@ -1,190 +1,193 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.blocks; -import java.util.List; - +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import net.minecraft.block.Block; +import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; + +import java.util.List; 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(Config.compressedSolarOutput + " EU/T"); - break; - } - case 1: { - list.add(Config.doubleCompressedSolarOutput + " EU/T"); - break; - } - case 2: { - list.add(Config.tripleCompressedSolarOutput + " EU/T"); - break; - } - case 3: { - list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T when raining"); - break; - } - case 4: { - list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T when raining"); - break; - } - case 5: { - list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T when raining"); - break; - } - case 6: { - list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T at night"); - break; - } - case 7: { - list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T at night"); - break; - } - case 8: { - list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T at night"); - break; - } - case 9: { - list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 3"); - break; - } - case 10: { - list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 3"); - break; - } + @Override + @SuppressWarnings({"unchecked", "rawtypes"}) + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { + if (GuiScreen.isShiftKeyDown()) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add(Config.compressedSolarOutput + " EU/T"); + break; + } + case 1: { + list.add(Config.doubleCompressedSolarOutput + " EU/T"); + break; + } + case 2: { + list.add(Config.tripleCompressedSolarOutput + " EU/T"); + break; + } + case 3: { + list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T when raining"); + break; + } + case 4: { + list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T when raining"); + break; + } + case 5: { + list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T when raining"); + break; + } + case 6: { + list.add("Special Effect: " + Config.compressedSolarOutput + " EU/T at night"); + break; + } + case 7: { + list.add("Special Effect: " + Config.doubleCompressedSolarOutput + " EU/T at night"); + break; + } + case 8: { + list.add("Special Effect: " + Config.tripleCompressedSolarOutput + " EU/T at night"); + break; + } + case 9: { + list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 3"); + break; + } + case 10: { + list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 3"); + break; + } - case 11: { - list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 3"); - break; - } - case 12: { - list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2 when located in the nether"); - break; - } - case 13: { - list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2 when located in the nether"); - break; - } - case 14: { - list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2 when lava is on top"); - list.add("Special Effect: Output multiplied by 2 when located in the nether"); - } - case 15: { - list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); - break; - } - default: - list.add("Didn't I forget a tooltip?"); - break; - } - } + case 11: { + list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 3"); + break; + } + case 12: { + list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2 when located in the nether"); + break; + } + case 13: { + list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2 when located in the nether"); + break; + } + case 14: { + list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2 when lava is on top"); + list.add("Special Effect: Output multiplied by 2 when located in the nether"); + } + case 15: { + list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); + break; + } + default: + list.add("Didn't I forget a tooltip?"); + break; + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars2.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars2.java index a9c976d..6d7247a 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars2.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEMTSolars2.java @@ -1,99 +1,102 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.blocks; -import java.util.List; - +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import net.minecraft.block.Block; +import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; + +import java.util.List; 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("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); - break; - } - case 1: { - list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); - break; - } - case 2: { - list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); - break; - } - case 3: { - list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); - break; - } - case 4: { - list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); - list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); - break; - } - default: - list.add("Didn't I forget a tooltip?"); - break; - } - } + @Override + @SuppressWarnings({"unchecked", "rawtypes"}) + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { + if (GuiScreen.isShiftKeyDown()) { + switch (itemstack.getItemDamage()) { + case 0: { + list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); + break; + } + case 1: { + list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is over Y = 160"); + break; + } + case 2: { + list.add("Normal Conditions: " + Config.compressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); + break; + } + case 3: { + list.add("Normal Conditions: " + Config.doubleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); + break; + } + case 4: { + list.add("Normal Conditions: " + Config.tripleCompressedSolarOutput + " EU/T"); + list.add("Special Effect: Output multiplied by 2.5 when the block is under Y = 10"); + break; + } + default: + list.add("Didn't I forget a tooltip?"); + break; + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEssentiaGenerators.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEssentiaGenerators.java index 785983f..bc8bed6 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEssentiaGenerators.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/blocks/ItemBlockEssentiaGenerators.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -17,39 +17,39 @@ import net.minecraft.item.ItemStack; 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; - } - 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; + } + default: + name = "nothing"; + } + return getUnlocalizedName() + "." + name; + } - @Override - public int getMetadata(int meta) { - return meta; - } + @Override + public int getMetadata(int meta) { + return meta; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemBaseFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemBaseFocus.java index 502f91a..b14447a 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemBaseFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemBaseFocus.java @@ -1,18 +1,17 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; -import java.util.List; - +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; @@ -24,118 +23,119 @@ import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.IWandFocus; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public abstract class ItemBaseFocus extends Item implements IWandFocus { - private IIcon ornament, depth; + private IIcon ornament, depth; - public ItemBaseFocus() { - super(); - this.setMaxDamage(1); - this.setNoRepair(); - this.setMaxStackSize(1); - this.setCreativeTab(CreativeTab.tabTombenpotter); - } + public ItemBaseFocus() { + super(); + this.setMaxDamage(1); + this.setNoRepair(); + this.setMaxStackSize(1); + this.setCreativeTab(CreativeTab.tabTombenpotter); + } - boolean hasOrnament() { - return false; - } + boolean hasOrnament() { + return false; + } - boolean hasDepth() { - return false; - } + boolean hasDepth() { + return false; + } - @Override - public int getFocusColor() { - return 0; - } + @Override + public int getFocusColor() { + return 0; + } - @Override - public boolean isItemTool(ItemStack par1ItemStack) { - return true; - } + @Override + public boolean isItemTool(ItemStack par1ItemStack) { + return true; + } - @Override - public EnumRarity getRarity(ItemStack itemstack) { - return EnumRarity.rare; - } + @Override + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.rare; + } - @Override - public IIcon getFocusDepthLayerIcon() { - return depth; - } + @Override + public IIcon getFocusDepthLayerIcon() { + return depth; + } - @Override - public IIcon getOrnament() { - return ornament; - } + @Override + public IIcon getOrnament() { + return ornament; + } - @Override - public WandFocusAnimation getAnimation() { - return WandFocusAnimation.WAVE; - } + @Override + public WandFocusAnimation getAnimation() { + return WandFocusAnimation.WAVE; + } - @Override - public AspectList getVisCost() { - return null; - } + @Override + public AspectList getVisCost() { + return null; + } - public boolean isUseItem() { - return isVisCostPerTick(); - } + public boolean isUseItem() { + return isVisCostPerTick(); + } - @Override - public boolean isVisCostPerTick() { - return false; - } + @Override + public boolean isVisCostPerTick() { + return false; + } - @Override - public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) { - if (isUseItem()) - paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE); - return paramItemStack; - } + @Override + public ItemStack onFocusRightClick(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, MovingObjectPosition paramMovingObjectPosition) { + if (isUseItem()) + paramEntityPlayer.setItemInUse(paramItemStack, Integer.MAX_VALUE); + return paramItemStack; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { - } + } - @Override - public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { - } + @Override + public void onPlayerStoppedUsingFocus(ItemStack itemstack, World world, EntityPlayer player, int count) { + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "00"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "00"; + } - @Override - public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { - return false; - } + @Override + public boolean onFocusBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) { + return false; + } - @Override - public boolean acceptsEnchant(int id) { - return false; - } + @Override + public boolean acceptsEnchant(int id) { + return false; + } - @Override - public int getItemEnchantability() { - return 5; - } + @Override + public int getItemEnchantability() { + return 5; + } - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - AspectList cost = getVisCost(); - if (cost != null && cost.size() > 0) { - list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); - for (Aspect aspect : cost.getAspectsSorted()) { - float amount = cost.getAmount(aspect) / 100.0F; - list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount); - } - } - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + AspectList cost = getVisCost(); + if (cost != null && cost.size() > 0) { + list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); + for (Aspect aspect : cost.getAspectsSorted()) { + float amount = cost.getAmount(aspect) / 100.0F; + list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount); + } + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChargeFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChargeFocus.java index e6ad52d..be4be26 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChargeFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChargeFocus.java @@ -1,16 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import net.minecraft.client.renderer.texture.IIconRegister; @@ -21,68 +25,65 @@ import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; 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(); - } + public ItemChargeFocus() { + super(); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:chargefocus"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":chargefocus"); + } - @Override - public int getFocusColor() { - return 0xFFFF00; - } + @Override + public int getFocusColor() { + return 0xFFFF00; + } - @Override - public AspectList getVisCost() { - return visCost; - } + @Override + public AspectList getVisCost() { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "CHARGING"; - } + @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 (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { - if (!world.isRemote) { + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { + if (!world.isRemote) { - int energyLeft = Config.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)) { - int 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)) { - int sentPacket = ElectricItem.manager.charge(player.inventory.mainInventory[j], energyLeft, 4, false, false); - energyLeft -= sentPacket; - } - } else { - return itemstack; - } - } - } - } - return itemstack; - } + int energyLeft = Config.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)) { + int 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)) { + int 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/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChristmasFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChristmasFocus.java index 4632163..c8097c0 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChristmasFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemChristmasFocus.java @@ -1,16 +1,19 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.monster.EntitySnowman; import net.minecraft.entity.player.EntityPlayer; @@ -20,50 +23,48 @@ import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; 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(); - } + public ItemChristmasFocus() { + super(); + } - @Override - public int getFocusColor() { - return 99999999; - } + @Override + public int getFocusColor() { + return 99999999; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:christmasfocus"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":christmasfocus"); + } - @Override - public AspectList getVisCost() { - return visCost; - } + @Override + public AspectList getVisCost() { + 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 movingobjectposition) { - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { - if (!world.isRemote) { - EntitySnowman snowman; - snowman = new EntitySnowman(world); - snowman.setPosition(player.posX + 2, player.posY + 1, player.posZ + 2); - world.spawnEntityInWorld(snowman); - } - } - return itemstack; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { + if (!world.isRemote) { + EntitySnowman snowman; + snowman = new EntitySnowman(world); + snowman.setPosition(player.posX + 2, player.posY + 1, player.posZ + 2); + world.spawnEntityInWorld(snowman); + } + } + return itemstack; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemExplosionFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemExplosionFocus.java index 7da00d4..5e3386a 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemExplosionFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemExplosionFocus.java @@ -1,16 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -19,49 +23,46 @@ import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityLaser; public class ItemExplosionFocus extends ItemBaseFocus { - private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); + private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200); - public ItemExplosionFocus() { - super(); - } + public ItemExplosionFocus() { + super(); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:explosionfocus"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":explosionfocus"); + } - @Override - public int getFocusColor() { - return 9990; - } + @Override + public int getFocusColor() { + return 9990; + } - @Override - public AspectList getVisCost() { - return visCost; - } + @Override + public AspectList getVisCost() { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "EXPLOSION"; - } + @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 (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { - if (!world.isRemote) { - EntityLaser laser; - laser = new EntityLaser(world, player, 2); - world.spawnEntityInWorld(laser); - } - } - return itemstack; - } + @Override + public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { + if (!world.isRemote) { + EntityLaser laser; + laser = new EntityLaser(world, player, 2); + world.spawnEntityInWorld(laser); + } + } + return itemstack; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemShieldFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemShieldFocus.java index 79a2daf..d1e039b 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemShieldFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemShieldFocus.java @@ -1,16 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; @@ -20,98 +24,95 @@ import net.minecraft.world.World; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; public class ItemShieldFocus extends ItemBaseFocus { - 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(); - } + public ItemShieldFocus() { + super(); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:shieldfocus"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":shieldfocus"); + } - @Override - public int getFocusColor() { - return 555555555; - } + @Override + public int getFocusColor() { + return 555555555; + } - @Override - public boolean isUseItem() { - return true; - } + @Override + public boolean isUseItem() { + return true; + } - @Override - public AspectList getVisCost() { - return visCost; - } + @Override + public AspectList getVisCost() { + return visCost; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "SHIELD"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "SHIELD"; + } - @Override - public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int time) { - player.motionX = 0.0D; - player.motionY = 0.0D; - player.motionZ = 0.0D; + @Override + public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int time) { + player.motionX = 0.0D; + player.motionY = 0.0D; + player.motionZ = 0.0D; - ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { - int x = MathHelper.floor_double(player.posX); - int y = MathHelper.floor_double(player.posY); - int z = MathHelper.floor_double(player.posZ); + ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); + if (wand.consumeAllVis(itemstack, player, getVisCost(), true, true)) { + 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.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); - } + // 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); - } - } + // 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); + } + } - } + } - @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); + @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); - } + // 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); - } + // 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); + } - ItemStack milk = (new ItemStack(Items.milk_bucket)); - player.curePotionEffects(milk); - } + ItemStack milk = (new ItemStack(Items.milk_bucket)); + player.curePotionEffects(milk); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemWandChargingFocus.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemWandChargingFocus.java index 8a1bfac..e6b4ecd 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemWandChargingFocus.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/foci/ItemWandChargingFocus.java @@ -1,5 +1,9 @@ package electricMagicTools.tombenpotter.electricmagictools.common.items.foci; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -7,61 +11,58 @@ import net.minecraft.item.ItemStack; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.common.items.wands.ItemWandCasting; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; public class ItemWandChargingFocus extends ItemBaseFocus { - AspectList visCost = new AspectList(); + AspectList visCost = new AspectList(); - public ItemWandChargingFocus() { - super(); - } + public ItemWandChargingFocus() { + super(); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:wandchargefocus"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":wandchargefocus"); + } - @Override - public int getFocusColor() { - return 0xFFFF450; - } + @Override + public int getFocusColor() { + return 0xFFFF450; + } - @Override - public String getSortingHelper(ItemStack itemstack) { - return "CHARGING"; - } + @Override + public String getSortingHelper(ItemStack itemstack) { + return "ELECTRICCHARGING"; + } - @Override - public boolean isVisCostPerTick() { - return true; - } + @Override + public boolean isVisCostPerTick() { + return true; + } - @Override - public AspectList getVisCost() { - return visCost; - } + @Override + public AspectList getVisCost() { + 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, Config.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.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, Config.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, Config.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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemDiamondChainsaw.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemDiamondChainsaw.java index 8970332..8e146bd 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemDiamondChainsaw.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemDiamondChainsaw.java @@ -1,20 +1,21 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -25,83 +26,82 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemDiamondChainsaw extends ItemThaumiumChainsaw { - public int maxCharge = 40000; - private final int cost = 200; - private final int hitCost = 300; + public int maxCharge = 40000; + private final int cost = 200; + private final int hitCost = 300; - public ItemDiamondChainsaw() { - super(); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(27); - this.setMaxStackSize(1); - } + public ItemDiamondChainsaw() { + super(); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(27); + this.setMaxStackSize(1); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:diamondchainsaw"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":diamondchainsaw"); + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 300; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 300; + } - @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); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.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; + } - @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())); - } - } + @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())); + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemElectricHoeGrowth.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemElectricHoeGrowth.java index 81db7bd..65e8e03 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemElectricHoeGrowth.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemElectricHoeGrowth.java @@ -1,94 +1,92 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - -import javax.swing.Icon; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import thaumcraft.common.items.equipment.ItemElementalHoe; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import javax.swing.*; +import java.util.List; public class ItemElectricHoeGrowth extends ItemElementalHoe implements IElectricItem { - public Icon icon; - public int maxCharge = 1000000; - public int growthCost = 1000; - public int tillCost = 100; + public Icon icon; + public int maxCharge = 1000000; + public int growthCost = 1000; + public int tillCost = 100; - public ItemElectricHoeGrowth() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - } + public ItemElectricHoeGrowth() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + } - /** - * @SideOnly(Side.CLIENT) - * @Override public void registerIcons(IconRegister iconRegister) { this.icon = iconRegister .registerIcon("electricmagictools:electrichoegrowth"); } - **/ - @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) + * @Override public void registerIcons(IconRegister iconRegister) { this.icon = iconRegister .registerIcon("electricmagictools:electrichoegrowth"); } + */ + @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())); + } + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 1000; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 1000; + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolDiamond.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolDiamond.java index de92ad0..d83422f 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolDiamond.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolDiamond.java @@ -1,20 +1,22 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -25,93 +27,91 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemOmnitoolDiamond extends ItemOmnitoolIron { - public int maxCharge = 70000; - private int cost; - private final int hitCost = 250; + public int maxCharge = 70000; + private int cost; + private final int hitCost = 250; - public ItemOmnitoolDiamond() { - super(); - this.efficiencyOnProperMaterial = 16F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - if (Config.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(350); - } - } + public ItemOmnitoolDiamond() { + super(); + this.efficiencyOnProperMaterial = 16F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + if (Config.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(350); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:diamondomnitool"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":diamondomnitool"); + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 400; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 400; + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (Config.toolsInBore == false) { - 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 (Config.toolsInBore == false) { + cost = 200; + } else { + cost = 1; + } + 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.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.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.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_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), 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; + } - @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())); - } - } + @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())); + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolIron.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolIron.java index 5373d10..6a257c1 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolIron.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolIron.java @@ -1,21 +1,23 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -29,167 +31,165 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.event.ForgeEventFactory; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemOmnitoolIron extends ItemPickaxe implements IElectricItem { - public int maxCharge = 20000; - private int cost; - private final int hitCost = 125; + public int maxCharge = 20000; + private int cost; + private final int hitCost = 125; - public ItemOmnitoolIron() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 13F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - if (Config.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(200); - } - } + public ItemOmnitoolIron() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 13F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + if (Config.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(200); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:ironomnitool"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":ironomnitool"); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 200; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 200; + } - @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())); - } - } + @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())); + } + } - @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 (Config.toolsInBore == false) { - cost = 100; - } else { - cost = 1; - } - ElectricItem.manager.use(stack, cost, entityLiving); - return true; - } + { + if (Config.toolsInBore == false) { + 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 isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + 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), 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().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().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 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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolThaumium.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolThaumium.java index f1f43b5..4e9796b 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolThaumium.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemOmnitoolThaumium.java @@ -1,20 +1,22 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -25,93 +27,91 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemOmnitoolThaumium extends ItemOmnitoolDiamond { - public int maxCharge = 140000; - private int cost; - private final int hitCost = 650; + public int maxCharge = 140000; + private int cost; + private final int hitCost = 650; - public ItemOmnitoolThaumium() { - super(); - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - if (Config.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(467); - } - } + public ItemOmnitoolThaumium() { + super(); + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + if (Config.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(467); + } + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:thaumiumomnitool"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":thaumiumomnitool"); + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 800; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 800; + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (Config.toolsInBore == false) { - 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 (Config.toolsInBore == false) { + cost = 300; + } else { + cost = 1; + } + 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.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.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.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_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), 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; + } - @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())); - } - } + @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())); + } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemRockbreakerDrill.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemRockbreakerDrill.java index 9793322..cb6a0df 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemRockbreakerDrill.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemRockbreakerDrill.java @@ -1,27 +1,25 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- - * + * * This class originally belongs to Azanor, but with his permission I took it, and modified it to make it work as I wanted to. ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.swing.Icon; - import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; @@ -46,254 +44,258 @@ import net.minecraftforge.event.ForgeEventFactory; import thaumcraft.common.Thaumcraft; import thaumcraft.common.entities.EntityFollowingItem; import thaumcraft.common.lib.Utils; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import javax.swing.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; public class ItemRockbreakerDrill extends ItemPickaxe implements IElectricItem { - 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; + 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 ItemRockbreakerDrill() { - super(ToolMaterial.EMERALD); - side = 0; - setCreativeTab(CreativeTab.tabTombenpotter); - this.efficiencyOnProperMaterial = 25F; - this.setMaxStackSize(1); - if (Config.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(2571); - } - } + public ItemRockbreakerDrill() { + super(ToolMaterial.EMERALD); + side = 0; + setCreativeTab(CreativeTab.tabTombenpotter); + this.efficiencyOnProperMaterial = 25F; + this.setMaxStackSize(1); + if (Config.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(2571); + } + } - public int maxCharge = 900000; - private int cost; - private final int searchCost = 1000; - private final int hitCost = 400; + public int maxCharge = 900000; + private int cost; + private final int searchCost = 1000; + private final int hitCost = 400; - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:rockbreakerdrill"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":rockbreakerdrill"); + } - @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())); - } - } + @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())); + } + } - 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 = Utils.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 = Utils.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 (Config.toolsInBore == false) { - cost = 350; - } else { - cost = 1; - } - if (entityLiving.isSneaking()) { - return super.onBlockDestroyed(stack, world, block, x, y, z, entityLiving); - } - 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; - } + @SuppressWarnings("rawtypes") + @Override + public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) { + if (Config.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; + } - @SuppressWarnings("unused") - @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().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); + @SuppressWarnings("unused") + @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().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); - player.swingItem(); - return super.onItemUse(stack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - } + 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; + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 900; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 900; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.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_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 6; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 6; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemStreamChainsaw.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemStreamChainsaw.java index b93b89f..ff0415c 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemStreamChainsaw.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemStreamChainsaw.java @@ -1,25 +1,26 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- - * + * * This class originally belongs to Azanor, but with his permission I took it, and modified it to make it work as I wanted to. ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -35,166 +36,165 @@ import net.minecraft.world.World; import thaumcraft.common.Thaumcraft; import thaumcraft.common.lib.Utils; import thaumcraft.common.lib.network.fx.PacketFXBlockBubble; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.awt.*; +import java.util.ArrayList; +import java.util.List; public class ItemStreamChainsaw extends ItemAxe implements IElectricItem { - boolean alternateServer; - boolean alternateClient; - @SuppressWarnings("rawtypes") - public static ArrayList oreDictLogs = new ArrayList(); - public int maxCharge = 900000; - private final int cost = 400; - private final int hitCost = 500; + boolean alternateServer; + boolean alternateClient; + @SuppressWarnings("rawtypes") + public static ArrayList oreDictLogs = new ArrayList(); + public int maxCharge = 900000; + private final int cost = 400; + private final int hitCost = 500; - public ItemStreamChainsaw() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 25F; - alternateServer = false; - alternateClient = false; - setCreativeTab(CreativeTab.tabTombenpotter); - this.maxStackSize = 1; - this.setMaxDamage(27); - } + public ItemStreamChainsaw() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 25F; + alternateServer = false; + alternateClient = false; + setCreativeTab(CreativeTab.tabTombenpotter); + this.maxStackSize = 1; + this.setMaxDamage(27); + } - public EnumAction getItemUseAction(ItemStack itemstack) { - return EnumAction.bow; - } + public EnumAction getItemUseAction(ItemStack itemstack) { + return EnumAction.bow; + } - 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))) { - if (!world.isRemote) { - if (Utils.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); - } + 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))) { + if (!world.isRemote) { + if (Utils.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); + } - 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) { - Utils.breakFurthestBlock(world, x, y, z, bi, player); - Thaumcraft.packetPipeline.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)); + 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) { + Utils.breakFurthestBlock(world, x, y, z, bi, player); + Thaumcraft.packetPipeline.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)); - 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); - } + 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 canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 3; - } + @Override + public int getTier(ItemStack itemStack) { + return 3; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 900; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 900; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:streamchainsaw"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":streamchainsaw"); + } - @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())); - } - } + @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())); + } + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.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 isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + 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; - } + @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 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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumChainsaw.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumChainsaw.java index 509901a..938fcb4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumChainsaw.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumChainsaw.java @@ -1,21 +1,23 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -29,156 +31,154 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.event.ForgeEventFactory; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemThaumiumChainsaw extends ItemAxe implements IElectricItem { - public int maxCharge = 60000; - private final int cost = 250; - private final int hitCost = 350; + public int maxCharge = 60000; + private final int cost = 250; + private final int hitCost = 350; - public ItemThaumiumChainsaw() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 21F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(27); - this.setMaxStackSize(1); - } + public ItemThaumiumChainsaw() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 21F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(27); + this.setMaxStackSize(1); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:thaumiumchainsaw"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":thaumiumchainsaw"); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 600; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 600; + } - @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())); - } - } + @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())); + } + } - @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); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_axe.canHarvestBlock(block, stack) || Items.diamond_sword.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 isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + 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; - } + @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 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().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().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 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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumDrill.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumDrill.java index 1512524..1514f32 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumDrill.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/ItemThaumiumDrill.java @@ -1,21 +1,23 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -28,161 +30,159 @@ import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.ForgeEventFactory; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemThaumiumDrill extends ItemPickaxe implements IElectricItem { - public ItemThaumiumDrill() { - super(ToolMaterial.EMERALD); - this.efficiencyOnProperMaterial = 20F; - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - if (Config.toolsInBore == false) { - this.setMaxDamage(27); - } else { - this.setMaxDamage(240); - } - } + public ItemThaumiumDrill() { + super(ToolMaterial.EMERALD); + this.efficiencyOnProperMaterial = 20F; + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + if (Config.toolsInBore == false) { + this.setMaxDamage(27); + } else { + this.setMaxDamage(240); + } + } - public int maxCharge = 60000; - private int cost; + public int maxCharge = 60000; + private int cost; - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:thaumiumdrill"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":thaumiumdrill"); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 100; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 100; + } - @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())); - } - } + @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())); + } + } - @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) { - if (Config.toolsInBore == false) { - cost = 250; - } 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 (Config.toolsInBore == false) { + cost = 250; + } else { + cost = 1; + } + ElectricItem.manager.use(stack, cost, entityLiving); + return true; + } - @Override - public boolean canHarvestBlock(Block block, ItemStack stack) { - return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack); - } + @Override + public boolean canHarvestBlock(Block block, ItemStack stack) { + return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.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_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { - return efficiencyOnProperMaterial; - } else { - return super.getDigSpeed(stack, block, meta); - } - } + if (Items.wooden_pickaxe.getDigSpeed(stack, block, meta) > 1.0F || Items.wooden_shovel.getDigSpeed(stack, block, meta) > 1.0F) { + return efficiencyOnProperMaterial; + } else { + return super.getDigSpeed(stack, block, meta); + } + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + return true; + } + } - @Override - public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) { - return true; - } + @Override + public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase entityliving1) { + 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().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().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 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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemElectricThorHammer.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemElectricThorHammer.java index c3c49e1..4cbaecd 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemElectricThorHammer.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemElectricThorHammer.java @@ -1,21 +1,24 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; +import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityArcher; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; - -import java.util.List; - import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; @@ -28,177 +31,174 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; -import electricMagicTools.tombenpotter.electricmagictools.common.entities.EntityArcher; + +import java.util.List; public class ItemElectricThorHammer extends ItemSword implements IElectricItem { - public int maxCharge = 1000000; - private final int hitCost = 5000; - private final int lightningCost = 75000; + public int maxCharge = 1000000; + private final int hitCost = 5000; + private final int lightningCost = 75000; - public ItemElectricThorHammer() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxDamage(27); - this.setMaxStackSize(1); - // OreDictionary.registerOre("craftingToolForgeHammer", this); - } + public ItemElectricThorHammer() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxDamage(27); + this.setMaxStackSize(1); + // OreDictionary.registerOre("craftingToolForgeHammer", this); + } - @Override - public boolean canProvideEnergy(ItemStack itemStack) { - return false; - } + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } - @Override - public int getMaxCharge(ItemStack itemStack) { - return maxCharge; - } + @Override + public int getMaxCharge(ItemStack itemStack) { + return maxCharge; + } - @Override - public int getTier(ItemStack itemStack) { - return 2; - } + @Override + public int getTier(ItemStack itemStack) { + return 2; + } - @Override - public int getTransferLimit(ItemStack itemStack) { - return 100; - } + @Override + public int getTransferLimit(ItemStack itemStack) { + return 100; + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:hammer/electricthorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.texturePath + ":hammer/electricthorhammer"); + } - @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())); - } - } + @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())); + } + } - @Override - public boolean isRepairable() { - return false; - } + @Override + public boolean isRepairable() { + return false; + } - @Override - public int getItemEnchantability() { - if (Config.enchanting == false) { - return 0; - } else { - return 4; - } - } + @Override + public int getItemEnchantability() { + if (Config.enchanting == false) { + return 0; + } else { + return 4; + } + } - @Override - public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { - if (Config.enchanting == false) { - return false; - } else { - return true; - } - } + @Override + public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) { + if (Config.enchanting == false) { + return false; + } else { + 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), 19F); - } - 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), 19F); + } + return false; + } - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - list.add(player.getCommandSenderName() + "'s Hammer"); - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { + list.add(player.getCommandSenderName() + "'s Hammer"); + } - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - if (player.capabilities.isCreativeMode) { - return itemstack; - } else if (ElectricItem.manager.canUse(itemstack, lightningCost)) { - player.swingItem(); - // Corners - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 8)); + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (player.capabilities.isCreativeMode) { + return itemstack; + } else if (ElectricItem.manager.canUse(itemstack, lightningCost)) { + player.swingItem(); + // Corners + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 8)); - // Fronts - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ + 8)); + // Fronts + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ + 8)); - // Others - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 1)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 2)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 3)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 4)); + // Others + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 1)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 2)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ + 3)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ + 4)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 1)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 2)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 3)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 4)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 1)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 2)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 8, player.posY, player.posZ - 3)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 8, player.posY, player.posZ - 4)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 1, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 2, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 3, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 4, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 1, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 2, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 3, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX + 4, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 1, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 2, player.posY, player.posZ - 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 3, player.posY, player.posZ + 8)); - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 4, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 1, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 2, player.posY, player.posZ - 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 3, player.posY, player.posZ + 8)); + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX - 4, player.posY, player.posZ - 8)); - EntityArcher archer; - archer = new EntityArcher(world); - archer.setPosition(player.posX + 8, player.posY + 2, player.posZ - 8); - world.spawnEntityInWorld(archer); + EntityArcher archer; + archer = new EntityArcher(world); + archer.setPosition(player.posX + 8, player.posY + 2, player.posZ - 8); + world.spawnEntityInWorld(archer); - EntityArcher archer1; - archer1 = new EntityArcher(world); - archer1.setPosition(player.posX - 8, player.posY + 2, player.posZ + 8); - world.spawnEntityInWorld(archer1); + EntityArcher archer1; + archer1 = new EntityArcher(world); + archer1.setPosition(player.posX - 8, player.posY + 2, player.posZ + 8); + world.spawnEntityInWorld(archer1); - EntityArcher archer2; - archer2 = new EntityArcher(world); - archer2.setPosition(player.posX - 8, player.posY + 2, player.posZ - 8); - world.spawnEntityInWorld(archer2); + EntityArcher archer2; + archer2 = new EntityArcher(world); + archer2.setPosition(player.posX - 8, player.posY + 2, player.posZ - 8); + world.spawnEntityInWorld(archer2); - EntityArcher archer3; - archer3 = new EntityArcher(world); - archer3.setPosition(player.posX + 8, player.posY + 2, player.posZ + 8); - world.spawnEntityInWorld(archer3); - ElectricItem.manager.use(itemstack, lightningCost, player); - return itemstack; - } else { - world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ)); - player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 1, 1)); - return itemstack; - } - } + EntityArcher archer3; + archer3 = new EntityArcher(world); + archer3.setPosition(player.posX + 8, player.posY + 2, player.posZ + 8); + world.spawnEntityInWorld(archer3); + ElectricItem.manager.use(itemstack, lightningCost, player); + return itemstack; + } else { + world.spawnEntityInWorld(new EntityLightningBolt(world, player.posX, player.posY, player.posZ)); + player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 1, 1)); + return itemstack; + } + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemTaintedThorHammer.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemTaintedThorHammer.java index 6c84727..797583b 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemTaintedThorHammer.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemTaintedThorHammer.java @@ -1,18 +1,19 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -20,53 +21,53 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import thaumcraft.common.entities.projectile.EntityAlumentum; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; public class ItemTaintedThorHammer extends ItemThorHammer { - public ItemTaintedThorHammer() { - super(); - this.setMaxDamage(1000); - // OreDictionary.registerOre("craftingToolForgeHammer", this); - } + public ItemTaintedThorHammer() { + super(); + this.setMaxDamage(1000); + // OreDictionary.registerOre("craftingToolForgeHammer", this); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:hammer/taintedthorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.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(40, player); - return itemstack; - } - } + if (player.capabilities.isCreativeMode) { + return itemstack; + } else { + itemstack.damageItem(40, 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 par2EntityPlayer, List list, boolean par4) { - list.add("It was, once the Hammer of Thor."); - list.add("It is now very dangerous."); - list.add("Do NOT right-click."); - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("It was, once the Hammer of Thor."); + list.add("It is now very dangerous."); + list.add("Do NOT right-click."); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemThorHammer.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemThorHammer.java index 1a6b5a4..ac887ee 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemThorHammer.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/items/tools/hammer/ItemThorHammer.java @@ -1,18 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.items.tools.hammer; -import java.util.List; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; +import electricMagicTools.tombenpotter.electricmagictools.common.ElectricMagicTools; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -27,79 +29,78 @@ import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.util.Vec3; import net.minecraft.world.World; import thaumcraft.api.IRepairable; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import electricMagicTools.tombenpotter.electricmagictools.common.CreativeTab; + +import java.util.List; public class ItemThorHammer extends ItemSword implements IRepairable { - public ItemThorHammer() { - super(ToolMaterial.EMERALD); - this.setCreativeTab(CreativeTab.tabTombenpotter); - this.setMaxStackSize(1); - this.setMaxDamage(2000); - // OreDictionary.registerOre("craftingToolForgeHammer", this); - } + public ItemThorHammer() { + super(ToolMaterial.EMERALD); + this.setCreativeTab(CreativeTab.tabTombenpotter); + this.setMaxStackSize(1); + this.setMaxDamage(2000); + // OreDictionary.registerOre("craftingToolForgeHammer", this); + } - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("electricmagictools:hammer/thorhammer"); - } + @SideOnly(Side.CLIENT) + @Override + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(ElectricMagicTools.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; + } - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { - list.add("The Hammer of Thor"); - } + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) { + list.add("The Hammer of Thor"); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/CraftingAspects.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/CraftingAspects.java index fd73b97..0d7b0a9 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/CraftingAspects.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/CraftingAspects.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -16,49 +16,52 @@ 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 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); + } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/ResearchAspects.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/ResearchAspects.java index f85dcd4..6ea8056 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/ResearchAspects.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/ResearchAspects.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -16,46 +16,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 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); + } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/TextHelper.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/TextHelper.java new file mode 100644 index 0000000..dafb750 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/lib/TextHelper.java @@ -0,0 +1,40 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.lib; + +public class TextHelper { + + /** + * Color Coding * + */ + public static String black = "�0"; + public static String darkBlue = "�1"; + public static String darkGreen = "�2"; + public static String darkAqua = "�3"; + public static String darkRed = "�4"; + public static String darkPurple = "�5"; + public static String gold = "�6"; + public static String gray = "�7"; + public static String darkGray = "�8"; + public static String blue = "�9"; + public static String green = "�a"; + public static String aqua = "�b"; + public static String red = "�c"; + public static String lightPurple = "�d"; + public static String yellow = "�e"; + public static String white = "�f"; + + /** + * Text Formating * + */ + public static String obfuscated = "�k"; + public static String bold = "�l"; + public static String strikethrough = "�m"; + public static String underline = "�n"; + public static String italics = "�o"; + public static String resetFormatting = "�r"; + + /** + * Useful Tooltips * + */ + public static String shiftForMoreInfo = darkGreen + italics + "Press Shift for more information"; + +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTInitRecipes.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTInitRecipes.java index a6104f3..99845b3 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTInitRecipes.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTInitRecipes.java @@ -1,16 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.recipes; +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.ItemRegistry; import ic2.api.item.IC2Items; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -18,39 +22,54 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.common.config.ConfigItems; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.registry.GameRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.ItemRegistry; public class EMTInitRecipes { - public static void add() { + public static void add() { - /** Crafting Recipes **/ - ironOmnitool = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.ironOmnitool), "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")); + /** Crafting Recipes **/ + ironOmnitool = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.ironOmnitool), "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(new ItemStack(ItemRegistry.diamondChainsaw), " 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, 14), " X ", "XYX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 12), 'Y', new ItemStack(Items.feather)); - diamondChainsaw = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.diamondChainsaw), " X ", "XYX", 'X', new ItemStack(Items.diamond), 'Y', new ItemStack(IC2Items.getItem("chainsaw").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + if (Loader.isModLoaded("gregtech_addon") == false) { + GameRegistry.addShapedRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', new ItemStack(Items.diamond), 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + } else { + FMLLog.info("[EMT] Gregtech Addon detected. Disabling the fix for the Diamond Drill recipe."); + } - if (Loader.isModLoaded("gregtech_addon") == false) { - GameRegistry.addShapedRecipe(IC2Items.getItem("diamondDrill"), " Y ", "YXY", 'Y', new ItemStack(Items.diamond), 'X', new ItemStack(IC2Items.getItem("miningDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - } else { - System.out.println("[EMT] 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)); + /** 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), "XXX", "XXX", "XXX", 'X', OreDictionary.getOres("itemRubber").get(i)); + } - 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)); + /** 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); - GameRegistry.addShapedRecipe(IC2Items.getItem("generator"), "X", "Y", "Z", 'X', IC2Items.getItem("reBattery"), 'Y', IC2Items.getItem("machine"), 'Z', new ItemStack(Blocks.furnace)); + } - /** 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); - - } - - public static IRecipe ironOmnitool; - public static IRecipe diamondChainsaw; + 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; } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTPostInitRecipes.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTPostInitRecipes.java index c72055d..2deea78 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTPostInitRecipes.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/EMTPostInitRecipes.java @@ -1,17 +1,24 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.recipes; +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.registry.GameRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.ItemRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.lib.CraftingAspects; import ic2.api.item.IC2Items; +import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.Recipes; import ic2.core.Ic2Items; @@ -29,244 +36,274 @@ import thaumcraft.api.crafting.ShapedArcaneRecipe; import thaumcraft.api.crafting.ShapelessArcaneRecipe; import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.config.ConfigItems; -import cpw.mods.fml.common.registry.GameRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.ItemRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.lib.CraftingAspects; + +import java.util.Iterator; public class EMTPostInitRecipes { - public static void add() { + public static void add() { - /** Infusion Recipes **/ + /** Infusion Recipes **/ - thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", new ItemStack(ItemRegistry.thaumiumDrill), 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.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), IC2Items.getItem("denseplateiron") }); + thaumiumDrill = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Drill", new ItemStack(ItemRegistry.thaumiumDrill), 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", new ItemStack(ItemRegistry.thaumiumChainsaw), 5, CraftingAspects.thaumiumChainsawCrafting, new ItemStack(ItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(Items.diamond), new ItemStack(Items.diamond), new ItemStack(ItemRegistry.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), IC2Items.getItem("denseplateiron") }); + thaumiumChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Chainsaw", new ItemStack(ItemRegistry.thaumiumChainsaw), 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", new ItemStack(ItemRegistry.quantumThaumicHelmet), 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.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("advancedCircuit") }); + thaumicQuantumHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Goggles of Revealing", new ItemStack(ItemRegistry.quantumThaumicHelmet), 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", new ItemStack(ItemRegistry.nanoThaumicHelmet), 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.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), IC2Items.getItem("carbonPlate"), IC2Items.getItem("electronicCircuit") }); + thaumicNanoHelmet = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Goggles of Revealing", new ItemStack(ItemRegistry.nanoThaumicHelmet), 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", new ItemStack(ItemRegistry.thaumiumOmnitool), 6, CraftingAspects.thaumiumOmnitoolCrafting, new ItemStack(ItemRegistry.thaumiumChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(ItemRegistry.thaumiumDrill, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ItemRegistry.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), IC2Items.getItem("carbonPlate"), IC2Items.getItem("plateobsidian") }); + thaumiumOmnitool = ThaumcraftApi.addInfusionCraftingRecipe("Thaumium Omnitool", new ItemStack(ItemRegistry.thaumiumOmnitool), 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), new ItemStack(ConfigItems.itemWispEssence, 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", new ItemStack(ItemRegistry.streamChainsaw), 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("compressedPlantBall"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade") }); + streamChainsaw = ThaumcraftApi.addInfusionCraftingRecipe("Chainsaw of the Stream", new ItemStack(ItemRegistry.streamChainsaw), 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("compressedPlantBall"), IC2Items.getItem("iridiumPlate"), IC2Items.getItem("overclockerUpgrade")}); - rockbreakerDrill = ThaumcraftApi.addInfusionCraftingRecipe("Drill of the Rockbreaker", new ItemStack(ItemRegistry.rockbreakerDrill), 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", new ItemStack(ItemRegistry.rockbreakerDrill), 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.lightningSummoner), new ItemStack(ItemRegistry.lightningSummoner), 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", new ItemStack(ItemRegistry.electricThorHammer), 10, CraftingAspects.superchargedThorHammerCrafting, new ItemStack(ItemRegistry.thorHammer, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(ItemRegistry.lightningSummoner), new ItemStack(ItemRegistry.lightningSummoner), 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", new ItemStack(ItemRegistry.electricThorHammer), 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", new ItemStack(ItemRegistry.solarHelmetRevealing), 5, CraftingAspects.solarHelmetRevealing, new ItemStack(ItemRegistry.quantumThaumicHelmet, 1, OreDictionary.WILDCARD_VALUE), new ItemStack[] { new ItemStack(BlockRegistry.emtSolars, 1, 1), IC2Items.getItem("glassFiberCableItems"), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ConfigItems.itemShard, 1, 4) }); + solarHelmetRevealing = ThaumcraftApi.addInfusionCraftingRecipe("Solar Helmet of Revealing", new ItemStack(ItemRegistry.solarHelmetRevealing), 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", new ItemStack(ItemRegistry.electricBootsTraveller), 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), new ItemStack(ConfigItems.itemWispEssence) }); + electricBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Electric Boots of the Traveller", new ItemStack(ItemRegistry.electricBootsTraveller), 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", new ItemStack(ItemRegistry.nanoBootsTraveller), 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), new ItemStack(ConfigItems.itemWispEssence), new ItemStack(ConfigItems.itemWispEssence) }); + nanoBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Nano Boots of the Traveller", new ItemStack(ItemRegistry.nanoBootsTraveller), 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", new ItemStack(ItemRegistry.quantumBootsTraveller), 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"), new ItemStack(ConfigItems.itemWispEssence), new ItemStack(ConfigItems.itemWispEssence), new ItemStack(ConfigItems.itemWispEssence) }); + quantumBootsTravel = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Boots of the Traveller", new ItemStack(ItemRegistry.quantumBootsTraveller), 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.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate) }); + 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", new ItemStack(ItemRegistry.electricHoeGrowth), 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", new ItemStack(ItemRegistry.electricHoeGrowth), 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.thaumiumPlate), new ItemStack(ItemRegistry.thaumiumPlate), 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("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("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("waterMill"), IC2Items.getItem("solarPanel"), IC2Items.getItem("windMill"), IC2Items.getItem("nuclearReactor")}); - /** Arcane Worktable Recipes **/ + nanoWings = ThaumcraftApi.addInfusionCraftingRecipe("Nanosuit Wings", new ItemStack(ItemRegistry.nanoWing), 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)}); - diamondOmnitool = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(ItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, new ItemStack(ItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); + quantumWings = ThaumcraftApi.addInfusionCraftingRecipe("Quantum Wings", new ItemStack(ItemRegistry.quantumWing), 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)}); - ironOmnitoolToDiamond = ThaumcraftApi.addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(ItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(ItemRegistry.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE)); + /** Arcane Worktable Recipes **/ - 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)); + diamondOmnitool = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(ItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, new ItemStack(ItemRegistry.diamondChainsaw, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(IC2Items.getItem("diamondDrill").getItem(), 1, OreDictionary.WILDCARD_VALUE)); - electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", new ItemStack(ItemRegistry.electricGoggles), 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); + ironOmnitoolToDiamond = ThaumcraftApi.addArcaneCraftingRecipe("Diamond Omnitool", new ItemStack(ItemRegistry.diamondOmnitool), CraftingAspects.diamondOmnitoolCrafting, "XAX", "XBX", "XAX", 'X', new ItemStack(Items.diamond), 'A', IC2Items.getItem("advancedCircuit"), 'B', new ItemStack(ItemRegistry.ironOmnitool, 1, OreDictionary.WILDCARD_VALUE)); - shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Blocks", new ItemStack(BlockRegistry.shield, 8), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); + 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)); - tinyUranium = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), CraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238")); + electricGoggles = ThaumcraftApi.addArcaneCraftingRecipe("Electric Goggles", new ItemStack(ItemRegistry.electricGoggles), 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); - compressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel")); + shieldBlock = ThaumcraftApi.addArcaneCraftingRecipe("Shield Blocks", new ItemStack(BlockRegistry.shield, 8), CraftingAspects.shieldBlockCrafting, "XYX", "X X", "XYX", 'X', new ItemStack(Blocks.glass), 'Y', new ItemStack(Blocks.obsidian)); - doubleCompressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(BlockRegistry.emtSolars, 1, 0)); + tinyUranium = ThaumcraftApi.addShapelessArcaneCraftingRecipe("Tiny Uranium", new ItemStack(IC2Items.getItem("smallUran235").getItem(), 7), CraftingAspects.tinyUraniumCrafting, IC2Items.getItem("Uran238")); - electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", new ItemStack(ItemRegistry.electricScribingTools), 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)); + compressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', IC2Items.getItem("solarPanel")); - /** Crucible Recipes **/ + doubleCompressedSolar = ThaumcraftApi.addArcaneCraftingRecipe("Compressed Solars", new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.compressedSolars, "XXX", "XXX", "XXX", 'X', new ItemStack(BlockRegistry.emtSolars, 1, 0)); - ignisGenerator = ThaumcraftApi.addCrucibleRecipe("Ignis Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 1), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.ignisGeneratorCrafting); + electricScribingTools = ThaumcraftApi.addArcaneCraftingRecipe("Electric Scribing Tools", new ItemStack(ItemRegistry.electricScribingTools), 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)); - auramGenerator = ThaumcraftApi.addCrucibleRecipe("Auram Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 2), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.auramGeneratorCrafting); + thaumiumWing = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(ItemRegistry.itemEMTItems, 1, 15), CraftingAspects.thaumiumWing, "XYZ", "XYZ", "XYZ", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 14), 'Y', new ItemStack(ItemRegistry.itemEMTItems, 1, 5), 'Z', new ItemStack(ItemRegistry.itemEMTItems, 1, 13)); - arborGenerator = ThaumcraftApi.addCrucibleRecipe("Arbor Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 3), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.arborGeneratorCrafting); + thaumiumWings = ThaumcraftApi.addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(ItemRegistry.thaumiumWing), CraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(ItemRegistry.itemEMTItems, 1, 15)); - waterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 3), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.waterSolars); + /** Crucible Recipes **/ - doubleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.waterSolars); + ignisGenerator = ThaumcraftApi.addCrucibleRecipe("Ignis Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 1), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.ignisGeneratorCrafting); - tripleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 5), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.waterSolars); + auramGenerator = ThaumcraftApi.addCrucibleRecipe("Auram Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 2), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.auramGeneratorCrafting); - darkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 6), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.darkSolars); + arborGenerator = ThaumcraftApi.addCrucibleRecipe("Arbor Generator", new ItemStack(BlockRegistry.essentiaGens, 1, 3), new ItemStack(BlockRegistry.essentiaGens, 1, 0), CraftingAspects.arborGeneratorCrafting); - doubleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 7), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.darkSolars); + waterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 3), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.waterSolars); - tripleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 8), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.darkSolars); + doubleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.waterSolars); - orderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 9), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.orderSolars); + tripleWaterSolar = ThaumcraftApi.addCrucibleRecipe("Water Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 5), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.waterSolars); - doubleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 10), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.orderSolars); + darkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 6), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.darkSolars); - tripleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 11), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.orderSolars); + doubleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 7), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.darkSolars); - fireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 12), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.fireSolars); + tripleDarkSolar = ThaumcraftApi.addCrucibleRecipe("Entropy Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 8), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.darkSolars); - doubleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 13), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.fireSolars); + orderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 9), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.orderSolars); - tripleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 14), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.fireSolars); + doubleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 10), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.orderSolars); - airSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 15), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.airSolars); + tripleOrderSolar = ThaumcraftApi.addCrucibleRecipe("Order Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 11), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.orderSolars); - doubleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 0), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.airSolars); + fireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 12), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.fireSolars); - tripleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.airSolars); + doubleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 13), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.fireSolars); - earthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 2), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.earthSolars); + tripleFireSolar = ThaumcraftApi.addCrucibleRecipe("Fire Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 14), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.fireSolars); - doubleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 3), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.earthSolars); + airSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars, 1, 15), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.airSolars); - tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars); + doubleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 0), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.airSolars); - portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(BlockRegistry.portableNode), new ItemStack(ConfigItems.itemJarFilled), CraftingAspects.portableNode); + tripleAirSolar = ThaumcraftApi.addCrucibleRecipe("Air Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 1), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.airSolars); - /** IC2 Stuff related recipes **/ + earthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 2), new ItemStack(BlockRegistry.emtSolars, 1, 0), CraftingAspects.earthSolars); + + doubleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 3), new ItemStack(BlockRegistry.emtSolars, 1, 1), CraftingAspects.earthSolars); + + tripleEarthSolar = ThaumcraftApi.addCrucibleRecipe("Earth Infused Solar Panels", new ItemStack(BlockRegistry.emtSolars2, 1, 4), new ItemStack(BlockRegistry.emtSolars, 1, 2), CraftingAspects.earthSolars); + + portableNode = ThaumcraftApi.addCrucibleRecipe("Portable Node", new ItemStack(BlockRegistry.portableNode), new ItemStack(ConfigItems.itemJarFilled), CraftingAspects.portableNode); + + /** IC2 Stuff related 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); + ItemStack ironClusterRecipe = IC2Items.getItem("smallIronDust").copy(); + ironClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 16)), null, ironClusterRecipe); - ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy(); - goldClusterRecipe.stackSize = 22; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, goldClusterRecipe); + ItemStack goldClusterRecipe = IC2Items.getItem("smallGoldDust").copy(); + goldClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 31)), null, goldClusterRecipe); - ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy(); - copperClusterRecipe.stackSize = 22; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, copperClusterRecipe); + ItemStack copperClusterRecipe = IC2Items.getItem("smallCopperDust").copy(); + copperClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 17)), null, copperClusterRecipe); - ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy(); - tinClusterRecipe.stackSize = 22; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, tinClusterRecipe); + ItemStack tinClusterRecipe = IC2Items.getItem("smallTinDust").copy(); + tinClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 18)), null, tinClusterRecipe); - ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy(); - silverClusterRecipe.stackSize = 22; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, silverClusterRecipe); + ItemStack silverClusterRecipe = IC2Items.getItem("smallSilverDust").copy(); + silverClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 19)), null, silverClusterRecipe); - ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy(); - leadClusterRecipe.stackSize = 22; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, leadClusterRecipe); + ItemStack leadClusterRecipe = IC2Items.getItem("smallLeadDust").copy(); + leadClusterRecipe.stackSize = 22; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigItems.itemNugget, 1, 20)), null, leadClusterRecipe); /* Thaumium Plates Recipes */ - thaumiumPlate = GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.thaumiumPlate), "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.thaumiumPlate)); + 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 */ - ItemStack crushedAmberRecipe = new ItemStack(ItemRegistry.itemEMTItems, 1, 1); - crushedAmberRecipe.stackSize = 2; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe); + if (Config.removeAmberAndCinnabarMacerating == true) { + 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(); + FMLLog.info("[EMT] Electro-Magic Tools : Removing conflicting amber macerating recipe(s)"); + } + } - ItemStack crushedCinnabarRecipe = new ItemStack(ItemRegistry.itemEMTItems, 1, 3); - crushedCinnabarRecipe.stackSize = 2; - Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe); + 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(); + FMLLog.info("[EMT] Electro-Magic Tools : Removing Conflicting cinnabar macerating recipe(s)"); + } + } + } + ItemStack crushedAmberRecipe = new ItemStack(ItemRegistry.itemEMTItems, 1, 1); + crushedAmberRecipe.stackSize = 2; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 7)), null, crushedAmberRecipe); - NBTTagCompound waterAmount = new NBTTagCompound(); - waterAmount.setInteger("amount", 1000); + ItemStack crushedCinnabarRecipe = new ItemStack(ItemRegistry.itemEMTItems, 1, 3); + crushedCinnabarRecipe.stackSize = 2; + Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack(ConfigBlocks.blockCustomOre, 1, 0)), null, crushedCinnabarRecipe); - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 2), StackUtil.copyWithSize(Ic2Items.smallCopperDust, 2), Ic2Items.stoneDust }); - Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[] { new ItemStack(ItemRegistry.itemEMTItems, 1, 4), StackUtil.copyWithSize(Ic2Items.smallTinDust, 2), Ic2Items.stoneDust }); + NBTTagCompound waterAmount = new NBTTagCompound(); + waterAmount.setInteger("amount", 1000); - NBTTagCompound heatAmount = new NBTTagCompound(); - heatAmount.setInteger("minHeat", 1000); + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 1)), waterAmount, new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 2), StackUtil.copyWithSize(Ic2Items.smallCopperDust, 2), Ic2Items.stoneDust}); + Recipes.oreWashing.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 3)), waterAmount, new ItemStack[]{new ItemStack(ItemRegistry.itemEMTItems, 1, 4), StackUtil.copyWithSize(Ic2Items.smallTinDust, 2), Ic2Items.stoneDust}); - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[] { Ic2Items.smallCopperDust, new ItemStack(ConfigItems.itemResource, 1, 6) }); - Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[] { Ic2Items.smallTinDust, new ItemStack(ConfigItems.itemResource, 1, 3) }); - } + NBTTagCompound heatAmount = new NBTTagCompound(); + heatAmount.setInteger("minHeat", 1000); - public static InfusionRecipe thaumiumDrill; - public static InfusionRecipe thaumiumChainsaw; - public static InfusionRecipe thaumicQuantumHelmet; - public static InfusionRecipe thaumiumOmnitool; - public static InfusionRecipe thaumicNanoHelmet; - public static InfusionRecipe explosionFocus; - public static InfusionRecipe shieldFocus; - public static InfusionRecipe potentiaGenerator; - public static InfusionRecipe streamChainsaw; - public static InfusionRecipe rockbreakerDrill; - public static InfusionRecipe thorHammer; - public static InfusionRecipe superchargedThorHammer; - public static InfusionRecipe wandRecharger; - public static InfusionRecipe solarHelmetRevealing; - public static InfusionRecipe electricBootsTravel; - public static InfusionRecipe nanoBootsTravel; - public static InfusionRecipe quantumBootsTravel; - public static InfusionRecipe diamondOmnitoolToThaumium; - public static InfusionRecipe etheralProcessor; - public static InfusionRecipe tripleCompressedSolar; - public static InfusionRecipe electricHoeGrowth; - public static InfusionRecipe chargeFocus; - public static InfusionRecipe wandChargeFocus; - public static InfusionRecipe inventoryChargingRing; - public static InfusionRecipe armorChargingRing; + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 2)), heatAmount, new ItemStack[]{Ic2Items.smallCopperDust, new ItemStack(ConfigItems.itemResource, 1, 6)}); + Recipes.centrifuge.addRecipe(new RecipeInputItemStack(new ItemStack(ItemRegistry.itemEMTItems, 1, 4)), heatAmount, new ItemStack[]{Ic2Items.smallTinDust, new ItemStack(ConfigItems.itemResource, 1, 3)}); + } - public static ShapelessArcaneRecipe diamondOmnitool; - public static ShapelessArcaneRecipe tinyUranium; - public static ShapedArcaneRecipe christmasFocus; - public static ShapedArcaneRecipe electricGoggles; - public static ShapedArcaneRecipe shieldBlock; - public static ShapedArcaneRecipe compressedSolar; - public static ShapedArcaneRecipe doubleCompressedSolar; - public static ShapedArcaneRecipe ironOmnitoolToDiamond; - public static ShapedArcaneRecipe electricScribingTools; + public static InfusionRecipe thaumiumDrill; + public static InfusionRecipe thaumiumChainsaw; + public static InfusionRecipe thaumicQuantumHelmet; + public static InfusionRecipe thaumiumOmnitool; + public static InfusionRecipe thaumicNanoHelmet; + public static InfusionRecipe explosionFocus; + public static InfusionRecipe shieldFocus; + public static InfusionRecipe potentiaGenerator; + public static InfusionRecipe streamChainsaw; + public static InfusionRecipe rockbreakerDrill; + public static InfusionRecipe thorHammer; + public static InfusionRecipe superchargedThorHammer; + public static InfusionRecipe wandRecharger; + public static InfusionRecipe solarHelmetRevealing; + public static InfusionRecipe electricBootsTravel; + public static InfusionRecipe nanoBootsTravel; + public static InfusionRecipe quantumBootsTravel; + public static InfusionRecipe diamondOmnitoolToThaumium; + public static InfusionRecipe etheralProcessor; + public static InfusionRecipe tripleCompressedSolar; + public static InfusionRecipe electricHoeGrowth; + public static InfusionRecipe chargeFocus; + public static InfusionRecipe wandChargeFocus; + public static InfusionRecipe inventoryChargingRing; + public static InfusionRecipe armorChargingRing; + public static InfusionRecipe nanoWings; + public static InfusionRecipe quantumWings; - public static CrucibleRecipe ignisGenerator; - public static CrucibleRecipe auramGenerator; - public static CrucibleRecipe arborGenerator; - public static CrucibleRecipe waterSolar; - public static CrucibleRecipe doubleWaterSolar; - public static CrucibleRecipe tripleWaterSolar; - public static CrucibleRecipe darkSolar; - public static CrucibleRecipe doubleDarkSolar; - public static CrucibleRecipe tripleDarkSolar; - public static CrucibleRecipe orderSolar; - public static CrucibleRecipe doubleOrderSolar; - public static CrucibleRecipe tripleOrderSolar; - public static CrucibleRecipe fireSolar; - public static CrucibleRecipe doubleFireSolar; - public static CrucibleRecipe tripleFireSolar; - public static CrucibleRecipe airSolar; - public static CrucibleRecipe doubleAirSolar; - public static CrucibleRecipe tripleAirSolar; - public static CrucibleRecipe earthSolar; - public static CrucibleRecipe doubleEarthSolar; - public static CrucibleRecipe tripleEarthSolar; - public static CrucibleRecipe portableNode; + public static ShapelessArcaneRecipe diamondOmnitool; + public static ShapelessArcaneRecipe tinyUranium; + public static ShapedArcaneRecipe christmasFocus; + public static ShapedArcaneRecipe electricGoggles; + public static ShapedArcaneRecipe shieldBlock; + public static ShapedArcaneRecipe compressedSolar; + public static ShapedArcaneRecipe doubleCompressedSolar; + public static ShapedArcaneRecipe ironOmnitoolToDiamond; + public static ShapedArcaneRecipe electricScribingTools; + public static ShapedArcaneRecipe thaumiumWing; + public static ShapedArcaneRecipe thaumiumWings; - public static IRecipe thaumiumPlate; + public static CrucibleRecipe ignisGenerator; + public static CrucibleRecipe auramGenerator; + public static CrucibleRecipe arborGenerator; + public static CrucibleRecipe waterSolar; + public static CrucibleRecipe doubleWaterSolar; + public static CrucibleRecipe tripleWaterSolar; + public static CrucibleRecipe darkSolar; + public static CrucibleRecipe doubleDarkSolar; + public static CrucibleRecipe tripleDarkSolar; + public static CrucibleRecipe orderSolar; + public static CrucibleRecipe doubleOrderSolar; + public static CrucibleRecipe tripleOrderSolar; + public static CrucibleRecipe fireSolar; + public static CrucibleRecipe doubleFireSolar; + public static CrucibleRecipe tripleFireSolar; + public static CrucibleRecipe airSolar; + public static CrucibleRecipe doubleAirSolar; + public static CrucibleRecipe tripleAirSolar; + public static CrucibleRecipe earthSolar; + public static CrucibleRecipe doubleEarthSolar; + public static CrucibleRecipe tripleEarthSolar; + public static CrucibleRecipe portableNode; + + public static IRecipe thaumiumPlate; } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/UuMInfusionRecipes.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/UuMInfusionRecipes.java index 6818386..9a19ec6 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/UuMInfusionRecipes.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/recipes/UuMInfusionRecipes.java @@ -1,16 +1,17 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.recipes; +import electricMagicTools.tombenpotter.electricmagictools.common.lib.CraftingAspects; import ic2.api.item.IC2Items; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -20,92 +21,91 @@ import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.crafting.InfusionRecipe; import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.config.ConfigItems; -import electricMagicTools.tombenpotter.electricmagictools.common.lib.CraftingAspects; public class UuMInfusionRecipes { - public static ItemStack uuMCell = IC2Items.getItem("UuMatterCell"); + public static ItemStack uuMCell = IC2Items.getItem("UuMatterCell"); - public static void add() { + public static void add() { - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - /** - * 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 }); + /** + * 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}); - /** - * 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 }); + /** + * 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}); - /** - * 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 }); + /** + * 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - 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 }); + 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}); - } + } - public static InfusionRecipe uraniumToIridium; - public static InfusionRecipe diamondToUranium; - public static InfusionRecipe goldToDiamond; - public static InfusionRecipe ironToGold; - public static InfusionRecipe stoneBricksToIronOre; - public static InfusionRecipe arcaneStoneToCopperOre; - public static InfusionRecipe arcaneStoneBricksToTinOre; - public static InfusionRecipe amberBlockToLeadOre; - public static InfusionRecipe amberBricksToUraniumOre; - public static InfusionRecipe charcoalToCoal; - public static InfusionRecipe shardToResin; - public static InfusionRecipe shardToRedstone; - public static InfusionRecipe shardToLapis; - public static InfusionRecipe glowstoneDustToBlock; + public static InfusionRecipe uraniumToIridium; + public static InfusionRecipe diamondToUranium; + public static InfusionRecipe goldToDiamond; + public static InfusionRecipe ironToGold; + public static InfusionRecipe stoneBricksToIronOre; + public static InfusionRecipe arcaneStoneToCopperOre; + public static InfusionRecipe arcaneStoneBricksToTinOre; + public static InfusionRecipe amberBlockToLeadOre; + public static InfusionRecipe amberBricksToUraniumOre; + public static InfusionRecipe charcoalToCoal; + public static InfusionRecipe shardToResin; + public static InfusionRecipe shardToRedstone; + public static InfusionRecipe shardToLapis; + public static InfusionRecipe glowstoneDustToBlock; } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityArborGenerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityArborGenerator.java index 09434d0..b3f949e 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityArborGenerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityArborGenerator.java @@ -1,63 +1,62 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.energy.prefab.BasicSource; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.aspects.Aspect; import thaumcraft.common.lib.events.EssentiaHandler; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityArborGenerator extends TileEntity { - int x; - int y; - int z; - public ForgeDirection orientation; - public static int waitTime; +public class TileEntityArborGenerator extends TileEntityEMT { + int x; + int y; + int z; + public ForgeDirection orientation; + public static int waitTime; - public TileEntityArborGenerator() { - orientation = ForgeDirection.getOrientation(1); - waitTime = 30; - } + public TileEntityArborGenerator() { + orientation = ForgeDirection.getOrientation(1); + waitTime = 30; + } - private BasicSource energySource = new BasicSource(this, 1000000000, 3); + private BasicSource energySource = new BasicSource(this, 1000000000, 3); - @Override - public void updateEntity() { - energySource.updateEntity(); + @Override + public void updateEntity() { + energySource.updateEntity(); - if (waitTime > 0) { - waitTime--; - } + if (waitTime > 0) { + waitTime--; + } - if (waitTime <= 0) { - if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.TREE, ForgeDirection.UNKNOWN, 8))) { - energySource.addEnergy(Config.arborGenOutput); - } - waitTime = Config.essentiaGeneratorsDelay; + if (waitTime <= 0) { + if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.TREE, ForgeDirection.UNKNOWN, 8))) { + energySource.addEnergy(Config.arborGenOutput); + } + waitTime = Config.essentiaGeneratorsDelay; - } - } + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - onChunkUnload(); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + onChunkUnload(); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityAuramGenerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityAuramGenerator.java index b09f311..487eadf 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityAuramGenerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityAuramGenerator.java @@ -1,73 +1,72 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.energy.prefab.BasicSource; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.aspects.Aspect; import thaumcraft.common.lib.events.EssentiaHandler; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityAuramGenerator extends TileEntity { - int x; - int y; - int z; - public ForgeDirection orientation; - public static int waitTime; - private BasicSource energySource = new BasicSource(this, 1000000000, 3); +public class TileEntityAuramGenerator extends TileEntityEMT { + int x; + int y; + int z; + public ForgeDirection orientation; + public static int waitTime; + private BasicSource energySource = new BasicSource(this, 1000000000, 3); - public TileEntityAuramGenerator() { - orientation = ForgeDirection.getOrientation(1); - waitTime = 30; - } + public TileEntityAuramGenerator() { + orientation = ForgeDirection.getOrientation(1); + waitTime = 30; + } - @Override - public void updateEntity() { - energySource.updateEntity(); + @Override + public void updateEntity() { + energySource.updateEntity(); - if (waitTime > 0) { - waitTime--; - } + if (waitTime > 0) { + waitTime--; + } - if (waitTime <= 0) { - if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.AURA, ForgeDirection.UNKNOWN, 8))) { - energySource.addEnergy(Config.auramGenOutput); - } - waitTime = Config.essentiaGeneratorsDelay; - } - } + if (waitTime <= 0) { + if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.AURA, ForgeDirection.UNKNOWN, 8))) { + energySource.addEnergy(Config.auramGenOutput); + } + waitTime = Config.essentiaGeneratorsDelay; + } + } - @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 readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - energySource.readFromNBT(tag); - } + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + energySource.readFromNBT(tag); + } - @Override - public void writeToNBT(NBTTagCompound tag) { - super.writeToNBT(tag); - energySource.writeToNBT(tag); - } + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + energySource.writeToNBT(tag); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEMT.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEMT.java new file mode 100644 index 0000000..3119f99 --- /dev/null +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEMT.java @@ -0,0 +1,52 @@ +package electricMagicTools.tombenpotter.electricmagictools.common.tile; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +public abstract class TileEntityEMT extends TileEntity { + + public int facing; + public boolean isOn; + + @Override + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + + facing = tagCompound.getInteger("facing"); + isOn = tagCompound.getBoolean("isOn"); + } + + @Override + public void writeToNBT(NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + + tagCompound.setInteger("facing", facing); + tagCompound.setBoolean("isOn", isOn); + } + + @Override + public final Packet getDescriptionPacket() { + NBTTagCompound nbt = new NBTTagCompound(); + writeToNBT(nbt); + S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt); + return packet; + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound nbt = pkt.func_148857_g(); + readFromNBT(nbt); + } + + @Override + public void markDirty() { + super.markDirty(); // Mark dirty for gamesave + if (worldObj.isRemote) { + return; + } + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); // Update block + TE via Network + } +} diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEtherealMacerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEtherealMacerator.java index fd96dd1..c0e3173 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEtherealMacerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityEtherealMacerator.java @@ -1,16 +1,18 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.tile.IWrenchable; import ic2.core.Ic2Items; import net.minecraft.entity.player.EntityPlayer; @@ -22,294 +24,283 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.common.config.ConfigItems; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityEtherealMacerator extends TileEntity implements ISidedInventory, IWrenchable { - private static final int[] slots_top = new int[] { 0 }; - private static final int[] slots_bottom = new int[] { 2, 1 }; - private static final int[] slots_sides = new int[] { 1 }; +public class TileEntityEtherealMacerator extends TileEntityEMT implements ISidedInventory, IWrenchable { + private static final int[] slots_top = new int[]{0}; + private static final int[] slots_bottom = new int[]{2, 1}; + private static final int[] slots_sides = new int[]{1}; - /** - * The ItemStacks that hold the items currently being used in the furnace - */ - private ItemStack[] slots = new ItemStack[3]; + private ItemStack[] slots = new ItemStack[3]; + public int maceratingSpeed = Config.etherealProcessorBaseSpeed; + public int cookTime; - /** - * the speed of this furnace, 200 is normal / how many ticks it takes : 30 ticks = 1 second - */ - public int maceratingSpeed = Config.etherealProcessorBaseSpeed; + public int getSizeInventory() { + return this.slots.length; + } - /** The number of ticks that the current item has been cooking for */ - public int cookTime; + public ItemStack getStackInSlot(int par1) { + return this.slots[par1]; + } - /** - * Returns the number of slots in the inventory. - */ - public int getSizeInventory() { - return this.slots.length; - } + public ItemStack decrStackSize(int par1, int par2) { + if (this.slots[par1] != null) { + ItemStack itemstack; - /** - * Returns the stack in slot i - */ - public ItemStack getStackInSlot(int par1) { - return this.slots[par1]; - } + if (this.slots[par1].stackSize <= par2) { + itemstack = this.slots[par1]; + this.slots[par1] = null; + return itemstack; + } else { + itemstack = this.slots[par1].splitStack(par2); - /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack. - */ - public ItemStack decrStackSize(int par1, int par2) { - if (this.slots[par1] != null) { - ItemStack itemstack; + if (this.slots[par1].stackSize == 0) { + this.slots[par1] = null; + } - if (this.slots[par1].stackSize <= par2) { - itemstack = this.slots[par1]; - this.slots[par1] = null; - return itemstack; - } else { - itemstack = this.slots[par1].splitStack(par2); + return itemstack; + } + } else { + return null; + } + } - if (this.slots[par1].stackSize == 0) { - this.slots[par1] = null; - } + public ItemStack getStackInSlotOnClosing(int par1) { + if (this.slots[par1] != null) { + ItemStack itemstack = this.slots[par1]; + this.slots[par1] = null; + return itemstack; + } else { + return null; + } + } - return itemstack; - } - } else { - return null; - } - } + public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { + this.slots[par1] = par2ItemStack; - /** - * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI. - */ - public ItemStack getStackInSlotOnClosing(int par1) { - if (this.slots[par1] != null) { - ItemStack itemstack = this.slots[par1]; - this.slots[par1] = null; - return itemstack; - } else { - return null; - } - } + if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { + par2ItemStack.stackSize = this.getInventoryStackLimit(); + } + } - /** - * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). - */ - public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { - this.slots[par1] = par2ItemStack; + public String getInvName() { + return "Ethereal Processor"; + } - if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { - par2ItemStack.stackSize = this.getInventoryStackLimit(); - } - } + public boolean isInvNameLocalized() { + return false; + } - public String getInvName() { - return "Ethereal Processor"; - } + public void readFromNBT(NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + NBTTagList nbttaglist = tagCompound.getTagList("Items", 10); + this.slots = new ItemStack[this.getSizeInventory()]; - public boolean isInvNameLocalized() { - return false; - } + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); - public void readFromNBT(NBTTagCompound p_145839_1_) { - super.readFromNBT(p_145839_1_); - NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); - this.slots = new ItemStack[this.getSizeInventory()]; + if (b0 >= 0 && b0 < this.slots.length) { + this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + } + } + this.cookTime = tagCompound.getShort("CookTime"); + } - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); + public void writeToNBT(NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + tagCompound.setShort("CookTime", (short) this.cookTime); + NBTTagList nbttaglist = new NBTTagList(); - if (b0 >= 0 && b0 < this.slots.length) { - this.slots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - this.cookTime = p_145839_1_.getShort("CookTime"); - } + 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 void writeToNBT(NBTTagCompound p_145841_1_) { - super.writeToNBT(p_145841_1_); - p_145841_1_.setShort("CookTime", (short) this.cookTime); - NBTTagList nbttaglist = new NBTTagList(); + public int getInventoryStackLimit() { + return 64; + } - 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); - } - } - p_145841_1_.setTag("Items", nbttaglist); - } + 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 int getInventoryStackLimit() { - return 64; - } + if (this.cookTime == this.maceratingSpeed) { + this.cookTime = 0; + this.smeltItem(); + } + } else { + this.cookTime = 0; + this.isOn = false; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } - public void updateEntity() { - if (this.canSmelt() && isOverLimit(1) == false && isOverLimit(2) == false && isOP() == false) { - ++this.cookTime; + 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()); + } + } - if (this.cookTime == this.maceratingSpeed) { - this.cookTime = 0; - this.smeltItem(); - } - } else { - this.cookTime = 0; - } - } + public void smeltItem() { + if (this.canSmelt()) { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); - 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()); - } - } + 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); + } - public void smeltItem() { - if (this.canSmelt()) { - ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); + --this.slots[0].stackSize; - 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[0].stackSize <= 0) { + this.slots[0] = null; + } + this.addBonus(); + } + } - --this.slots[0].stackSize; + public void addBonus() { + if (this.canSmelt()) { + if (this.worldObj.rand.nextInt(Config.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); + } + } + } + } - if (this.slots[0].stackSize <= 0) { - this.slots[0] = null; - } - this.addBonus(); - } - } + 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 addBonus() { - if (this.canSmelt()) { - if (this.worldObj.rand.nextInt(Config.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 openChest() { + } - 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 closeChest() { + } - public void openChest() { - } + @Override + public boolean isItemValidForSlot(int slot, ItemStack stack) { + if (slot != 0) return false; + if (FurnaceRecipes.smelting().getSmeltingResult(stack) != null) return true; + return false; + } - public void closeChest() { - } + public int[] getAccessibleSlotsFromSide(int par1) { + return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); + } - public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) { - return true; - } + public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { + return this.isItemValidForSlot(par1, par2ItemStack); + } - public int[] getAccessibleSlotsFromSide(int par1) { - return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides); - } + public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) { + return true; + } - public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) { - return this.isItemValidForSlot(par1, par2ItemStack); - } + 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 canExtractItem(int par1, ItemStack par2ItemStack, int par3) { - return true; - } + public boolean isOP() { + final int cobblestoneId = OreDictionary.getOreID("blockCobble"); - 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; - } - } + 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.hydratedCoalDust.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; + } + } - public boolean isOP() { - final int cobblestoneId = OreDictionary.getOreID("blockCobble"); + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + 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.hydratedCoalDust.getItem() || (OreDictionary.getOreName(OreDictionary.getOreID(this.slots[0])).contains("dust"))) { - return true; - } else { - return false; - } - } + @Override + public short getFacing() { + return 0; + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void setFacing(short facing) { - @Override - public short getFacing() { - return 0; - } + } - @Override - public void setFacing(short facing) { + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - } + @Override + public float getWrenchDropRate() { + return 1; + } - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtMachines, 1, 1); + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public String getInventoryName() { + return "Ethereal Macerator"; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtMachines, 1, 1); - } + @Override + public boolean hasCustomInventoryName() { + return false; + } - @Override - public String getInventoryName() { - return "Ethereal Macerator"; - } + @Override + public void openInventory() { - @Override - public boolean hasCustomInventoryName() { - return false; - } + } - @Override - public void openInventory() { + @Override + public void closeInventory() { - } - - @Override - public void closeInventory() { - - } + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIgnisGenerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIgnisGenerator.java index 8689ca8..ae38e06 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIgnisGenerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIgnisGenerator.java @@ -1,73 +1,72 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.energy.prefab.BasicSource; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.aspects.Aspect; import thaumcraft.common.lib.events.EssentiaHandler; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityIgnisGenerator extends TileEntity { - int x; - int y; - int z; - public ForgeDirection orientation; - public static int waitTime; - private BasicSource energySource = new BasicSource(this, 1000000000, 3); +public class TileEntityIgnisGenerator extends TileEntityEMT { + int x; + int y; + int z; + public ForgeDirection orientation; + public static int waitTime; + private BasicSource energySource = new BasicSource(this, 1000000000, 3); - public TileEntityIgnisGenerator() { - orientation = ForgeDirection.getOrientation(1); - waitTime = 30; - } + public TileEntityIgnisGenerator() { + orientation = ForgeDirection.getOrientation(1); + waitTime = 30; + } - @Override - public void updateEntity() { - energySource.updateEntity(); + @Override + public void updateEntity() { + energySource.updateEntity(); - if (waitTime > 0) { - waitTime--; - } + if (waitTime > 0) { + waitTime--; + } - if (waitTime <= 0) { - if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.FIRE, ForgeDirection.UNKNOWN, 8))) { - energySource.addEnergy(6000); - } - waitTime = Config.essentiaGeneratorsDelay; - } - } + if (waitTime <= 0) { + if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.FIRE, ForgeDirection.UNKNOWN, 8))) { + energySource.addEnergy(6000); + } + waitTime = Config.essentiaGeneratorsDelay; + } + } - @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 readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - energySource.readFromNBT(tag); - } + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + energySource.readFromNBT(tag); + } - @Override - public void writeToNBT(NBTTagCompound tag) { - super.writeToNBT(tag); - energySource.writeToNBT(tag); - } + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + energySource.writeToNBT(tag); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIndustrialWandRecharge.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIndustrialWandRecharge.java index 95387f8..9f49448 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIndustrialWandRecharge.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityIndustrialWandRecharge.java @@ -1,188 +1,187 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.energy.prefab.BasicSink; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; import thaumcraft.api.aspects.Aspect; import thaumcraft.common.items.wands.ItemWandCasting; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityIndustrialWandRecharge extends TileEntity implements IInventory { - private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4); +public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory { + 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); + ItemStack wand = getStackInSlot(0); - if (ic2EnergySink.useEnergy(Config.wandChargerConsumption)) { - if (wand != null && wand.getItem() instanceof ItemWandCasting) { - ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); - 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); - } - } - } + if (ic2EnergySink.useEnergy(Config.wandChargerConsumption)) { + if (wand != null && wand.getItem() instanceof ItemWandCasting) { + ItemWandCasting wandItem = (ItemWandCasting) wand.getItem(); + 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/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPortableNode.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPortableNode.java index d583805..f7a83c3 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPortableNode.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPortableNode.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- @@ -17,17 +17,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/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPotentiaGenerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPotentiaGenerator.java index 949b7d1..3aaa7b7 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPotentiaGenerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/TileEntityPotentiaGenerator.java @@ -1,75 +1,74 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; import ic2.api.energy.prefab.BasicSource; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import thaumcraft.api.aspects.Aspect; import thaumcraft.common.lib.events.EssentiaHandler; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityPotentiaGenerator extends TileEntity { - int x; - int y; - int z; - public ForgeDirection orientation; - public static int waitTime; +public class TileEntityPotentiaGenerator extends TileEntityEMT { + int x; + int y; + int z; + public ForgeDirection orientation; + public static int waitTime; - public TileEntityPotentiaGenerator() { - orientation = ForgeDirection.getOrientation(1); - waitTime = 30; - } + public TileEntityPotentiaGenerator() { + orientation = ForgeDirection.getOrientation(1); + waitTime = 30; + } - private BasicSource energySource = new BasicSource(this, 1000000000, 3); + private BasicSource energySource = new BasicSource(this, 1000000000, 3); - @Override - public void updateEntity() { - energySource.updateEntity(); + @Override + public void updateEntity() { + energySource.updateEntity(); - if (waitTime > 0) { - waitTime--; - } + if (waitTime > 0) { + waitTime--; + } - if (waitTime <= 0) { - if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.ENERGY, ForgeDirection.UNKNOWN, 8))) { - energySource.addEnergy(Config.potentiaGenOutput); - } - waitTime = Config.essentiaGeneratorsDelay; - } - } + if (waitTime <= 0) { + if ((!this.worldObj.isRemote) && (EssentiaHandler.drainEssentia(this, Aspect.ENERGY, ForgeDirection.UNKNOWN, 8))) { + energySource.addEnergy(Config.potentiaGenOutput); + } + waitTime = Config.essentiaGeneratorsDelay; + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - onChunkUnload(); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + onChunkUnload(); + } - @Override - public void readFromNBT(NBTTagCompound tag) { - super.readFromNBT(tag); - energySource.readFromNBT(tag); - } + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + energySource.readFromNBT(tag); + } - @Override - public void writeToNBT(NBTTagCompound tag) { - super.writeToNBT(tag); - energySource.writeToNBT(tag); - } + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + energySource.writeToNBT(tag); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerEtheralMacerator.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerEtheralMacerator.java index 58c676a..b9e407f 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerEtheralMacerator.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerEtheralMacerator.java @@ -1,22 +1,19 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.container; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; - -import java.util.List; -import java.util.ListIterator; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -24,105 +21,107 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import thaumcraft.common.container.SlotOutput; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEtherealMacerator; + +import java.util.List; +import java.util.ListIterator; 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); + } - @SuppressWarnings("unchecked") - @Override - public final ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex) { - Slot sourceSlot = (Slot) inventorySlots.get(sourceSlotIndex); + @SuppressWarnings("unchecked") + @Override + public final ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex) { + Slot sourceSlot = (Slot) inventorySlots.get(sourceSlotIndex); - if (sourceSlot != null && sourceSlot.getHasStack()) { - ItemStack sourceItemStack = sourceSlot.getStack(); - int oldSourceItemStackSize = sourceItemStack.stackSize; + if (sourceSlot != null && sourceSlot.getHasStack()) { + ItemStack sourceItemStack = sourceSlot.getStack(); + int oldSourceItemStackSize = sourceItemStack.stackSize; - if (sourceSlot.inventory == player.inventory) { // player inventory - // clicked - // 0: fill input existing stacks, 1: fill input empty stacks, 2: - // fill existing stacks, 3: fill empty stacks - for (int run = 0; run < 4 && sourceItemStack.stackSize > 0; run++) { - if (run < 2) { - for (Slot targetSlot : (List) inventorySlots) { - if (targetSlot instanceof SlotInvSlot && ((SlotInvSlot) targetSlot).invSlot.canInput() && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 1) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (sourceSlot.inventory == player.inventory) { // player inventory + // clicked + // 0: fill input existing stacks, 1: fill input empty stacks, 2: + // fill existing stacks, 3: fill empty stacks + for (int run = 0; run < 4 && sourceItemStack.stackSize > 0; run++) { + if (run < 2) { + for (Slot targetSlot : (List) inventorySlots) { + if (targetSlot instanceof SlotInvSlot && ((SlotInvSlot) targetSlot).invSlot.canInput() && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 1) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } else { - for (Slot targetSlot : (List) inventorySlots) { - if (targetSlot.inventory != player.inventory && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 3) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } else { + for (Slot targetSlot : (List) inventorySlots) { + if (targetSlot.inventory != player.inventory && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 3) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } - } - } else { // Shift-Click on a GUIslot of the container - for (int run = 0; run < 2 && sourceItemStack.stackSize > 0; run++) { - for (ListIterator it = ((List) inventorySlots).listIterator(inventorySlots.size()); it.hasPrevious();) { - Slot targetSlot = it.previous(); + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } + } + } else { // Shift-Click on a GUIslot of the container + for (int run = 0; run < 2 && sourceItemStack.stackSize > 0; run++) { + for (ListIterator it = ((List) inventorySlots).listIterator(inventorySlots.size()); it.hasPrevious(); ) { + Slot targetSlot = it.previous(); - if (targetSlot.inventory == player.inventory && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 1) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (targetSlot.inventory == player.inventory && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 1) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } - } + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } + } - if (sourceItemStack.stackSize != oldSourceItemStackSize) { - if (sourceItemStack.stackSize == 0) { - sourceSlot.putStack(null); - } else { - sourceSlot.onPickupFromSlot(player, sourceItemStack); - } + if (sourceItemStack.stackSize != oldSourceItemStackSize) { + if (sourceItemStack.stackSize == 0) { + sourceSlot.putStack(null); + } else { + sourceSlot.onPickupFromSlot(player, sourceItemStack); + } - // vanilla doesn't fully re-sync after processing the slot click - // packet, - // causing a race condition of the client received an old state - // through packet delay after the slot click - // this forces a proper sync - if (IC2.platform.isSimulating()) { - detectAndSendChanges(); - } - } - } + // vanilla doesn't fully re-sync after processing the slot click + // packet, + // causing a race condition of the client received an old state + // through packet delay after the slot click + // this forces a proper sync + if (IC2.platform.isSimulating()) { + detectAndSendChanges(); + } + } + } - return null; - } + return null; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerIndustrialWandRecharge.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerIndustrialWandRecharge.java index 2603004..23095f4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerIndustrialWandRecharge.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/container/ContainerIndustrialWandRecharge.java @@ -1,129 +1,126 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.container; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; - -import java.util.List; -import java.util.ListIterator; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityIndustrialWandRecharge; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.slot.SlotWandOnly; + +import java.util.List; +import java.util.ListIterator; public class ContainerIndustrialWandRecharge extends Container { - TileEntityIndustrialWandRecharge charger; - SlotWandOnly wandSlot; + 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(this.wandSlot = new SlotWandOnly(this, entity, 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); + } - @SuppressWarnings("unchecked") - @Override - public final ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex) { - Slot sourceSlot = (Slot) inventorySlots.get(sourceSlotIndex); + @SuppressWarnings("unchecked") + @Override + public final ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex) { + Slot sourceSlot = (Slot) inventorySlots.get(sourceSlotIndex); - if (sourceSlot != null && sourceSlot.getHasStack()) { - ItemStack sourceItemStack = sourceSlot.getStack(); - int oldSourceItemStackSize = sourceItemStack.stackSize; + if (sourceSlot != null && sourceSlot.getHasStack()) { + ItemStack sourceItemStack = sourceSlot.getStack(); + int oldSourceItemStackSize = sourceItemStack.stackSize; - if (sourceSlot.inventory == player.inventory) { // player inventory - // clicked - // 0: fill input existing stacks, 1: fill input empty stacks, 2: - // fill existing stacks, 3: fill empty stacks - for (int run = 0; run < 4 && sourceItemStack.stackSize > 0; run++) { - if (run < 2) { - for (Slot targetSlot : (List) inventorySlots) { - if (targetSlot instanceof SlotInvSlot && ((SlotInvSlot) targetSlot).invSlot.canInput() && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 1) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (sourceSlot.inventory == player.inventory) { // player inventory + // clicked + // 0: fill input existing stacks, 1: fill input empty stacks, 2: + // fill existing stacks, 3: fill empty stacks + for (int run = 0; run < 4 && sourceItemStack.stackSize > 0; run++) { + if (run < 2) { + for (Slot targetSlot : (List) inventorySlots) { + if (targetSlot instanceof SlotInvSlot && ((SlotInvSlot) targetSlot).invSlot.canInput() && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 1) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } else { - for (Slot targetSlot : (List) inventorySlots) { - if (targetSlot.inventory != player.inventory && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 3) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } else { + for (Slot targetSlot : (List) inventorySlots) { + if (targetSlot.inventory != player.inventory && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 3) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } - } - } else { // Shift-Click on a GUIslot of the container - for (int run = 0; run < 2 && sourceItemStack.stackSize > 0; run++) { - for (ListIterator it = ((List) inventorySlots).listIterator(inventorySlots.size()); it.hasPrevious();) { - Slot targetSlot = it.previous(); + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } + } + } else { // Shift-Click on a GUIslot of the container + for (int run = 0; run < 2 && sourceItemStack.stackSize > 0; run++) { + for (ListIterator it = ((List) inventorySlots).listIterator(inventorySlots.size()); it.hasPrevious(); ) { + Slot targetSlot = it.previous(); - if (targetSlot.inventory == player.inventory && targetSlot.isItemValid(sourceItemStack)) { - if (targetSlot.getStack() != null || run == 1) { - mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); + if (targetSlot.inventory == player.inventory && targetSlot.isItemValid(sourceItemStack)) { + if (targetSlot.getStack() != null || run == 1) { + mergeItemStack(sourceItemStack, targetSlot.slotNumber, targetSlot.slotNumber + 1, false); - if (sourceItemStack.stackSize == 0) - break; - } - } - } - } - } + if (sourceItemStack.stackSize == 0) + break; + } + } + } + } + } - if (sourceItemStack.stackSize != oldSourceItemStackSize) { - if (sourceItemStack.stackSize == 0) { - sourceSlot.putStack(null); - } else { - sourceSlot.onPickupFromSlot(player, sourceItemStack); - } + if (sourceItemStack.stackSize != oldSourceItemStackSize) { + if (sourceItemStack.stackSize == 0) { + sourceSlot.putStack(null); + } else { + sourceSlot.onPickupFromSlot(player, sourceItemStack); + } - // vanilla doesn't fully re-sync after processing the slot click - // packet, - // causing a race condition of the client received an old state - // through packet delay after the slot click - // this forces a proper sync - if (IC2.platform.isSimulating()) { - detectAndSendChanges(); - } - } - } + // vanilla doesn't fully re-sync after processing the slot click + // packet, + // causing a race condition of the client received an old state + // through packet delay after the slot click + // this forces a proper sync + if (IC2.platform.isSimulating()) { + detectAndSendChanges(); + } + } + } - return null; - } + return null; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/slot/SlotWandOnly.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/slot/SlotWandOnly.java index 6535687..0dd28d9 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/slot/SlotWandOnly.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/slot/SlotWandOnly.java @@ -1,41 +1,41 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.slot; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerIndustrialWandRecharge; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import thaumcraft.common.items.wands.ItemWandCasting; -import electricMagicTools.tombenpotter.electricmagictools.common.tile.container.ContainerIndustrialWandRecharge; public class SlotWandOnly extends Slot { - final ContainerIndustrialWandRecharge charger; + final ContainerIndustrialWandRecharge charger; - public SlotWandOnly(ContainerIndustrialWandRecharge indCharger, IInventory inv, int par3, int par4, int par5) { - super(inv, par3, par4, par5); - this.charger = indCharger; - } + public SlotWandOnly(ContainerIndustrialWandRecharge indCharger, IInventory inv, int par3, int par4, int par5) { + super(inv, par3, par4, par5); + this.charger = indCharger; + } - @Override - public boolean isItemValid(ItemStack par1ItemStack) { - if (!(par1ItemStack.getItem() instanceof ItemWandCasting)) - return false; + @Override + public boolean isItemValid(ItemStack par1ItemStack) { + if (!(par1ItemStack.getItem() instanceof ItemWandCasting)) + return false; - ItemWandCasting wand = (ItemWandCasting) par1ItemStack.getItem(); - return wand.getCap(par1ItemStack).getBaseCostModifier() <= 1F; - } + ItemWandCasting wand = (ItemWandCasting) par1ItemStack.getItem(); + return wand.getCap(par1ItemStack).getBaseCostModifier() <= 1F; + } - @Override - public int getSlotStackLimit() { - return 1; - } + @Override + public int getSlotStackLimit() { + return 1; + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityAirSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityAirSolar.java index d541626..86d2d17 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityAirSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityAirSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityAirSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityAirSolar extends TileEntityEMT implements IWrenchable { - public TileEntityAirSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityAirSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord >= 160) { - energySource.addEnergy(Config.compressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.compressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord >= 160) { + energySource.addEnergy(Config.compressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 15); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 15); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityCompressedSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityCompressedSolar.java index eab1bf7..10ed374 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityCompressedSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityCompressedSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityCompressedSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityCompressedSolar extends TileEntityEMT implements IWrenchable { - public TileEntityCompressedSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityCompressedSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.compressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 0); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 0); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDarkSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDarkSolar.java index 054d877..940c436 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDarkSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDarkSolar.java @@ -1,120 +1,117 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDarkSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDarkSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDarkSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; - if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { - energySource.addEnergy(Config.compressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + public TileEntityDarkSolar() { + super(); + this.tick = random.nextInt(64); + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } + if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 6); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 6); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleAirSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleAirSolar.java index 7af1242..ec493bf 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleAirSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleAirSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleAirSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleAirSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleAirSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleAirSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord >= 160) { - energySource.addEnergy(Config.doubleCompressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord >= 160) { + energySource.addEnergy(Config.doubleCompressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 0); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 0); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleCompressedSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleCompressedSolar.java index e69d210..a6f1312 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleCompressedSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleCompressedSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleCompressedSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleCompressedSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleCompressedSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleCompressedSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 1); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 1); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleDarkSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleDarkSolar.java index a2403b4..ddf5c57 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleDarkSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleDarkSolar.java @@ -1,120 +1,117 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleDarkSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleDarkSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleDarkSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; - if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + public TileEntityDoubleDarkSolar() { + super(); + this.tick = random.nextInt(64); + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } + if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 7); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 7); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleEarthSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleEarthSolar.java index 76d7444..904664d 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleEarthSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleEarthSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleEarthSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleEarthSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleEarthSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleEarthSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord <= 10) { - energySource.addEnergy(Config.doubleCompressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord <= 10) { + energySource.addEnergy(Config.doubleCompressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 3); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 3); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleFireSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleFireSolar.java index fece14d..cb37253 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleFireSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleFireSolar.java @@ -1,124 +1,119 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleFireSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 3); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleFireSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleFireSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 3); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleFireSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - if (worldObj.provider.dimensionId == -1) { - energySource.addEnergy(Config.doubleCompressedSolarOutput * 2); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (!initialized && worldObj != null) { + canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; + initialized = true; + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + if (worldObj.provider.dimensionId == -1) { + energySource.addEnergy(Config.doubleCompressedSolarOutput * 2); + } else { + if (tick-- == 0) { + updateSunState(); + tick = 64; + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public short getFacing() { - return 0; - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public void setFacing(short facing) { + @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 wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public short getFacing() { + return 0; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public void setFacing(short facing) { - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 13); - } + } + + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } + + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 13); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleOrderSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleOrderSolar.java index 1fd406c..160b93e 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleOrderSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleOrderSolar.java @@ -1,121 +1,117 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleOrderSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 3); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleOrderSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleOrderSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 3); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleOrderSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.doubleCompressedSolarOutput * 3); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } + if (theSunIsVisible) { + energySource.addEnergy(Config.doubleCompressedSolarOutput * 3); + } + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + private 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; + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleWaterSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleWaterSolar.java index e4dad71..2ea705b 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleWaterSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityDoubleWaterSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityDoubleWaterSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityDoubleWaterSolar extends TileEntityEMT implements IWrenchable { - public TileEntityDoubleWaterSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityDoubleWaterSolar() { + super(); + this.tick = random.nextInt(64); + } - if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { - energySource.addEnergy(Config.doubleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { + energySource.addEnergy(Config.doubleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 4); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 4); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityEarthSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityEarthSolar.java index b71e35b..897d0aa 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityEarthSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityEarthSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityEarthSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityEarthSolar extends TileEntityEMT implements IWrenchable { - public TileEntityEarthSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityEarthSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord <= 10) { - energySource.addEnergy(Config.compressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.compressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord <= 10) { + energySource.addEnergy(Config.compressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 2); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 2); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityFireSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityFireSolar.java index bb528d4..88255d4 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityFireSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityFireSolar.java @@ -1,124 +1,119 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityFireSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityFireSolar extends TileEntityEMT implements IWrenchable { - public TileEntityFireSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityFireSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.compressedSolarOutput); - } - if (worldObj.provider.dimensionId == -1) { - energySource.addEnergy(Config.compressedSolarOutput * 2); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (!initialized && worldObj != null) { + canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; + initialized = true; + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + if (worldObj.provider.dimensionId == -1) { + energySource.addEnergy(Config.compressedSolarOutput * 2); + } else { + if (tick-- == 0) { + updateSunState(); + tick = 64; + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public short getFacing() { - return 0; - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public void setFacing(short facing) { + @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 wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public short getFacing() { + return 0; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public void setFacing(short facing) { - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 12); - } + } + + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } + + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 12); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityOrderSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityOrderSolar.java index 8700413..730e95c 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityOrderSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityOrderSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityOrderSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 2); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityOrderSolar extends TileEntityEMT implements IWrenchable { - public TileEntityOrderSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 2); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityOrderSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.compressedSolarOutput * 3); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.compressedSolarOutput * 3); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 9); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 9); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleAirSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleAirSolar.java index 2606dbf..6ae2066 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleAirSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleAirSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleAirSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 5); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleAirSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleAirSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 5); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleAirSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord >= 160) { - energySource.addEnergy(Config.tripleCompressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord >= 160) { + energySource.addEnergy(Config.tripleCompressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 1); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 1); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleCompressedSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleCompressedSolar.java index 0e5fe26..19fe8c8 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleCompressedSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleCompressedSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleCompressedSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 3); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleCompressedSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleCompressedSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 3); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleCompressedSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 2); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 2); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleDarkSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleDarkSolar.java index 38efda0..150fb18 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleDarkSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleDarkSolar.java @@ -1,120 +1,117 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleDarkSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 3); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleDarkSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleDarkSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 3); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; - if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + public TileEntityTripleDarkSolar() { + super(); + this.tick = random.nextInt(64); + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } + if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && worldObj.isDaytime() == false && worldObj.isRaining() == false && worldObj.isThundering() == false) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 8); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 8); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleEarthSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleEarthSolar.java index 63c9c50..d144022 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleEarthSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleEarthSolar.java @@ -1,123 +1,120 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleEarthSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 5); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleEarthSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleEarthSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 5); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleEarthSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible && this.yCoord <= 10) { - energySource.addEnergy(Config.tripleCompressedSolarOutput * 2.5); - } else if (theSunIsVisible) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (theSunIsVisible && this.yCoord <= 10) { + energySource.addEnergy(Config.tripleCompressedSolarOutput * 2.5); + } else if (theSunIsVisible) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars2, 1, 4); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars2, 1, 4); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleFireSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleFireSolar.java index 8d5cdbb..51db66e 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleFireSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleFireSolar.java @@ -1,124 +1,119 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleFireSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 5); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleFireSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleFireSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 5); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleFireSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - if (worldObj.provider.dimensionId == -1) { - energySource.addEnergy(Config.tripleCompressedSolarOutput * 2); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (!initialized && worldObj != null) { + canRain = worldObj.getWorldChunkManager().getBiomeGenAt(xCoord, zCoord).getIntRainfall() > 0; + initialized = true; + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + if (worldObj.provider.dimensionId == -1) { + energySource.addEnergy(Config.tripleCompressedSolarOutput * 2); + } else { + if (tick-- == 0) { + updateSunState(); + tick = 64; + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + if (theSunIsVisible) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public short getFacing() { - return 0; - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public void setFacing(short facing) { + @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 wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + @Override + public short getFacing() { + return 0; + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public void setFacing(short facing) { - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 14); - } + } + + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } + + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 14); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleOrderSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleOrderSolar.java index b1d7fad..d805045 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleOrderSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleOrderSolar.java @@ -1,121 +1,117 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleOrderSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 5); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleOrderSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleOrderSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 5); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleOrderSolar() { + super(); + this.tick = random.nextInt(64); + } - if (theSunIsVisible) { - energySource.addEnergy(Config.tripleCompressedSolarOutput * 3); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } + if (theSunIsVisible) { + energySource.addEnergy(Config.tripleCompressedSolarOutput * 3); + } + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + private 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; + } - @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/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleWaterSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleWaterSolar.java index bee858b..8c0f498 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleWaterSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityTripleWaterSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityTripleWaterSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 1000000, 3); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityTripleWaterSolar extends TileEntityEMT implements IWrenchable { - public TileEntityTripleWaterSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 1000000, 3); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityTripleWaterSolar() { + super(); + this.tick = random.nextInt(64); + } - if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { - energySource.addEnergy(Config.tripleCompressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { + energySource.addEnergy(Config.tripleCompressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 5); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 5); + } } diff --git a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityWaterSolar.java b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityWaterSolar.java index 10625e5..8c7c2dc 100644 --- a/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityWaterSolar.java +++ b/src/main/java/electricMagicTools/tombenpotter/electricmagictools/common/tile/solars/TileEntityWaterSolar.java @@ -1,121 +1,118 @@ /******************************************************************************* * Copyright (c) 2014 Tombenpotter. * All rights reserved. - * + * * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * + * * This class was made by Tombenpotter and is distributed as a part of the Electro-Magic Tools mod. * Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012. * http://www.minecraftforum.net/topic/1585216- ******************************************************************************/ package electricMagicTools.tombenpotter.electricmagictools.common.tile.solars; +import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; +import electricMagicTools.tombenpotter.electricmagictools.common.Config; +import electricMagicTools.tombenpotter.electricmagictools.common.tile.TileEntityEMT; import ic2.api.energy.prefab.BasicSource; import ic2.api.tile.IWrenchable; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import electricMagicTools.tombenpotter.electricmagictools.common.BlockRegistry; -import electricMagicTools.tombenpotter.electricmagictools.common.Config; -public class TileEntityWaterSolar extends TileEntity implements IWrenchable { +import java.util.Random; - private BasicSource energySource = new BasicSource(this, 10000, 1); - private static Random random = new Random(); - private boolean initialized; - public boolean theSunIsVisible; - private int tick; - private boolean canRain; - private boolean noSunlight; +public class TileEntityWaterSolar extends TileEntityEMT implements IWrenchable { - public TileEntityWaterSolar() { - super(); - this.tick = random.nextInt(64); - } + private BasicSource energySource = new BasicSource(this, 10000, 1); + private static Random random = new Random(); + private boolean initialized; + public boolean theSunIsVisible; + private int tick; + private boolean canRain; + private boolean noSunlight; - @Override - public void updateEntity() { - energySource.updateEntity(); - 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; - } - int energyProduction = 0; + public TileEntityWaterSolar() { + super(); + this.tick = random.nextInt(64); + } - if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { - energySource.addEnergy(Config.compressedSolarOutput); - } - energySource.addEnergy(energyProduction); - } + @Override + public void updateEntity() { + energySource.updateEntity(); + 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; + } - private void updateSunState() { - boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); - theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); - } + if (worldObj.isRaining() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) || worldObj.isThundering() && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord)) { + energySource.addEnergy(Config.compressedSolarOutput); + } + } - @Override - public void onChunkUnload() { - energySource.onChunkUnload(); - } + private void updateSunState() { + boolean isRaining = canRain && (worldObj.isRaining() || worldObj.isThundering()); + theSunIsVisible = worldObj.isDaytime() && !isRaining && worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord); + } - @Override - public void invalidate() { - energySource.invalidate(); - super.invalidate(); - } + @Override + public void onChunkUnload() { + energySource.onChunkUnload(); + } - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) { - super.writeToNBT(nbttagcompound); - energySource.writeToNBT(nbttagcompound); - } + @Override + public void invalidate() { + energySource.invalidate(); + super.invalidate(); + } - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) { - super.readFromNBT(nbttagcompound); - energySource.readFromNBT(nbttagcompound); - } + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) { + super.writeToNBT(nbttagcompound); + energySource.writeToNBT(nbttagcompound); + } - @Override - public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { - return false; - } + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) { + super.readFromNBT(nbttagcompound); + energySource.readFromNBT(nbttagcompound); + } - @Override - public short getFacing() { - return 0; - } + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } - @Override - public void setFacing(short facing) { + @Override + public short getFacing() { + return 0; + } - } + @Override + public void setFacing(short facing) { - @Override - public boolean wrenchCanRemove(EntityPlayer entityPlayer) { - return true; - } + } - @Override - public float getWrenchDropRate() { - return 1; - } + @Override + public boolean wrenchCanRemove(EntityPlayer entityPlayer) { + return true; + } - @Override - public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { - return new ItemStack(BlockRegistry.emtSolars, 1, 3); - } + @Override + public float getWrenchDropRate() { + return 1; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return new ItemStack(BlockRegistry.emtSolars, 1, 3); + } } diff --git a/src/main/resources/assets/electricmagictools/lang/en_US.lang b/src/main/resources/assets/electricmagictools/lang/en_US.lang index 3b59267..c2e04b1 100644 --- a/src/main/resources/assets/electricmagictools/lang/en_US.lang +++ b/src/main/resources/assets/electricmagictools/lang/en_US.lang @@ -23,11 +23,9 @@ item.shieldfocus.name=Wand Focus: Shield item.electricgoggles.name=Electric Goggles of Revealing item.streamchainsaw.name=Chainsaw of the Stream item.rockbreakerdrill.name=Drill of the Rockbreaker -item.thaumiumplate.name=Thaumium Plate item.solarhelmetrevealing.name=Quantum Solar Helmet of Revealing item.hammerthor.name=Mjolnir item.taintedthorhammer.name=Broken Relic of Mjolnir -item.lightningsummoner.name=Lightning Summoner item.electricthorhammer.name=Supercharged Mjolnir item.electricboots.name=Electric Boots of the Traveller item.nanobootstraveller.name=Nanosuit Boots of the Traveller @@ -40,10 +38,25 @@ item.itememtitems.crushedOreAmber.name=Crushed Amber Ore item.itememtitems.purifiedOreAmber.name=Purified Amber Ore item.itememtitems.crushedOreCinnabar.name=Crushed Cinnabar Ore item.itememtitems.purifiedOreCinnabar.name=Purified Cinnabar Ore +item.itememtitems.thaumiumPlate.name=Thaumium Plate +item.itememtitems.lightningSummoner.name=Lightning Summoner +item.itememtitems.featherMesh.name=Feather Mesh +item.itememtitems.glue.name=Glue +item.itememtitems.ductTape.name=Duct Tape +item.itememtitems.rubberBall.name=Rubber Ball +item.itememtitems.cardboard.name=Cardboard Sheet +item.itememtitems.featherGluedCardboardWing.name=Feather Glued Carboard Wing +item.itememtitems.denseIronSheet.name=Dense Iron Sheet +item.itememtitems.taintedFeather.name=Tainted Feather +item.itememtitems.thaumiumWing.name=Thaumium Reinforced Wing item.emtbauble.euMaker.armor.name=Armor Charging Ring item.emtbauble.euMaker.inventory.name=Inventory Charging Ring item.emtbauble.oneRing.name=The One Ring item.wandchargefocus.name=Wand Focus: Wand Charging +item.featherwing.name=Feather Duct-Taped Wings +item.thaumiumwing.name=Thaumium Reinforced Wings +item.nanowing.name=Nanosuit Wings +item.quantumwing.name=Quantum Wings =============Block Names============= tile.shield.name=Shield Block @@ -127,6 +140,10 @@ emt.tag.Wand Focus: Wand Charging=From electricity to vis emt.tag.Inventory Charging Ring=Passive charger emt.tag.Armor Charging Ring=Passive life-saver emt.tag.The One Ring=Forged inside the pit of the volcanic Mount Doom... +emt.tag.Feather Wings=It only works in anime... +emt.tag.Thaumium Reinforced Wings=Already much better +emt.tag.Nanosuit Wings=Nanotechnologies to the rescue! +emt.tag.Quantum Wings=The last step is here... =============Thaumonomicon Texts============= emt.text.Electric Magic Tools=Who says magic can't work with technology? Our researchers have collaborated with the top mages of the school of Thaumaturgy to bring you the effectiveness of magic coupled with the convenience of electric tools. @@ -138,7 +155,7 @@ emt.text.Quantum Goggles of Revealing=It took a lot of trial and error, but you emt.text.Iron Omnitool=While tinkering with the inner workings of some of your tools to see if magical integration is a possibility, you have discovered a way to combine the Mining Drill and the Chainsaw, resulting in a tool capable of both mining, cutting down trees and attacking enemies! As you are working with mundane metals, magic influence is not needed to merge these tools together. emt.text.Diamond Omnitool=Your discovery of an Iron Omnitool has driven you to try to accomplish the same with some more powerful devices. You have discovered a way to combine the Diamond Drill and the Diamond Chainsaw, resulting in a tool capable of both mining, cutting down trees and attacking enemies, while maintaining the speed and capacity bonuses of the diamond tools. As diamonds are incredibly tough and nearly impossible to reshape once the raw diamonds have been fashioned into tools such as drills and chainsaws, you will require a little bit of magic to coax them to merge. emt.text.Thaumium Omnitool=After creating the Diamond and Iron Omnitools, the next logical step was to do the same with Thaumium. Unfortunately, this isn't as easy. You have discovered a way to combine the Thaumium Drill and the Thaumium Chainsaw, resulting in a tool capable of mining and chopping trees at great speed with a high energy capacity. These tools have already once been infused with magic. You are not sure what will happen if they were to be infused again. -emt.text.Explosion Focus=You have found a way to modify the Nine Hells focus by exposing the bats to the rather explosive properties of a Mining Laser. This focus acts similarily to a Mining Laser but uses vis instead of EU. This explosive foci has the downside of being incredibly unstable, so you make a note to be careful. +emt.text.Explosion Focus=You have found a way to improve the Nine Hells focus. By exposing the bats to the explosive properties of a Mining Laser, you have built a focus that acts similarly to the Laser but uses vis instead of EU. However, its effects are incredibly unstable, so you make a note to be careful. emt.text.Kris-tmas Focus=Merry Christmas!

You have found a novel use for the frost focus. By exposing it to the magic of Christmas, you can summon your snowy friends at will to fire snowballs at your Festivus celebrating neighbours! emt.text.Shield Focus=With some experimentation with the Portable Hole, you have found out more about the transportation of objects to alternate dimensions. You believe you can reverse these effects to summon a swath of blocks from a dimension full of matter to shield you from any oncoming disaster. Caution is to be taken when using this focus, as when bringing these blocks into our dimension, it will transpose any blocks in the way into the dimension it came from, never to return again. You will also be unable to move while this shield is in existance. emt.text.Potentia Generator=After much studying and research, you have finally discovered how to create electricity from your leftover essentia.

This generator will produce between 3000 and 3500 EU per unit of Potentia, making it very efficient. Simply place a Warded Jar containing Potentia in a 8 blocks radius of the machine and it will draw it in to create EU.

While Potentia seems like the most logical choice for producing essentia with EU, you believe you will be able to generate electricity from different essentia in the near future with a bit of tinkering. @@ -175,7 +192,11 @@ emt.text.UU-Matter Infusion=You have always found the powers possessed by UU-Mat emt.text.Portable Node=After studying in an in-depth manner of the wonders of Node Jarring, you have managed to create an item capable of spawning a random node. However, due to some parts of node magic which you cannot understand, this Portable Node will always be Fading and Unstable.

You can only get rid of it by a shift-right click, and you think that you should dispose of it as soon as possible, for unstable nodes are... rather unpredictable. emt.text.Electric Hoe of Growth=You have managed to upgrade your Hoe of Growth. It now delivers little shocks to the land and plants around it, much like your regular Hoe of Growth would do.

However, the magic contained within this tool is too powerful for you to convert it fully to using mundane electricity, for the tool still has a limited number of uses before it breaks, but is rechargeable. emt.text.Wand Focus: Charging=You realized you always carry a wand with you, along with your electric stuff. But sometimes, you have ran out of juice in your electric tools. That's why you created this wand focus. It is very simple, yet very useful, for it drains vis from your wand storage, and charges the items using mundane electricity. -emt.text.Wand Focus: Wand Charging=After studying in a more in-depth manner your Charging Focus, you have found a way to reverse its effects. Instead of consuming vis from your wand and giving off electricity, it rather consumes electricity to create vis. -emt.text.Inventory Charging Ring=During your research, you discovered some new acessories, baubles. But an idea popped into your mind! You have finally, after hours of test, fails, and research, managed to transform a mundane ring into an item creating 32 EU/T for the sole purpose of recharging electric items in your inventory slots. But you feel like this wouldn't really save your life.. -emt.text.Armor Charging Ring=This item is going further than the previous one, and aims to be able to save your life. It will provide a way to charge electric items in your armor slots, and your armor slots only at a rate of 32 EU/T in any and every conditions. +emt.text.Wand Focus: Wand Charging=You've discovered a way to take the benefits of the Industrial Recharge station and house them inside of a Charging Focus, reversing its polarity. Now it will drain electricity from your items in order to recharge your wand, albeit at a rather high cost. Furthermore, you have realized than you need a full set of Electric Armor to be able to start the wand charging process. +emt.text.Inventory Charging Ring=While other thaumaturgists use rings to charge their runic shields, you feel that there are better applications for them. By fusing power sources into a mundane ring, you have learned how to funnel its charging effects into electric items in your inventory instead. It doesn't generate much at only 32 EU per tick, but that just means there's room for improvement. +emt.text.Armor Charging Ring=You have found the low but constant recharge rate of your new ring to be more useful than anticipated, but it would be nice if it charged your armor when there wasn't a tool in need of power. By infusing a few more power sources and a piece of armor, you have found a way to have it do just that. Sadly, the new power sources do not increase the recharge rate, but progress is progress. emt.text.The One Ring=Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne in the Land of Mordor where the Shadows lie. One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them in the Land of Mordor where the Shadows lie. -J.R.R. Tolkien's epigraph to The Lord of The Rings.
You dream of being able to disappear from sight , therefore becoming invulnerable to any attack. You have heard that this Ring lays somewhere in ruins, unaltered by time... +emt.text.Feather Wings=Duct-taping feathers to cardboard sheets, formed in the shape of wings sounded like a good idea. At least, you can thrust yourself in the air when the spacebar is hit. Not much, but it'll work. Using any wings underwater or during the rain sounds like a very bad idea. Included: fall damage reduction, 25%. +emt.text.Thaumium Reinforced Wings=The magic infusing thaumium is well known. Therefore, reinforcing your cardboard wings with thaumium sounded like a good idea. You can thrust yourself much higher on spacebar hit, and slow your fall down when spacebar is held. Sneak to go down at a steady pace. Included: fall damage reduction, 50%. +emt.text.Nanosuit Wings=Combining the magic harnessed by thaumium with the nanotechnologies in your wings.. seemed like the logical way to go. You can thrust yourself way higher than before, and fall even slower when holding spacebar. Included: fall damage reduction, 75%. +emt.text.Quantum Wings=After exploring all the possibilities of nanotechnologies, you decided to do the last jump. Quantum. You can thrust yourself many blocks high, have a very good protection, and your fall is slowed down a lot. However, the quantum impredictability happened once again. Your fall will be completely stopped when spacebar and sneak are maintained. You don't know why, but it works. Included: fall damage reduction, 100%. diff --git a/src/main/resources/assets/electricmagictools/lang/zh_CH.lang b/src/main/resources/assets/electricmagictools/lang/zh_CH.lang deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/blocks/Thumbs.db deleted file mode 100644 index c67fefc..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/Thumbs.db and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront.png index 6446faf..ab6cce3 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront_alt.png new file mode 100644 index 0000000..0ae0e4b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/arborfront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront.png index 6571bf2..e7513a2 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront_alt.png new file mode 100644 index 0000000..e57af42 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/auramfront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front.png new file mode 100644 index 0000000..feadeb7 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front_alt.png new file mode 100644 index 0000000..2417a8b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/front_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront.png index e25e3f5..63ac1bf 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront_alt.png new file mode 100644 index 0000000..f48530b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/ignisfront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront.png index bca4ccf..3128019 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront_alt.png new file mode 100644 index 0000000..b34afdc Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/potentiafront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront.png index bb3b38c..fe79bb2 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront_alt.png new file mode 100644 index 0000000..2ea1cc5 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/saxumfront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/side.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/side.png index 7783103..a99cadf 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/side.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/side.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top.png index 0836285..6e56a18 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top.png and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_arbor.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_arbor.png new file mode 100644 index 0000000..b7e1b80 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_arbor.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_auram.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_auram.png new file mode 100644 index 0000000..8696f7e Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_auram.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_ignis.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_ignis.png new file mode 100644 index 0000000..8b979a7 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_ignis.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_potentia.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_potentia.png new file mode 100644 index 0000000..887c265 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_potentia.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_saxum.png b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_saxum.png new file mode 100644 index 0000000..d92e235 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/essentiagenerator/top_saxum.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/bottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/bottom.png index 0836285..f57439b 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/bottom.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/bottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmacerator.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmacerator.png index a85b8ef..2d2df39 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmacerator.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmacerator.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront.png index 2dc3ee8..9929c3f 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt.png new file mode 100644 index 0000000..702af9d Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt2.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt2.png new file mode 100644 index 0000000..ea74aaa Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt3.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt3.png new file mode 100644 index 0000000..438daa3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt3.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt4.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt4.png new file mode 100644 index 0000000..ec6550e Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfront_alt4.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive.png index 12b2a6e..a259e21 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt.png new file mode 100644 index 0000000..ce74cc2 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt2.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt2.png new file mode 100644 index 0000000..a72ad30 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt3.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt3.png new file mode 100644 index 0000000..36e9220 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt3.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt4.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt4.png new file mode 100644 index 0000000..aaf16b3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratorfrontactive_alt4.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop.png index 769b13d..1364111 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop_alt.png new file mode 100644 index 0000000..b17ddf9 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortop_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive.png new file mode 100644 index 0000000..3e60df2 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive_alt.png new file mode 100644 index 0000000..f614f90 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/etherealmaceratortopactive_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/side.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/side.png index 7783103..49d4c9f 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/side.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/side.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/top.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top.png index 0836285..7506fe8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/top.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt.png new file mode 100644 index 0000000..18a4715 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt2.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt2.png new file mode 100644 index 0000000..f4b5c06 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/top_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger.png index 91947a3..f6d5ab8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger.png and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger_front.png b/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger_front.png new file mode 100644 index 0000000..6293754 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/machines/wandcharger_front.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/portablenode.png b/src/main/resources/assets/electricmagictools/textures/blocks/portablenode.png index 98f8763..9898336 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/portablenode.png and b/src/main/resources/assets/electricmagictools/textures/blocks/portablenode.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/shield.png b/src/main/resources/assets/electricmagictools/textures/blocks/shield.png index 281371c..eee7131 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/shield.png and b/src/main/resources/assets/electricmagictools/textures/blocks/shield.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/Thumbs.db new file mode 100644 index 0000000..04938b4 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/Thumbs.db differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airbottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airbottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airside.png new file mode 100644 index 0000000..15a9035 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/airside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/air/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/airbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/airbottom.png deleted file mode 100644 index 8b45cc4..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/airbottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/airside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/airside.png deleted file mode 100644 index 1fed154..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/airside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/bottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/bottom.png index 0836285..9ddf27c 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/bottom.png and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/bottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/Thumbs.db new file mode 100644 index 0000000..c44a8ed Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/Thumbs.db differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkbottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkbottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkside.png new file mode 100644 index 0000000..bd4b554 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/darkside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/dark/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkbottom.png deleted file mode 100644 index a9b6ed2..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkbottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkside.png deleted file mode 100644 index ee0350a..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/darkside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/doublesolartop.png index 29fe539..797aa00 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/doublesolartop.png and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthbottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthbottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthside.png new file mode 100644 index 0000000..e860147 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/earthside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earth/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthbottom.png deleted file mode 100644 index 00f5701..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthbottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthside.png deleted file mode 100644 index 3c0e785..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/earthside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/firebottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/firebottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/firebottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/fireside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/fireside.png new file mode 100644 index 0000000..06ce193 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/fireside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fire/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/firebottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/firebottom.png deleted file mode 100644 index 7e820ff..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/firebottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fireside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/fireside.png deleted file mode 100644 index 1b4f33c..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/fireside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/Thumbs.db new file mode 100644 index 0000000..26e243b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/Thumbs.db differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderbottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderbottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderside.png new file mode 100644 index 0000000..ec7191a Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/orderside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/order/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderbottom.png deleted file mode 100644 index 938dd67..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderbottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderside.png deleted file mode 100644 index cd9d3b4..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/orderside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/side.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/side.png index 7783103..1ded25e 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/side.png and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/side.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/solartop.png index 3274227..ddf4eb3 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/solartop.png and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/triplesolartop.png index 23b7215..efe16f0 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/triplesolartop.png and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/Thumbs.db new file mode 100644 index 0000000..a5f53ad Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/Thumbs.db differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/doublesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/doublesolartop.png new file mode 100644 index 0000000..797aa00 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/doublesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/solartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/solartop.png new file mode 100644 index 0000000..ddf4eb3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/solartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/triplesolartop.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/triplesolartop.png new file mode 100644 index 0000000..efe16f0 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/triplesolartop.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterbottom.png new file mode 100644 index 0000000..9ddf27c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterbottom.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterside.png new file mode 100644 index 0000000..e30fe95 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/blocks/solars/water/waterside.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterbottom.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterbottom.png deleted file mode 100644 index 06e1b42..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterbottom.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterside.png b/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterside.png deleted file mode 100644 index 14cea2f..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/blocks/solars/waterside.png and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/guis/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/guis/Thumbs.db deleted file mode 100644 index a6d16be..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/guis/Thumbs.db and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/guis/etherealmacerator.png b/src/main/resources/assets/electricmagictools/textures/guis/etherealmacerator.png index 1f17bad..ac677d8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/guis/etherealmacerator.png and b/src/main/resources/assets/electricmagictools/textures/guis/etherealmacerator.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/guis/wandcharger.png b/src/main/resources/assets/electricmagictools/textures/guis/wandcharger.png index d64de50..137d781 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/guis/wandcharger.png and b/src/main/resources/assets/electricmagictools/textures/guis/wandcharger.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/OLDlightningsummoner.png b/src/main/resources/assets/electricmagictools/textures/items/OLDlightningsummoner.png new file mode 100644 index 0000000..edb3892 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/OLDlightningsummoner.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/items/Thumbs.db deleted file mode 100644 index 4f3fe18..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/items/Thumbs.db and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/cardboard.png b/src/main/resources/assets/electricmagictools/textures/items/cardboard.png new file mode 100644 index 0000000..8cbdcd5 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/cardboard.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/chainsaw.png b/src/main/resources/assets/electricmagictools/textures/items/chainsaw.png new file mode 100644 index 0000000..c291364 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/chainsaw.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/chargefocus.png b/src/main/resources/assets/electricmagictools/textures/items/chargefocus.png index 3b4d042..7b4d5ed 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/chargefocus.png and b/src/main/resources/assets/electricmagictools/textures/items/chargefocus.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/christmasfocus.png b/src/main/resources/assets/electricmagictools/textures/items/christmasfocus.png index 326b5c4..1779674 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/christmasfocus.png and b/src/main/resources/assets/electricmagictools/textures/items/christmasfocus.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/clusteruranium.png b/src/main/resources/assets/electricmagictools/textures/items/clusteruranium.png index cc02cb0..60dcaa0 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/clusteruranium.png and b/src/main/resources/assets/electricmagictools/textures/items/clusteruranium.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/denseironsheet.png b/src/main/resources/assets/electricmagictools/textures/items/denseironsheet.png new file mode 100644 index 0000000..6de0984 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/denseironsheet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw.png b/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw.png index a860618..13c34b2 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw.png and b/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw_16X.png b/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw_16X.png new file mode 100644 index 0000000..7b24e1d Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/diamondchainsaw_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamonddrill_16X.png b/src/main/resources/assets/electricmagictools/textures/items/diamonddrill_16X.png new file mode 100644 index 0000000..b8e07be Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/diamonddrill_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool.png b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool.png index 6fa9cc1..30cb978 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool.png and b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_16X.png b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_16X.png new file mode 100644 index 0000000..57cee36 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_alt.png b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_alt.png new file mode 100644 index 0000000..a03c2d7 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/diamondomnitool_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/drill.png b/src/main/resources/assets/electricmagictools/textures/items/drill.png new file mode 100644 index 0000000..1abe4b3 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/drill.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/ducttape.png b/src/main/resources/assets/electricmagictools/textures/items/ducttape.png new file mode 100644 index 0000000..4d86abf Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/ducttape.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electricboots.png b/src/main/resources/assets/electricmagictools/textures/items/electricboots.png index d59477d..c77507a 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/electricboots.png and b/src/main/resources/assets/electricmagictools/textures/items/electricboots.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electricboots_ALT.png b/src/main/resources/assets/electricmagictools/textures/items/electricboots_ALT.png new file mode 100644 index 0000000..bf208b4 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electricboots_ALT.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electricgoggles.png b/src/main/resources/assets/electricmagictools/textures/items/electricgoggles.png index 833f6f8..75c62e8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/electricgoggles.png and b/src/main/resources/assets/electricmagictools/textures/items/electricgoggles.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electricgoggles_alt.png b/src/main/resources/assets/electricmagictools/textures/items/electricgoggles_alt.png new file mode 100644 index 0000000..a6fcc90 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electricgoggles_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoe_16X.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoe_16X.png new file mode 100644 index 0000000..8a2e933 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electrichoe_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth.png index a242db5..5333f73 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth.png and b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_16X.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_16X.png new file mode 100644 index 0000000..8ab4713 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_32x.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_32x.png new file mode 100644 index 0000000..31ee29d Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_32x.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt.png new file mode 100644 index 0000000..18db965 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt32x.png b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt32x.png new file mode 100644 index 0000000..6eca21b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/electrichoegrowth_alt32x.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/feathercarboardwing.png b/src/main/resources/assets/electricmagictools/textures/items/feathercarboardwing.png new file mode 100644 index 0000000..f5edebf Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/feathercarboardwing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/feathercardboardwing.png b/src/main/resources/assets/electricmagictools/textures/items/feathercardboardwing.png new file mode 100644 index 0000000..f5edebf Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/feathercardboardwing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/feathermesh.png b/src/main/resources/assets/electricmagictools/textures/items/feathermesh.png new file mode 100644 index 0000000..bfb36d9 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/feathermesh.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/featherwings.png b/src/main/resources/assets/electricmagictools/textures/items/featherwings.png new file mode 100644 index 0000000..1f977af Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/featherwings.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/featherwings_flat.png b/src/main/resources/assets/electricmagictools/textures/items/featherwings_flat.png new file mode 100644 index 0000000..e1be79a Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/featherwings_flat.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/glue.png b/src/main/resources/assets/electricmagictools/textures/items/glue.png new file mode 100644 index 0000000..c6d7a28 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/glue.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/glueball.png b/src/main/resources/assets/electricmagictools/textures/items/glueball.png new file mode 100644 index 0000000..c6d7a28 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/glueball.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png index d2040cf..0d68dbe 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png and b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png.mcmeta b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png.mcmeta index d3db93d..0645f48 100644 --- a/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png.mcmeta +++ b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer.png.mcmeta @@ -1,5 +1,5 @@ { "animation": { - "frametime": 30 + "frametime": 2 } } diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer_alt.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer_alt.png new file mode 100644 index 0000000..5cd62e5 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/electricthorhammer_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric01.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric01.png new file mode 100644 index 0000000..e46b48a Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric01.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric02.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric02.png new file mode 100644 index 0000000..586b4a2 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric02.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric03.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric03.png new file mode 100644 index 0000000..6922418 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric03.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric04.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric04.png new file mode 100644 index 0000000..916b4a1 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/hammerStages/electric04.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png index dc62117..e8dcf9e 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png and b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png.mcmeta b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png.mcmeta index d3db93d..a7314cf 100644 --- a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png.mcmeta +++ b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer.png.mcmeta @@ -1,5 +1,22 @@ { "animation": { - "frametime": 30 + "frametime": 1, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0 + ] } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_long.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_long.png new file mode 100644 index 0000000..bc44956 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_long.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_short.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_short.png new file mode 100644 index 0000000..8c62095 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/hammer/taintedthorhammer_short.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/hammer/thorhammer.png b/src/main/resources/assets/electricmagictools/textures/items/hammer/thorhammer.png index 6122108..83fdf5d 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/hammer/thorhammer.png and b/src/main/resources/assets/electricmagictools/textures/items/hammer/thorhammer.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/ironomnitool.png b/src/main/resources/assets/electricmagictools/textures/items/ironomnitool.png index 8f4d218..8bace47 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/ironomnitool.png and b/src/main/resources/assets/electricmagictools/textures/items/ironomnitool.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/ironomnitool_16X.png b/src/main/resources/assets/electricmagictools/textures/items/ironomnitool_16X.png new file mode 100644 index 0000000..a4d2a37 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/ironomnitool_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner.png b/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner.png index edb3892..081ec56 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner.png and b/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner_alt.png b/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner_alt.png new file mode 100644 index 0000000..c1d2567 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/lightningsummoner_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/nanobootstravel.png b/src/main/resources/assets/electricmagictools/textures/items/nanobootstravel.png index 202d2cf..fb59c8d 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/nanobootstravel.png and b/src/main/resources/assets/electricmagictools/textures/items/nanobootstravel.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet.png b/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet.png index 4e654c7..1cdcde5 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet.png and b/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet_alt.png b/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet_alt.png new file mode 100644 index 0000000..3e506ac Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/nanothaumichelmet_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/nanowings.png b/src/main/resources/assets/electricmagictools/textures/items/nanowings.png new file mode 100644 index 0000000..edf8672 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/nanowings.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/quantumbootstravel.png b/src/main/resources/assets/electricmagictools/textures/items/quantumbootstravel.png index 0514196..29d24f8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/quantumbootstravel.png and b/src/main/resources/assets/electricmagictools/textures/items/quantumbootstravel.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet.png b/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet.png index b3f31dc..15122a1 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet.png and b/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet_alt.png b/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet_alt.png new file mode 100644 index 0000000..6a81a4b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/quantumthaumichelmet_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/quantumwings.png b/src/main/resources/assets/electricmagictools/textures/items/quantumwings.png new file mode 100644 index 0000000..4e40402 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/quantumwings.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/rockbreakerdrill_16X.png b/src/main/resources/assets/electricmagictools/textures/items/rockbreakerdrill_16X.png new file mode 100644 index 0000000..ef13b77 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/rockbreakerdrill_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/rubberball.png b/src/main/resources/assets/electricmagictools/textures/items/rubberball.png new file mode 100644 index 0000000..c3135d1 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/rubberball.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/shieldfocus.png b/src/main/resources/assets/electricmagictools/textures/items/shieldfocus.png index f55a453..bb8d1d3 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/shieldfocus.png and b/src/main/resources/assets/electricmagictools/textures/items/shieldfocus.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/shieldfocus_alt.png b/src/main/resources/assets/electricmagictools/textures/items/shieldfocus_alt.png new file mode 100644 index 0000000..ac3035c Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/shieldfocus_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet.png b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet.png index 3e368e1..b6afd43 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet.png and b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt.png b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt.png new file mode 100644 index 0000000..33d97ac Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt2.png b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt2.png new file mode 100644 index 0000000..41981eb Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt3.png b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt3.png new file mode 100644 index 0000000..a81cf04 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/solarrevealinghelmet_alt3.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/streamchainsaw.png b/src/main/resources/assets/electricmagictools/textures/items/streamchainsaw.png index 11b3ab7..a582498 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/streamchainsaw.png and b/src/main/resources/assets/electricmagictools/textures/items/streamchainsaw.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/taintedfeather.png b/src/main/resources/assets/electricmagictools/textures/items/taintedfeather.png new file mode 100644 index 0000000..e199a94 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/taintedfeather.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumWing.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumWing.png new file mode 100644 index 0000000..f4c128f Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumWing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw.png index 0de7168..6cafc21 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw.png and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_16X.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_16X.png new file mode 100644 index 0000000..8fbab9d Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_alt.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_alt.png new file mode 100644 index 0000000..be90695 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumchainsaw_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill.png index 3225484..3abc5d8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill.png and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_16X.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_16X.png new file mode 100644 index 0000000..1d103b8 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt.png new file mode 100644 index 0000000..488af88 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt2.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt2.png new file mode 100644 index 0000000..14e3a3b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumdrill_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool.png index f89c9f1..b03ae8d 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool.png and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_16X.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_16X.png new file mode 100644 index 0000000..2bce875 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_16X.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt.png new file mode 100644 index 0000000..c352475 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt2.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt2.png new file mode 100644 index 0000000..1fac839 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumomnitool_alt2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/thaumiumwings.png b/src/main/resources/assets/electricmagictools/textures/items/thaumiumwings.png new file mode 100644 index 0000000..2838cd4 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/thaumiumwings.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/wandchargefocus.png b/src/main/resources/assets/electricmagictools/textures/items/wandchargefocus.png index 687e537..4bb36a0 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/items/wandchargefocus.png and b/src/main/resources/assets/electricmagictools/textures/items/wandchargefocus.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/wings_random.png b/src/main/resources/assets/electricmagictools/textures/items/wings_random.png new file mode 100644 index 0000000..797c99e Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/wings_random.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/items/wings_random2.png b/src/main/resources/assets/electricmagictools/textures/items/wings_random2.png new file mode 100644 index 0000000..2e89e5b Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/items/wings_random2.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/misc/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/misc/Thumbs.db deleted file mode 100644 index 3e3b860..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/misc/Thumbs.db and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/Thumbs.db b/src/main/resources/assets/electricmagictools/textures/models/Thumbs.db deleted file mode 100644 index b52fd7a..0000000 Binary files a/src/main/resources/assets/electricmagictools/textures/models/Thumbs.db and /dev/null differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/electricboots.png b/src/main/resources/assets/electricmagictools/textures/models/electricboots.png index 6f8a59a..cfbb8c8 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/electricboots.png and b/src/main/resources/assets/electricmagictools/textures/models/electricboots.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/electricgoggles.png b/src/main/resources/assets/electricmagictools/textures/models/electricgoggles.png index feecead..54a6eae 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/electricgoggles.png and b/src/main/resources/assets/electricmagictools/textures/models/electricgoggles.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/featherwing.png b/src/main/resources/assets/electricmagictools/textures/models/featherwing.png new file mode 100644 index 0000000..a99aa99 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/models/featherwing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/featherwing_noString.png b/src/main/resources/assets/electricmagictools/textures/models/featherwing_noString.png new file mode 100644 index 0000000..d993fba Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/models/featherwing_noString.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/nanobootstravel.png b/src/main/resources/assets/electricmagictools/textures/models/nanobootstravel.png index 3c46969..0ffbde3 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/nanobootstravel.png and b/src/main/resources/assets/electricmagictools/textures/models/nanobootstravel.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/nanowing.png b/src/main/resources/assets/electricmagictools/textures/models/nanowing.png new file mode 100644 index 0000000..a10d0c2 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/models/nanowing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/quantumbootstravel.png b/src/main/resources/assets/electricmagictools/textures/models/quantumbootstravel.png index ebd17bd..ff6e613 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/quantumbootstravel.png and b/src/main/resources/assets/electricmagictools/textures/models/quantumbootstravel.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/quantumwing.png b/src/main/resources/assets/electricmagictools/textures/models/quantumwing.png new file mode 100644 index 0000000..2da0939 Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/models/quantumwing.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/solarrevealinghelmet.png b/src/main/resources/assets/electricmagictools/textures/models/solarrevealinghelmet.png index 678e67b..8229384 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/solarrevealinghelmet.png and b/src/main/resources/assets/electricmagictools/textures/models/solarrevealinghelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/thaumicnanohelmet.png b/src/main/resources/assets/electricmagictools/textures/models/thaumicnanohelmet.png index 969bd35..a480cf6 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/thaumicnanohelmet.png and b/src/main/resources/assets/electricmagictools/textures/models/thaumicnanohelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/thaumicquantumhelmet.png b/src/main/resources/assets/electricmagictools/textures/models/thaumicquantumhelmet.png index 8fd61bc..45ae097 100644 Binary files a/src/main/resources/assets/electricmagictools/textures/models/thaumicquantumhelmet.png and b/src/main/resources/assets/electricmagictools/textures/models/thaumicquantumhelmet.png differ diff --git a/src/main/resources/assets/electricmagictools/textures/models/thaumiumwing.png b/src/main/resources/assets/electricmagictools/textures/models/thaumiumwing.png new file mode 100644 index 0000000..aa6cd4a Binary files /dev/null and b/src/main/resources/assets/electricmagictools/textures/models/thaumiumwing.png differ