3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +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.
Dieser Commit ist enthalten in:
EvilSeph 2012-11-20 09:27:47 -05:00
Ursprung 5f5dd727b6
Commit c36b3da573

Datei anzeigen

@ -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
}
}
}