summaryrefslogtreecommitdiffstats
path: root/nms-patches/PathfinderGoalHorseTrap.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
committermd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
commitc25ddf063a808e3adb749e22017661f403c5fb7e (patch)
treeb2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/PathfinderGoalHorseTrap.patch
parent51263e97187a84338f89698eef187284055a682a (diff)
downloadcraftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/PathfinderGoalHorseTrap.patch')
-rw-r--r--nms-patches/PathfinderGoalHorseTrap.patch34
1 files changed, 17 insertions, 17 deletions
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;