Advertisement
Guest User

Untitled

a guest
Jul 19th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. package com.buttchili.elements.weapons;
  2.  
  3. import java.awt.List;
  4.  
  5. import net.minecraft.entity.player.EntityPlayer;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.item.ItemSword;
  8. import net.minecraft.util.StatCollector;
  9.  
  10. import com.buttchili.elements.ElementalMod;
  11.  
  12. import cpw.mods.fml.relauncher.Side;
  13. import cpw.mods.fml.relauncher.SideOnly;
  14.  
  15.  
  16.  
  17. public class ElementalSword extends ItemSword {
  18. private String unlocalizedName = "elementalSword";
  19.  
  20. public ElementalSword(ToolMaterial material) {
  21. super(material);
  22. setMaxStackSize(1);
  23. setCreativeTab(ElementalMod.modTab);
  24. setUnlocalizedName(unlocalizedName);
  25. setTextureName(ElementalMod.MODID+":"+unlocalizedName);
  26. }
  27.  
  28. @SideOnly(Side.CLIENT)
  29. public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean isAdvanced)
  30. {
  31. if ( stack.hasTagCompound() && stack.getTagCompound().hasKey("elemental"))
  32. {
  33.  
  34. tooltip.add(stack.getTagCompound().getString("elemental"));
  35.  
  36. }
  37. else // If the brain does not have valid tag data, a default message
  38. {
  39. tooltip.add("No Elements");
  40. }
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement