mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-18 11:22:15 +01:00
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.
This commit is contained in:
parent
5f5dd727b6
commit
c36b3da573
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue