diff options
author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
---|---|---|
committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
commit | 55f64675b42ac8d3c557cc850f78664bee006f6f (patch) | |
tree | 2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/xmod/gregtech/common/tools | |
parent | 0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff) | |
download | GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2 GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/tools')
6 files changed, 153 insertions, 162 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java index e8b72c7ea9..8065eee736 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java @@ -1,16 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.behaviors.Behaviour_None; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; import java.util.Arrays; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -23,14 +15,24 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_None; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; + public class TOOL_Gregtech_AngleGrinder extends GT_Tool { - public static final List<String> mEffectiveList = - Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + public static final List<String> mEffectiveList = Arrays + .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" }); @Override - public float getNormalDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf(".") + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -122,38 +124,21 @@ public class TOOL_Gregtech_AngleGrinder extends GT_Tool { } @Override - public int convertBlockDrops( - final List<ItemStack> aDrops, - final ItemStack aStack, - final EntityPlayer aPlayer, - final Block aBlock, - final int aX, - final int aY, - final int aZ, - final byte aMetaData, - final int aFortune, - final boolean aSilkTouch, - final BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, + final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, + final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; - /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); - if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { - for (final ItemStack tDrop : aDrops) { - tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); - if (tRecipe != null) { - final ItemStack tHammeringOutput = tRecipe.getOutput(0); - if (tHammeringOutput != null) { - rConversions += tDrop.stackSize; - tDrop.stackSize *= tHammeringOutput.stackSize; - tHammeringOutput.stackSize = tDrop.stackSize; - GT_Utility.setStack(tDrop, tHammeringOutput); - } - } - } - } else { - aDrops.clear(); - aDrops.add(tRecipe.getOutput(0)); - rConversions++; - }*/ + /* + * GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new + * ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); if ((tRecipe == null) || + * (aBlock.hasTileEntity(aMetaData))) { for (final ItemStack tDrop : aDrops) { tRecipe = + * GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new + * ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); if (tRecipe != null) { final ItemStack + * tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { rConversions += tDrop.stackSize; + * tDrop.stackSize *= tHammeringOutput.stackSize; tHammeringOutput.stackSize = tDrop.stackSize; + * GT_Utility.setStack(tDrop, tHammeringOutput); } } } } else { aDrops.clear(); + * aDrops.add(tRecipe.getOutput(0)); rConversions++; } + */ return rConversions; } @@ -177,15 +162,18 @@ public class TOOL_Gregtech_AngleGrinder extends GT_Tool { try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } + } catch (final Exception e) {} } @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE - + " has been Ground out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been Ground out of existence by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java index db93f8fdd1..5939203637 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java @@ -1,10 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.api.GregTech_API; -import gregtech.api.damagesources.GT_DamageSources; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -17,9 +14,15 @@ import net.minecraft.util.EntityDamageSource; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.api.GregTech_API; +import gregtech.api.damagesources.GT_DamageSources; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; + public abstract class TOOL_Gregtech_Base implements Interface_ToolStats { - public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; - public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; + + public static final Enchantment[] FORTUNE_ENCHANTMENT = { Enchantment.fortune }; + public static final Enchantment[] LOOTING_ENCHANTMENT = { Enchantment.looting }; public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0]; public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; @@ -127,8 +130,7 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats { return GT_DamageSources.getCombatDamage( (aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, - (aEntity instanceof EntityLivingBase) - ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) + (aEntity instanceof EntityLivingBase) ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); } @@ -138,18 +140,9 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats { } @Override - public int convertBlockDrops( - final List<ItemStack> aDrops, - final ItemStack aStack, - final EntityPlayer aPlayer, - final Block aBlock, - final int aX, - final int aY, - final int aZ, - final byte aMetaData, - final int aFortune, - final boolean aSilkTouch, - final BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, + final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, + final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { return 0; } @@ -179,14 +172,14 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats { public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) {} @Override - public float getNormalDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { return aOriginalDamage; } @Override - public float getMagicDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { return aOriginalDamage; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java index efdf8b18e9..bdd501ee99 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java @@ -1,16 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; import java.util.Arrays; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; @@ -25,14 +17,24 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraftforge.event.world.BlockEvent; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; + public class TOOL_Gregtech_Choocher extends GT_Tool { - public static final List<String> mEffectiveList = - Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + public static final List<String> mEffectiveList = Arrays + .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" }); @Override - public float getNormalDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf(".") + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -120,12 +122,9 @@ public class TOOL_Gregtech_Choocher extends GT_Tool { @Override public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { final String tTool = aBlock.getHarvestTool(aMetaData); - return ((tTool != null) - && ((tTool.equals("sword")) - || (tTool.equals("wrench")) - || (tTool.equals("hammer")) - || (tTool.equals("pickaxe")))) - || (aBlock.getMaterial() == Material.rock) + return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) + || (tTool.equals("hammer")) + || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) @@ -155,26 +154,20 @@ public class TOOL_Gregtech_Choocher extends GT_Tool { } @Override - public int convertBlockDrops( - final List<ItemStack> aDrops, - final ItemStack aStack, - final EntityPlayer aPlayer, - final Block aBlock, - final int aX, - final int aY, - final int aZ, - final byte aMetaData, - final int aFortune, - final boolean aSilkTouch, - final BlockEvent.HarvestDropsEvent aEvent) { + public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, + final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, + final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( - null, true, 2147483647L, null, new ItemStack[] {new ItemStack(aBlock, 1, aMetaData)}); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes + .findRecipe(null, true, 2147483647L, null, new ItemStack[] { new ItemStack(aBlock, 1, aMetaData) }); if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { for (final ItemStack tDrop : aDrops) { tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe( - null, true, 2147483647L, null, new ItemStack[] {GT_Utility.copyAmount(1L, new Object[] {tDrop}) - }); + null, + true, + 2147483647L, + null, + new ItemStack[] { GT_Utility.copyAmount(1L, new Object[] { tDrop }) }); if (tRecipe != null) { final ItemStack tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { @@ -216,15 +209,18 @@ public class TOOL_Gregtech_Choocher extends GT_Tool { try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } + } catch (final Exception e) {} } @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE - + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been Choochered by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java index 06e429514e..1580119238 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java @@ -1,16 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.behaviors.Behaviour_None; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; import java.util.Arrays; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -23,14 +15,24 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_None; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; + public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool { - public static final List<String> mEffectiveList = - Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + public static final List<String> mEffectiveList = Arrays + .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" }); @Override - public float getNormalDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf(".") + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -136,15 +138,18 @@ public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool { try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } + } catch (final Exception e) {} } @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE - + " has been Sliced out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been Sliced out of existence by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override @@ -179,6 +184,6 @@ public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool { @Override public int[] getEnchantmentLevels(ItemStack aStack) { - return new int[] {(4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; + return new int[] { (4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2 }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java index b1f4385a11..f14af8b988 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java @@ -1,16 +1,8 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter; import java.util.Arrays; import java.util.List; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -22,14 +14,24 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter; + public class TOOL_Gregtech_ElectricLighter extends GT_Tool { - public static final List<String> mEffectiveList = - Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + public static final List<String> mEffectiveList = Arrays + .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" }); @Override - public float getNormalDamageAgainstEntity( - final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, + final EntityPlayer aPlayer) { String tName = aEntity.getClass().getName(); tName = tName.substring(tName.lastIndexOf(".") + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; @@ -139,15 +141,18 @@ public class TOOL_Gregtech_ElectricLighter extends GT_Tool { try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } + } catch (final Exception e) {} } @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE - + " has been burnt 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/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java index ae477cd7bb..9586896fc9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java @@ -1,12 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.tools; -import gregtech.GT_Mod; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.tools.GT_Tool_WireCutter; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -15,6 +8,14 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import gregtech.GT_Mod; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.tools.GT_Tool_WireCutter; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; + public class TOOL_Gregtech_ElectricSnips extends GT_Tool_WireCutter { @Override @@ -77,14 +78,17 @@ public class TOOL_Gregtech_ElectricSnips extends GT_Tool_WireCutter { try { GT_Mod.achievements.issueAchievement(aPlayer, "tools"); GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } + } catch (final Exception e) {} } @Override public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE - + " has been Snipped out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + return new ChatComponentText( + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been Snipped out of existence by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } |