mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-18 22:03:51 -07:00
Update to Minecraft 1.16.2
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 18);
|
||||
}
|
||||
@@ -186,11 +202,24 @@
|
||||
EntityAgeable entityageable = this.createChild(entityanimal);
|
||||
EntityAgeable entityageable = this.createChild(worldserver, entityanimal);
|
||||
|
||||
if (entityageable != null) {
|
||||
+ // CraftBukkit start - set persistence for tame animals
|
||||
@@ -81,16 +81,16 @@
|
||||
entityplayer.a(StatisticList.ANIMALS_BRED);
|
||||
@@ -203,10 +232,14 @@
|
||||
entityanimal.resetLove();
|
||||
entityageable.a(true);
|
||||
entityageable.setBaby(true);
|
||||
entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F);
|
||||
- world.addEntity(entityageable);
|
||||
+ world.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
||||
world.broadcastEntityEffect(this, (byte) 18);
|
||||
if (world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
||||
- world.addEntity(new EntityExperienceOrb(world, this.locX(), this.locY(), this.locZ(), this.getRandom().nextInt(7) + 1));
|
||||
- worldserver.addAllEntities(entityageable);
|
||||
+ worldserver.addAllEntities(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
||||
worldserver.broadcastEntityEffect(this, (byte) 18);
|
||||
if (worldserver.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
||||
- worldserver.addEntity(new EntityExperienceOrb(worldserver, this.locX(), this.locY(), this.locZ(), this.getRandom().nextInt(7) + 1));
|
||||
+ // CraftBukkit start - use event experience
|
||||
+ if (experience > 0) {
|
||||
+ world.addEntity(new EntityExperienceOrb(world, this.locX(), this.locY(), this.locZ(), experience));
|
||||
+ worldserver.addEntity(new EntityExperienceOrb(worldserver, this.locX(), this.locY(), this.locZ(), experience));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
Reference in New Issue
Block a user