mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Clean up Glass Arrows a bit #1296
This commit is contained in:
1 parent
3bea7e5a07
commit
58db702878
4 files changed
+17
-8
No files matched your search
@@ -56,6 +56,7 @@ public class FryingPan extends Weapon
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 2), new ItemStack(getHandleItem(), 1, 16), null, "Bane of Pigs");
|
||||
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setBoolean("Special", true);
|
||||
tags.setInteger("Modifiers", 0);
|
||||
tags.setInteger("Attack", Integer.MAX_VALUE / 100);
|
||||
tags.setInteger("TotalDurability", Integer.MAX_VALUE / 100);
|
||||
|
||||
@@ -158,6 +158,7 @@ public class Hammer extends AOEHarvestTool
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 10), new ItemStack(getHandleItem(), 1, 8), new ItemStack(getAccessoryItem(), 1, 11), new ItemStack(getExtraItem(), 1, 11), "InfiMiner");
|
||||
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setBoolean("Special", true);
|
||||
tags.setInteger("Modifiers", 0);
|
||||
tags.setInteger("Attack", Integer.MAX_VALUE / 100);
|
||||
tags.setInteger("TotalDurability", Integer.MAX_VALUE / 100);
|
||||
|
||||
@@ -2,10 +2,14 @@ package tconstruct.weaponry.items;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.crafting.ToolBuilder;
|
||||
import tconstruct.util.Reference;
|
||||
@@ -25,20 +29,13 @@ public class GlassArrows extends ArrowAmmo {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(stack, player, list, par4);
|
||||
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Crafted by a legendary Glassmaker");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item id, CreativeTabs tab, List list) {
|
||||
ItemStack headStack = new ItemStack(getHeadItem(), 1, 0);
|
||||
ItemStack handleStack = new ItemStack(getHandleItem(), 1, 0); // wooden shaft
|
||||
ItemStack accessoryStack = new ItemStack(getAccessoryItem(), 1, 0); // feather fletchling
|
||||
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, null, "");
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, null, this.getLocalizedToolName());
|
||||
if (tool != null)
|
||||
{
|
||||
tool.getTagCompound().getCompoundTag("InfiTool").setBoolean("Built", true);
|
||||
@@ -48,6 +45,7 @@ public class GlassArrows extends ArrowAmmo {
|
||||
|
||||
// now turn it into legendary glass arrows!
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
tags.setBoolean("Special", true);
|
||||
tags.setInteger("TotalDurability", 100); // 100 arrows
|
||||
tags.setInteger("Ammo", 100); // full ammo
|
||||
tags.setFloat("Mass", 5.0f); // durp
|
||||
@@ -56,6 +54,7 @@ public class GlassArrows extends ArrowAmmo {
|
||||
tags.setFloat("Shoddy", 0); // no stonebound/jagged
|
||||
tags.setInteger("Unbreaking", 0); // no reinforced
|
||||
tags.setInteger("Attack", 10); // insane damage!
|
||||
tags.setInteger("Modifiers", 0);
|
||||
|
||||
// now make them look like glass
|
||||
tags.setInteger("RenderHead", -1);
|
||||
@@ -65,6 +64,11 @@ public class GlassArrows extends ArrowAmmo {
|
||||
tags.setInteger("HandleColor", 0xbcfff3);
|
||||
tags.setInteger("AccessoryColor", 0xccfff3);
|
||||
|
||||
NBTTagList lore = new NBTTagList();
|
||||
lore.appendTag(new NBTTagString(StatCollector.translateToLocal("tool.glassarrows.lore")));
|
||||
|
||||
tool.getTagCompound().getCompoundTag("display").setTag("Lore", lore);
|
||||
|
||||
list.add(tool);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user