mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 08:41:27 +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
@ -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…
Reference in New Issue
Block a user