Update to Minecraft 1.14.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-14 10:00:00 +10:00
parent 1825747f6d
commit 788fd7eedc
60 changed files with 322 additions and 587 deletions

View File

@@ -33,7 +33,7 @@
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
+ this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
this.world.getMethodProfiler().exit();
if (!this.dX() && this.bE > 0) {
if (!this.dY() && this.bE > 0) {
--this.bE;
@@ -136,7 +146,7 @@
this.bF = false;
@@ -44,23 +44,23 @@
}
}
@@ -247,7 +257,14 @@
@@ -258,7 +268,14 @@
while (iterator.hasNext()) {
MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
- merchantrecipe.increaseUses(-MathHelper.d((float) i * merchantrecipe.m()));
- merchantrecipe.increaseSpecialPrice(-MathHelper.d((float) i * merchantrecipe.getPriceMultiplier()));
+ // CraftBukkit start
+ int bonus = -MathHelper.d((float) i * merchantrecipe.m());
+ int bonus = -MathHelper.d((float) i * merchantrecipe.getPriceMultiplier());
+ VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((Villager) this.getBukkitEntity(), merchantrecipe.asBukkit(), bonus);
+ Bukkit.getPluginManager().callEvent(event);
+ if (!event.isCancelled()) {
+ merchantrecipe.increaseUses(event.getBonus());
+ merchantrecipe.increaseSpecialPrice(event.getBonus());
+ }
+ // CraftBukkit end
}
}
@@ -553,7 +570,12 @@
@@ -558,7 +575,12 @@
entitywitch.setCustomNameVisible(this.getCustomNameVisible());
}
@@ -74,7 +74,7 @@
this.die();
}
@@ -725,7 +747,7 @@
@@ -730,7 +752,7 @@
if (entityirongolem != null) {
if (entityirongolem.a((GeneratorAccess) this.world, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.a((IWorldReader) this.world)) {
@@ -83,12 +83,12 @@
return entityirongolem;
}
@@ -775,7 +797,7 @@
EntityVillager.a entityvillager_a = (EntityVillager.a) this.getBehaviorController().c(MemoryModuleType.GOLEM_SPAWN_CONDITIONS).orElseGet(EntityVillager.a::new);
@@ -780,7 +802,7 @@
EntityVillager.a entityvillager_a = (EntityVillager.a) this.getBehaviorController().getMemory(MemoryModuleType.GOLEM_SPAWN_CONDITIONS).orElseGet(EntityVillager.a::new);
entityvillager_a.b(this.world.getTime());
- this.br.a(MemoryModuleType.GOLEM_SPAWN_CONDITIONS, (Object) entityvillager_a);
+ this.br.a(MemoryModuleType.GOLEM_SPAWN_CONDITIONS, entityvillager_a); // CraftBukkit - decompile error
- this.br.setMemory(MemoryModuleType.GOLEM_SPAWN_CONDITIONS, (Object) entityvillager_a);
+ this.br.setMemory(MemoryModuleType.GOLEM_SPAWN_CONDITIONS, entityvillager_a); // CraftBukkit - decompile error
}
public static final class a {