Guest User

GlowingSword.java

a guest
Sep 28th, 2014
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. package com.heating.mod.items;
  2.  
  3. import net.minecraft.client.renderer.texture.IIconRegister;
  4. import net.minecraft.entity.EntityLiving;
  5. import net.minecraft.item.ItemStack;
  6. import net.minecraft.item.ItemSword;
  7.  
  8. import com.heating.mod.Heating;
  9.  
  10. import cpw.mods.fml.relauncher.Side;
  11. import cpw.mods.fml.relauncher.SideOnly;
  12.  
  13. public class GlowingSword extends ItemSword{
  14.  
  15. public GlowingSword(ToolMaterial p_i45356_1_) {
  16. super(p_i45356_1_);
  17. this.setCreativeTab(Heating.heatingTab);
  18. }
  19.  
  20. @SideOnly(Side.CLIENT)
  21. public void registerIcons(IIconRegister iconRegister) {
  22. this.itemIcon = iconRegister.registerIcon(Heating.modid + ":" + this.getUnlocalizedName().substring(5));
  23. }
  24.  
  25. public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
  26.  
  27. {
  28.  
  29. par1ItemStack.damageItem(1, par3EntityLiving);
  30.  
  31. par2EntityLiving.setFire(10);
  32.  
  33. return true;
  34.  
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment