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/item/general | |
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/item/general')
3 files changed, 5 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java index 3c8e09e9e5..0458a38110 100644 --- a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ b/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -177,7 +177,8 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ if (output != null){ setBlueprintName(stack, output.getDisplayName()); - return (hasBP = true); + hasBP = true; + return true; } return false; } catch (Throwable t){ diff --git a/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java b/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java index 146af86302..3f51db7047 100644 --- a/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java +++ b/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java @@ -8,7 +8,6 @@ import ic2.api.item.*; import java.util.List; -import cofh.energy.ItemEnergyContainer; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -19,6 +18,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import cofh.energy.ItemEnergyContainer; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -125,7 +125,7 @@ public class RF2EU_Battery extends ItemEnergyContainer implements IElectricItem, { int i = 30; - float f13 = (float)(Minecraft.getSystemTime() % 6000L) / 3000.0F * 3.141592F * 2.0F; + float f13 = ((float)(Minecraft.getSystemTime() % 6000L) / 3000.0F * CORE.PI * 2.0F); float t = 0.9F + 0.1F * MathHelper.cos(f13); diff --git a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java b/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java index 36e6c66df8..2a94456c2a 100644 --- a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java +++ b/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java @@ -147,7 +147,7 @@ public class FuelRod_Base extends Item{ int r = maximumFuel - i; return r; } - return getFuelRemaining(stack); + return 0; } public boolean setFuelRemainingExplicitly(int i){ |