Updated version to 1.2.5-R0.1-SNAPSHOT

This commit is contained in:
Dinnerbone (Laptop)
2012-03-30 23:33:51 +02:00
parent e0c01154b0
commit 1fa4d8430e
15 changed files with 100 additions and 166 deletions

View File

@@ -180,7 +180,10 @@ public class EntityWolf extends EntityTameableAnimal {
if (!this.isTamed()) {
if (itemstack != null && itemstack.id == Item.BONE.id && !this.isAngry()) {
--itemstack.count;
if (!entityhuman.abilities.canInstantlyBuild) {
--itemstack.count;
}
if (itemstack.count <= 0) {
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
}
@@ -209,8 +212,11 @@ public class EntityWolf extends EntityTameableAnimal {
ItemFood itemfood = (ItemFood) Item.byId[itemstack.id];
if (itemfood.q() && this.datawatcher.getInt(18) < 20) {
--itemstack.count;
this.heal(itemfood.getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
if (!entityhuman.abilities.canInstantlyBuild) {
--itemstack.count;
}
this.heal(itemfood.getNutrition());
if (itemstack.count <= 0) {
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
}