diff options
5 files changed, 24 insertions, 48 deletions
diff --git a/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java index c2ef0dfd2f..04467091c0 100644 --- a/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java +++ b/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java @@ -18,13 +18,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import net.minecraft.world.World; public class FireProtectionBauble extends BaseBauble { - public static HashMap<UUID, Boolean> mDataMap = new HashMap<UUID, Boolean>(); - + public static HashMap<UUID, Boolean> mDataMap = new HashMap<UUID, Boolean>(); public static HashSet<UUID> mPlayerMap = new HashSet<UUID>(); private static Field isImmuneToFire; @@ -39,8 +37,7 @@ public class FireProtectionBauble extends BaseBauble { public static boolean setEntityImmuneToFire(Entity aEntity, boolean aImmune) { return ReflectionUtils.setField(aEntity, isImmuneToFire, aImmune); - } - + } public FireProtectionBauble() { super(BaubleType.RING, "GTPP.bauble.fireprotection.0" + ".name", 0); @@ -76,17 +73,6 @@ public class FireProtectionBauble extends BaseBauble { @SuppressWarnings("unchecked") @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - String aString1 = StatCollector.translateToLocal("GTPP.battpack.tooltip.1"); - String aString2 = StatCollector.translateToLocal("GTPP.battpack.tooltip.2"); - String aString3 = StatCollector.translateToLocal("GTPP.battpack.tooltip.3"); - String aString4 = StatCollector.translateToLocal("GTPP.battpack.tooltip.4"); - - String aEU = StatCollector.translateToLocal("GTPP.info.eu"); - String aEUT = aEU+"/t"; - - list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString4 + EnumChatFormatting.GRAY); super.addInformation(stack, aPlayer, list, bool); } @@ -133,14 +119,14 @@ public class FireProtectionBauble extends BaseBauble { setEntityImmuneToFire(bPlayer, true); } if (!bPlayer.isPotionActive(Potion.fireResistance)) { - bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 4)); + bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 100, 4)); } } } } public String getTextureNameForBauble() { - return "chargepack/"+1; + return "baubles/itemFireProtectGlovesBetter"; } } 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 d772c294b9..a063d334bf 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 @@ -11,12 +11,10 @@ import gregtech.api.util.GT_Utility; import gregtech.common.items.behaviors.Behaviour_None; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.entity.projectile.EntityLightningAttack; -import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.NBTUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; import ic2.api.item.IElectricItemManager; @@ -25,7 +23,6 @@ import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -43,8 +40,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { } - public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { - if (!aPlayer.worldObj.isRemote && aStack.stackSize == 1) { + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if (!aPlayer.worldObj.isRemote && aStack != null && aStack.stackSize == 1) { boolean rOutput = false; if (aEntity instanceof EntityCreeper) { if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { @@ -63,7 +60,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if (!aWorld.isRemote && aStack.stackSize == 1) { + if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { if (aPlayer.isSneaking()) { Logger.INFO("Changing Mode"); boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); @@ -112,7 +109,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if (!aWorld.isRemote && aStack.stackSize == 1) { + if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { if (aPlayer.isSneaking()) { Logger.INFO("Changing Mode"); boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); @@ -190,14 +187,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); - int aUses = 0; - - if (aStack == null) { - return new ArrayList<String>(); - } - - if (aStack != null) { - + int aUses = 0; + if (aStack != null) { if (aStack.getItem() instanceof MetaGeneratedGregtechTools) { if (ChargingHelper.isItemValid(aStack)) { if (aStack.getItem() instanceof IElectricItemManager) { @@ -206,25 +197,22 @@ public class Behaviour_Electric_Lighter extends Behaviour_None { long aEuCost = 4096 * 2; aUses = (int) (aCharge / aEuCost); } + } + boolean aCurrentMode; + if (NBTUtils.hasKey(aStack, "aFireballMode")) { + aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); } + else { + aStack.getTagCompound().setBoolean("aFireballMod", false); + aCurrentMode = false; + } + aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter")); } } aList.add(this.mTooltipUses + " " + aUses); - aList.add(this.mTooltipUnstackable); - - - boolean aCurrentMode; - if (NBTUtils.hasKey(aStack, "aFireballMode")) { - aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod"); - } - else { - aStack.getTagCompound().setBoolean("aFireballMod", false); - aCurrentMode = false; - } - - aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter")); + aList.add(this.mTooltipUnstackable); return aList; } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java index 36e1161e83..395a7c42cb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java @@ -150,7 +150,7 @@ extends GT_Tool { @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been prodded out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been burnt out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); } @Override diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang index 78001238f6..b96735a2f1 100644 --- a/src/resources/assets/miscutils/lang/en_US.lang +++ b/src/resources/assets/miscutils/lang/en_US.lang @@ -2948,4 +2948,6 @@ item.itemHeavyPlateAstralTitanium.name=Heavy Astral Titanium Plate item.itemHeavyPlateCelestialTungsten.name=Heavy Celestial Tungsten Plate item.itemHeavyPlateWhiteMetal.name=Heavy White Metal Plate item.itemHeavyPlateBlackMetal.name=Heavy Black Metal Plate -item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate
\ No newline at end of file +item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate + +item.GTPP.bauble.fireprotection.0.name=Supreme Pizza Gloves
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png b/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png Binary files differnew file mode 100644 index 0000000000..8576ae1b7a --- /dev/null +++ b/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png |