diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-03-13 08:15:33 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-03-13 08:15:33 -0500 |
| commit | afb474545246da88084a43cae31259c33e63a8d1 (patch) | |
| tree | df0e220a3568546b7c64bf56e00c8d6af24fed64 /src/main/java/gmail/Lance5057/items/RoyalGuard.java | |
| parent | 495fc1d710df9f5b98fec0d0f61f105811742d89 (diff) | |
Updated to TiCo 1.8.3 and fixed the rendering issues that followed.
Also refactored some codes.
Diffstat (limited to 'src/main/java/gmail/Lance5057/items/RoyalGuard.java')
| -rw-r--r-- | src/main/java/gmail/Lance5057/items/RoyalGuard.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/gmail/Lance5057/items/RoyalGuard.java b/src/main/java/gmail/Lance5057/items/RoyalGuard.java new file mode 100644 index 0000000..04bce58 --- /dev/null +++ b/src/main/java/gmail/Lance5057/items/RoyalGuard.java @@ -0,0 +1,42 @@ +package gmail.Lance5057.items; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import tconstruct.library.client.TConstructClientRegistry; +import tconstruct.library.crafting.ToolBuilder; +import tconstruct.library.tools.Weapon; + +import java.util.List; + +public abstract class RoyalGuard extends Weapon { + public RoyalGuard() { + super(10); + } + +@Override +public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { +super.addInformation(stack, player, list, par4); +list.add(EnumChatFormatting.DARK_PURPLE + "Artisan crafted for the royal family"); +} +@Override +public void getSubItems(Item id, CreativeTabs tab, List list) +{ + super.getSubItems(id, tab, list); + + ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 2), new ItemStack(getHandleItem(), 1, 6), new ItemStack(getAccessoryItem(), 1, 33), "Royal Guard"); + NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + tags.setInteger("Modifiers", 0); + tags.setInteger("Attack", 15); + tags.setInteger("TotalDurability", Integer.MAX_VALUE / 100); + tags.setInteger("BaseDurability", Integer.MAX_VALUE / 100); + tags.setInteger("MiningSpeed", Integer.MAX_VALUE / 100); + tags.setInteger("Unbreaking", 10); + tags.setBoolean("Built", true); + tags.setInteger("Fortune", 450); + list.add(tool); +} +}
\ No newline at end of file |
