public void attackTargetEntityWithCurrentItem(Entity entity) { int i = inventory.getDamageVsEntity(entity); if (i > 0) { entity.attackEntityFrom(this, i); ItemStack itemstack = getCurrentEquippedItem(); if (itemstack != null && (entity is EntityLiving)) { itemstack.hitEntity((EntityLiving)entity); if (itemstack.stackSize <= 0) { itemstack.func_577_a(this); destroyCurrentEquippedItem(); } } } }
public void attackTargetEntityWithCurrentItem(Entity entity) { int i = inventory.getDamageVsEntity(entity); if (i > 0) { entity.attackEntityFrom(this, i); ItemStack itemstack = getCurrentEquippedItem(); if (itemstack != null && (entity is EntityLiving)) { itemstack.hitEntity((EntityLiving) entity); if (itemstack.stackSize <= 0) { itemstack.func_577_a(this); destroyCurrentEquippedItem(); } } } }
public override void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity) { entity.attackEntityFrom(null, 1); }
public override void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity) { entity.attackEntityFrom(null, 1); }