diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 11:11:40 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 11:11:40 +1000 |
commit | f2f00bdaf83738740f004b46126ffe48e0b1cbc9 (patch) | |
tree | c791b3480b026dc690107d0d56b4e7aa89897a5f /src/Java/gtPlusPlus | |
parent | 68319c278dddd993540b0aabdec5177e20e9bd51 (diff) | |
download | GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.tar.gz GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.tar.bz2 GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.zip |
$ Fixed Powder Barrel not being set correctly in .08.
$ Fixed issue with string comparisons.
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r-- | src/Java/gtPlusPlus/core/recipe/common/CI.java | 5 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/Utils.java | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java index ca334fe0d3..dffb438e4a 100644 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java @@ -484,10 +484,13 @@ public class CI { public static void init() { //Set Explosives try { - ItemList PowerderBarrel = gtPlusPlus.core.util.Utils.getValueOfItemList("Block_Powderbarrel", null); + ItemList PowerderBarrel = Utils.getValueOfItemList("Block_Powderbarrel", null); if (PowerderBarrel != null){ explosivePowderKeg = PowerderBarrel.get(1).copy(); } + else { + explosivePowderKeg = ItemUtils.getSimpleStack(Items.gunpowder).copy(); + } } catch (java.lang.IllegalArgumentException Y) { explosivePowderKeg = ItemUtils.getSimpleStack(Items.gunpowder).copy(); } diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 919d2f13f3..bb1d9064e8 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -932,13 +932,15 @@ public class Utils { ItemList[] aListValues = ItemList.class.getEnumConstants(); for (ItemList aItem : aListValues) { if (aItem != null) { - if (aItem.name().toLowerCase().equals(string)) { + if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { return aItem; } } } Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); - Logger.INFO("Using fallback option instead - "+aOther.name()); + if (aOther != null) { + Logger.INFO("Using fallback option instead - "+aOther.name()); + } return aOther; } |