Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 10:00:00 +10:00
parent d1e91a8adb
commit 7e0a66fdd5
608 changed files with 17788 additions and 9378 deletions

View File

@@ -3,21 +3,21 @@
@@ -80,6 +80,11 @@
private void i() {
EntityVillager entityvillager = this.b.b((EntityAgeable) this.c);
EntityVillager entityvillager = this.a.b((EntityAgeable) this.b);
+ // CraftBukkit start - call EntityBreedEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityvillager, this.b, this.c, null, null, 0).isCancelled()) {
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityvillager, this.a, this.b, null, null, 0).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
this.c.setAgeRaw(6000);
this.b.setAgeRaw(6000);
this.a.setAgeRaw(6000);
@@ -87,7 +92,7 @@
this.b.s(false);
this.a.v(false);
entityvillager.setAgeRaw(-24000);
entityvillager.setPositionRotation(this.b.locX, this.b.locY, this.b.locZ, 0.0F, 0.0F);
- this.d.addEntity(entityvillager);
+ this.d.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
this.d.broadcastEntityEffect(entityvillager, (byte) 12);
entityvillager.setPositionRotation(this.a.locX, this.a.locY, this.a.locZ, 0.0F, 0.0F);
- this.c.addEntity(entityvillager);
+ this.c.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
this.c.broadcastEntityEffect(entityvillager, (byte) 12);
}
}