Fire Orb sets entity on fire when attacked
This commit is contained in:
parent
70b72eef8b
commit
7ad2a37a08
1 changed files with 18 additions and 2 deletions
|
|
@ -3,12 +3,17 @@ package MysticWorld.Items;
|
|||
import MysticWorld.MysticWorld;
|
||||
import MysticWorld.Entity.EntityChargeAir;
|
||||
import net.minecraft.block.BlockCloth;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFlintAndSteel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemOrbFire extends ItemFlintAndSteel {
|
||||
|
|
@ -23,11 +28,22 @@ public class ItemOrbFire extends ItemFlintAndSteel {
|
|||
|
||||
public boolean itemInteractionForEntity(ItemStack itemStack, EntityLiving entityLiving)
|
||||
{
|
||||
entityLiving.setFire(5);
|
||||
entityLiving.setFire(5);
|
||||
entityLiving.attackEntityFrom(DamageSource.magic, 7);
|
||||
|
||||
itemStack.damageItem(1, entityLiving);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer entityPlayer, Entity entity)
|
||||
{
|
||||
entity.setFire(5);
|
||||
entity.attackEntityFrom(DamageSource.magic, 7);
|
||||
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue