Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.buttchili.elements.weapons;
- import java.awt.List;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.ItemSword;
- import net.minecraft.util.StatCollector;
- import com.buttchili.elements.ElementalMod;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- public class ElementalSword extends ItemSword {
- private String unlocalizedName = "elementalSword";
- public ElementalSword(ToolMaterial material) {
- super(material);
- setMaxStackSize(1);
- setCreativeTab(ElementalMod.modTab);
- setUnlocalizedName(unlocalizedName);
- setTextureName(ElementalMod.MODID+":"+unlocalizedName);
- }
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean isAdvanced)
- {
- if ( stack.hasTagCompound() && stack.getTagCompound().hasKey("elemental"))
- {
- tooltip.add(stack.getTagCompound().getString("elemental"));
- }
- else // If the brain does not have valid tag data, a default message
- {
- tooltip.add("No Elements");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement