Update to Minecraft 1.12-pre2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-14 12:00:00 +10:00
parent b8446f770b
commit 40c8954e17
210 changed files with 2280 additions and 1974 deletions

View File

@@ -9,23 +9,23 @@
+ entityageable.persistent = true;
+ }
+ // CraftBukkit end
EntityHuman entityhuman = this.animal.getBreedCause();
EntityPlayer entityplayer = this.animal.getBreedCause();
if (entityhuman == null && this.partner.getBreedCause() != null) {
entityhuman = this.partner.getBreedCause();
if (entityplayer == null && this.partner.getBreedCause() != null) {
entityplayer = this.partner.getBreedCause();
}
+ // CraftBukkit start - call EntityBreedEvent
+ int experience = this.animal.getRandom().nextInt(7) + 1;
+ org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, animal, partner, entityhuman, this.animal.breedItem, experience);
+ org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, animal, partner, entityplayer, this.animal.breedItem, experience);
+ if (entityBreedEvent.isCancelled()) {
+ return;
+ }
+ experience = entityBreedEvent.getExperience();
+ // CraftBukkit end
if (entityhuman != null) {
entityhuman.b(StatisticList.C);
@@ -94,7 +107,7 @@
if (entityplayer != null) {
entityplayer.b(StatisticList.C);
@@ -92,7 +105,7 @@
this.partner.resetLove();
entityageable.setAgeRaw(-24000);
entityageable.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F);
@@ -34,7 +34,7 @@
Random random = this.animal.getRandom();
for (int i = 0; i < 7; ++i) {
@@ -109,7 +122,11 @@
@@ -107,7 +120,11 @@
}
if (this.a.getGameRules().getBoolean("doMobLoot")) {