diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-20 02:07:40 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-20 02:07:40 +1000 |
commit | a6bb1b33da251f4a2ec7a6d6facb4864e9905341 (patch) | |
tree | 84d47440794cadd5c64598355903b123e18e0662 /src/Java/gtPlusPlus/core/common | |
parent | 142fe00070526484862f15f3a125400a22a2fe96 (diff) | |
download | GT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.tar.gz GT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.tar.bz2 GT5-Unofficial-a6bb1b33da251f4a2ec7a6d6facb4864e9905341.zip |
+ Added a power cost of 32eu/action for the Tree Farmer. (Will eventually get a config option).
% Moved the internal power buffer variable out of the cut method into the class.
% Massive project tidy up, lots of old unused code removed or tidied up.
$ Fixed lots of String comparisons that used == instead of .equals().
$ Fixed Double/Triple/Quad null checks in certain places.
$ Fixed returns that set values at the same time.
$ Swapped 3.14 and 1.57 to Math.PI and Math.PI/2.
$ Fixed possible cases where a NPE may be thrown, by calling logging outside of null checks.
+ Added PI to CORE.java, since it's a double and MC uses it as a float in each instance.
- Stripped 95% of the useless code out of Meta_GT_Proxy.java
Diffstat (limited to 'src/Java/gtPlusPlus/core/common')
-rw-r--r-- | src/Java/gtPlusPlus/core/common/CommonProxy.java | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java index f16beb625f..d5a126ff39 100644 --- a/src/Java/gtPlusPlus/core/common/CommonProxy.java +++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java @@ -15,18 +15,15 @@ import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.debug.DEBUG_INIT; import gtPlusPlus.core.util.player.PlayerCache; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; - -import java.util.Iterator; - import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.*; public class CommonProxy { + public static Meta_GT_Proxy GtProxy; + public CommonProxy(){ //Should Register Gregtech Materials I've Made MinecraftForge.EVENT_BUS.register(this); @@ -38,19 +35,11 @@ public class CommonProxy { else { Utils.LOG_INFO("We're using Gregtech 5.08 or an equivalent fork."); } - handleGtIntegrationInit(); + Utils.LOG_INFO("Setting up our own GT_Proxy."); + GtProxy = new Meta_GT_Proxy(); } - } - private static void handleGtIntegrationInit(){ - Utils.LOG_INFO("Setting up our own GT_Proxy."); - Meta_GT_Proxy GtProxy = new Meta_GT_Proxy(); - for (String tOreName : OreDictionary.getOreNames()) { - ItemStack tOreStack; - Utils.LOG_INFO("Iterating list of GT materials for custom tool parts."); - for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); GtProxy.registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) { - Utils.LOG_INFO("Iterating Material"); - tOreStack = (ItemStack) i$.next(); - } + else { + GtProxy = null; } } @@ -122,12 +111,11 @@ public class CommonProxy { } - @SuppressWarnings("static-method") public int addArmor(String armor) { return 0; } - - public void generateMysteriousParticles(Entity theEntity) { } + public void generateMysteriousParticles(Entity entity) { + } } |