Java Code Examples for net.minecraft.entity.EntityLiving#setFire()
The following examples show how to use
net.minecraft.entity.EntityLiving#setFire() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MoCItemWeapon.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
/** * Current implementations of this method in child classes do not use the * entry argument beside ev. They just raise the damage on the stack. */ @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) { int i = 1; if (breakable) { i = 10; } par1ItemStack.damageItem(i, par3EntityLiving); int potionTime = 100; switch (specialWeaponType) { case 1: //poison par2EntityLiving.addPotionEffect(new PotionEffect(Potion.poison.id, potionTime, 0)); break; case 2: //frost slowdown par2EntityLiving.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, potionTime, 0)); break; case 3: //fire par2EntityLiving.setFire(10); break; case 4: //confusion par2EntityLiving.addPotionEffect(new PotionEffect(Potion.confusion.id, potionTime, 0)); break; case 5: //blindness par2EntityLiving.addPotionEffect(new PotionEffect(Potion.blindness.id, potionTime, 0)); break; default: break; } return true; }