diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-17 15:58:26 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-17 15:58:26 +0000 |
commit | f354f6c08a364f8d987f4f820b35aa16fe4f3be6 (patch) | |
tree | 971a2796ab2b14db10977149eaffab0cb5aadead /src/Java/gtPlusPlus/xmod/gregtech/common/items | |
parent | 3f35b4b0183ea16d623cdcf74447a11f4734ce45 (diff) | |
download | GT5-Unofficial-f354f6c08a364f8d987f4f820b35aa16fe4f3be6.tar.gz GT5-Unofficial-f354f6c08a364f8d987f4f820b35aa16fe4f3be6.tar.bz2 GT5-Unofficial-f354f6c08a364f8d987f4f820b35aa16fe4f3be6.zip |
+ Added a new Catalyst (Platinum + Rhodium).
+ Added simple functions to CI for obtaining catalysts.
% Improved Catalyst handling across the board.
$ Fixed Pyromatic 'mode' handling.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/items')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java index a063d334bf..422a29c34e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java @@ -1,6 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.items.behaviours; -import java.util.ArrayList; import java.util.List; import codechicken.lib.math.MathHelper; @@ -63,7 +62,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { if (aPlayer.isSneaking()) { Logger.INFO("Changing Mode"); - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); boolean aNewMode = Utils.invertBoolean(aCurrentMode); Logger.INFO("Is now set to Fireball mode? "+aNewMode); @@ -72,7 +71,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); } else { - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); if (aCurrentMode) { //Shoot Lightning Attack aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); @@ -112,16 +111,16 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { if (aPlayer.isSneaking()) { Logger.INFO("Changing Mode"); - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); boolean aNewMode = Utils.invertBoolean(aCurrentMode); Logger.INFO("Is now set to Fireball mode? "+aNewMode); - aStack.getTagCompound().setBoolean("aFireballMod", aNewMode); + aStack.getTagCompound().setBoolean("aFireballMode", aNewMode); //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode); PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); } else { - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); if (aCurrentMode) { //Shoot Lightning Attack aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); @@ -199,11 +198,14 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { } } boolean aCurrentMode; + if (!NBTUtils.hasTagCompound(aStack)) { + NBTUtils.createEmptyTagCompound(aStack); + } if (NBTUtils.hasKey(aStack, "aFireballMode")) { - aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); + aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); } else { - aStack.getTagCompound().setBoolean("aFireballMod", false); + aStack.getTagCompound().setBoolean("aFireballMode", false); aCurrentMode = false; } aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter")); |