From a6bb1b33da251f4a2ec7a6d6facb4864e9905341 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Fri, 20 Jan 2017 02:07:40 +1000 Subject: + 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 --- .../gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java | 6 ------ src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java | 8 -------- src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java | 8 ++++---- 3 files changed, 4 insertions(+), 18 deletions(-) (limited to 'src/Java/gtPlusPlus/core/item/tool') diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java index e278c258ba..a0b884f97d 100644 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java +++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java @@ -27,12 +27,6 @@ public class MultiPickaxeBase extends StaballoyPickaxe{ return 0; } - protected Boolean FACING_HORIZONTAL = true; - protected String FACING = "north"; - protected EntityPlayer localPlayer; - protected String lookingDirection; - protected World localWorld; - protected ItemStack thisPickaxe = null; protected final int colour; protected final String materialName; protected final String displayName; diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java index bfe78b1866..627108f509 100644 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java +++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java @@ -6,10 +6,8 @@ import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.recipe.RecipeUtils; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.world.World; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -26,12 +24,6 @@ public class MultiSpadeBase extends StaballoySpade{ return 0; } - protected Boolean FACING_HORIZONTAL = true; - protected String FACING = "north"; - protected EntityPlayer localPlayer; - protected String lookingDirection; - protected World localWorld; - protected ItemStack thisPickaxe = null; protected final int colour; protected final String materialName; protected final String displayName; diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java index 81fc2cc05e..301671fc24 100644 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java +++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java @@ -46,7 +46,7 @@ public class StaballoyAxe extends ItemAxe{ super.addInformation(stack, aPlayer, list, bool); } - public boolean canIgnore(Block bit){ + public static boolean canIgnore(Block bit){ if (bit instanceof BlockAir)return true; if (bit instanceof BlockGrass)return true; if (bit instanceof BlockSand)return true; @@ -105,7 +105,7 @@ public class StaballoyAxe extends ItemAxe{ for(int x=19;x>=0;x--){ int r=check(par1World,x,y,z,xo,yo,zo); if (r==2) return 3; - if (r==2) return 2; + //if (r==2) return 2; if (r==1) f=true; } } @@ -154,7 +154,7 @@ public class StaballoyAxe extends ItemAxe{ for(int x=19;x>=0;x--){ int r=check2(par1World,x,y,z,xo,yo,zo); if (r==2) return 3; - if (r==2) return 2; + //if (r==2) return 2; if (r==1) f=true; } } @@ -178,7 +178,7 @@ public class StaballoyAxe extends ItemAxe{ } } - private void breakMushroom(World wld, Block bit, EntityPlayer plr, boolean silk, int x, int y, int z, int met) { + private static void breakMushroom(World wld, Block bit, EntityPlayer plr, boolean silk, int x, int y, int z, int met) { if (silk){ ItemStack stk = null; //TODO /*if (bit==Blocks.brown_mushroom_block) stk = new ItemStack(LoonToolItems.brown_mushroom_block,1,met); -- cgit