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/base | |
| 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/base')
4 files changed, 7 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java index b9345f6f57..17af462a0f 100644 --- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java +++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java @@ -14,13 +14,11 @@ public class BaseItemCell extends BaseItemComponent{ private IIcon base; private IIcon overlay; - private final Material cellMaterial; ComponentTypes Cell = ComponentTypes.CELL; public BaseItemCell(Material material) { super(material, BaseItemComponent.ComponentTypes.CELL); - this.cellMaterial = material; - fluidColour = (short[]) ((cellMaterial == null) ? extraData : cellMaterial.getRGBA()); + fluidColour = (short[]) ((material == null) ? extraData : material.getRGBA()); } @Override @@ -36,8 +34,6 @@ public class BaseItemCell extends BaseItemComponent{ //this.overlay = cellMaterial.getFluid(1000).getFluid().get } - private int fluidBright = 0; - private int tickValue; private short[] fluidColour; boolean upwards = true; diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java index 696f497afc..42a610641e 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -28,14 +28,13 @@ public class BaseItemDust extends Item{ String name = ""; private int mTier; private Material dustInfo; - private String oredictName; public BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, int tier, int sRadioactivity) { setUnlocalizedName(unlocalizedName); this.setUnlocalizedName(unlocalizedName); this.setMaxStackSize(64); this.setTextureName(getCorrectTexture(pileSize)); - + this.setCreativeTab(tabMisc); this.colour = colour; this.mTier = tier; @@ -66,7 +65,6 @@ public class BaseItemDust extends Item{ Utils.LOG_WARNING("Generating OreDict Name: "+temp); } if (temp != null && !temp.equals("")){ - oredictName = temp; GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); } addFurnaceRecipe(); @@ -111,6 +109,7 @@ public class BaseItemDust extends Item{ EntityUtils.applyRadiationDamageToEntity(sRadiation, world, entityHolding); } + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { //if (pileType != null && materialName != null && pileType != "" && materialName != "" && !pileType.equals("") && !materialName.equals("")){ @@ -222,8 +221,8 @@ public class BaseItemDust extends Item{ Utils.LOG_WARNING("Adding recipe for Hot "+materialName+" Ingots in a Blast furnace."); String tempIngot = temp.replace("ingot", "ingotHot"); ItemStack tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempIngot, 1); - Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName() + " Debug: "+tempIngot); if (null != tempOutputStack){ + Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName() + " Debug: "+tempIngot); addBlastFurnaceRecipe(ItemUtils.getSimpleStack(this), null, tempOutputStack, null, 350*mTier); } return; diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java index a49dc58188..3eab83f812 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java @@ -18,7 +18,7 @@ public abstract class BaseItemDustAbstract extends Item{ public BaseItemDustAbstract(String unlocalizedName, String materialName, int colour, String pileSize) { this.setUnlocalizedName(unlocalizedName); this.setMaxStackSize(64); - if (pileSize == "dust" || pileSize == "Dust"){ + if (pileSize.toLowerCase().equals("dust")){ this.setTextureName(CORE.MODID + ":" + "dust"); } else{ @@ -31,6 +31,7 @@ public abstract class BaseItemDustAbstract extends Item{ GameRegistry.registerItem(this, unlocalizedName); } + @SuppressWarnings("rawtypes") @Override public abstract void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool); diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java index c90499c1ca..a4e8c1cadc 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java @@ -59,7 +59,7 @@ public class BaseItemDustUnique extends Item{ temp = temp.replace("itemD", "d"); Utils.LOG_WARNING("Generating OreDict Name: "+temp); } - if (temp != null && temp != ""){ + if (temp != null && !temp.equals("")){ GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); } } |
