From c25ddf063a808e3adb749e22017661f403c5fb7e Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 17 Nov 2016 12:41:03 +1100 Subject: Update to Minecraft 1.11 --- nms-patches/PathfinderGoalHorseTrap.patch | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'nms-patches/PathfinderGoalHorseTrap.patch') diff --git a/nms-patches/PathfinderGoalHorseTrap.patch b/nms-patches/PathfinderGoalHorseTrap.patch index c20e929d..84842053 100644 --- a/nms-patches/PathfinderGoalHorseTrap.patch +++ b/nms-patches/PathfinderGoalHorseTrap.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/PathfinderGoalHorseTrap.java +++ b/net/minecraft/server/PathfinderGoalHorseTrap.java -@@ -22,13 +22,14 @@ +@@ -21,13 +21,14 @@ this.a.world.strikeLightning(new EntityLightning(this.a.world, this.a.locX, this.a.locY, this.a.locZ, true)); EntitySkeleton entityskeleton = this.a(difficultydamagescaler, this.a); @@ -8,28 +8,28 @@ + if (entityskeleton != null) entityskeleton.startRiding(this.a); // CraftBukkit for (int i = 0; i < 3; ++i) { - EntityHorse entityhorse = this.a(difficultydamagescaler); -+ if (entityhorse == null) continue; // CraftBukkit - EntitySkeleton entityskeleton1 = this.a(difficultydamagescaler, entityhorse); + EntityHorseAbstract entityhorseabstract = this.a(difficultydamagescaler); ++ if (entityhorseabstract == null) continue; // CraftBukkit + EntitySkeleton entityskeleton1 = this.a(difficultydamagescaler, entityhorseabstract); -- entityskeleton1.startRiding(entityhorse); -+ if (entityskeleton1 != null) entityskeleton1.startRiding(entityhorse); // CraftBukkit - entityhorse.g(this.a.getRandom().nextGaussian() * 0.5D, 0.0D, this.a.getRandom().nextGaussian() * 0.5D); +- entityskeleton1.startRiding(entityhorseabstract); ++ if (entityskeleton1 != null) entityskeleton1.startRiding(entityhorseabstract); // CraftBukkit + entityhorseabstract.f(this.a.getRandom().nextGaussian() * 0.5D, 0.0D, this.a.getRandom().nextGaussian() * 0.5D); } -@@ -44,7 +45,7 @@ - entityhorse.setType(EnumHorseType.SKELETON); - entityhorse.setTame(true); - entityhorse.setAgeRaw(0); -- entityhorse.world.addEntity(entityhorse); -+ if (!entityhorse.world.addEntity(entityhorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRAP)) return null; // CraftBukkit - return entityhorse; +@@ -42,7 +43,7 @@ + entityhorseskeleton.cS(); + entityhorseskeleton.setTamed(true); + entityhorseskeleton.setAgeRaw(0); +- entityhorseskeleton.world.addEntity(entityhorseskeleton); ++ if (!entityhorseskeleton.world.addEntity(entityhorseskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRAP)) return null; // CraftBukkit + return entityhorseskeleton; } -@@ -61,7 +62,7 @@ +@@ -59,7 +60,7 @@ - EnchantmentManager.a(entityskeleton.getRandom(), entityskeleton.getItemInMainHand(), (int) (5.0F + difficultydamagescaler.d() * (float) entityskeleton.getRandom().nextInt(18)), false); - EnchantmentManager.a(entityskeleton.getRandom(), entityskeleton.getEquipment(EnumItemSlot.HEAD), (int) (5.0F + difficultydamagescaler.d() * (float) entityskeleton.getRandom().nextInt(18)), false); + entityskeleton.setSlot(EnumItemSlot.MAINHAND, EnchantmentManager.a(entityskeleton.getRandom(), entityskeleton.getItemInMainHand(), (int) (5.0F + difficultydamagescaler.d() * (float) entityskeleton.getRandom().nextInt(18)), false)); + entityskeleton.setSlot(EnumItemSlot.HEAD, EnchantmentManager.a(entityskeleton.getRandom(), entityskeleton.getEquipment(EnumItemSlot.HEAD), (int) (5.0F + difficultydamagescaler.d() * (float) entityskeleton.getRandom().nextInt(18)), false)); - entityskeleton.world.addEntity(entityskeleton); + if (!entityskeleton.world.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY)) return null; // CraftBukkit return entityskeleton; -- cgit v1.2.3