Beispiel #1
0
        public virtual void useCurrentItemOnEntity(Entity entity)
        {
            if (entity.interact(this))
            {
                return;
            }
            ItemStack itemstack = getCurrentEquippedItem();

            if (itemstack != null && (entity is EntityLiving))
            {
                itemstack.useItemOnEntity((EntityLiving)entity);
                if (itemstack.stackSize <= 0)
                {
                    itemstack.func_577_a(this);
                    destroyCurrentEquippedItem();
                }
            }
        }
Beispiel #2
0
 public virtual void useCurrentItemOnEntity(Entity entity)
 {
     if (entity.interact(this))
     {
         return;
     }
     ItemStack itemstack = getCurrentEquippedItem();
     if (itemstack != null && (entity is EntityLiving))
     {
         itemstack.useItemOnEntity((EntityLiving) entity);
         if (itemstack.stackSize <= 0)
         {
             itemstack.func_577_a(this);
             destroyCurrentEquippedItem();
         }
     }
 }