I am currently working on an item that will poison an entity on hit and I'm not sure why everything I have tried has not worked. I am using this code at the moment, but it does not work:
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) {
par2EntityLiving.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 1));
return true;
Thanks for Any Help or Suggestions
Can you tell me some code I need to do, right now im really confused, is there any tutorials for this and if not can you step by step tell me the code a bit, btw Love the CameraCraft mod, see your a developer of it
Ehhhh.....
What about this?
public void keyPressed(KeyEvent arg0, World par2World, EntityPlayer par3EntityPlayer) {
if (arg0.getKeyChar() == 'p') {
if (teleport == 1){
System.out.println("Test");
par2World.spawnEntityInWorld(new EntityEnderPearl(par2World, par3EntityPlayer));
First of all, i want to test for a full set of armor. Second of all, if (player.getCurrentArmor(0) == ZealCraft.quickBoots) {, this whole line had a error when i change your item to mine.