From 8d3d640b9e4f52a81f11255c89f201db80e7a9d4 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Wed, 11 Jan 2017 16:32:07 +1000 Subject: + Added Tree farm Fluid/solid Fertilisers. + Added a handler for creating non-molten fluids. + Added the basis for a config switch to enable or disable the tree farmer. $ Improved Tree Farm cutting and cleanup code. $ Fixed a bug in ItemUtils, stemming from ancient code which pointed at an array index which never exists. (Now I compare array length.) - Removed some useless code from Material.java. --- src/Java/gtPlusPlus/core/util/item/ItemUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util/item') diff --git a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java index 2df848cae5..2595f88fec 100644 --- a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java @@ -177,8 +177,12 @@ public class ItemUtils { return temp; } String[] fqrnSplit = fqrn.split(":"); - if(fqrnSplit[2] == null){fqrnSplit[2] = "0";} - temp = ItemUtils.getItemStackWithMeta(LoadedMods.MiscUtils, fqrn, fqrnSplit[1], Integer.parseInt(fqrnSplit[2]), stackSize); + String temp1; + String temp2; + temp1 = fqrnSplit[1]; + if (fqrnSplit.length < 3){temp2 = "0";} + else {temp2 = fqrnSplit[2];} + temp = ItemUtils.getItemStackWithMeta(LoadedMods.MiscUtils, fqrn, temp1, Integer.parseInt(temp2), stackSize); return temp; } -- cgit