Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ItemPoisonSword extends ItemSword {
- public ItemDumbSword(ToolMaterial materialIn) {
- super(materialIn);
- setRegistryName("item_poison_sword");
- this.setUnlocalizedName("poison_sword");
- setCreativeTab(CreativeTabs.COMBAT);
- }
- public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
- {
- stack.damageItem(1, attacker); //The first number is how much damage you do, probably more than 1.
- attacker.sendMessage(new TextComponentString("hitEntity Method Called"));
- target.addPotionEffect(new PotionEffect(Potion.getPotionById(10), 100, 3)); //The 10 is the ID of poison, the 100 is duration and 3 is how much it's amplified by.
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement