Fix infinite 'breeding' with MonsterEggs. Fixes BUKKIT-2997
If the player is not in Creative (i.e. does not have the ability to instantly build) we need to decrement the MonsterEgg item stack when used on a breedable parent mob.
Dieser Commit ist enthalten in:
Ursprung
5f5dd727b6
Commit
c36b3da573
@ -22,6 +22,12 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||
entityageable.setAge(-24000);
|
||||
entityageable.setPositionRotation(this.locX, this.locY, this.locZ, 0.0F, 0.0F);
|
||||
this.world.addEntity(entityageable);
|
||||
|
||||
// CraftBukkit start
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.count--;
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren