From d8a9c7be4227b2243968b63ab7cc7a00098c93ad Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 26 Feb 2015 22:41:06 +0000 Subject: Update to Minecraft 1.8.3 --- nms-patches/EntityWither.patch | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'nms-patches/EntityWither.patch') diff --git a/nms-patches/EntityWither.patch b/nms-patches/EntityWither.patch index 0b916226..36b72db3 100644 --- a/nms-patches/EntityWither.patch +++ b/nms-patches/EntityWither.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityWither.java 2014-11-28 17:43:43.177707433 +0000 -+++ src/main/java/net/minecraft/server/EntityWither.java 2014-11-28 17:38:21.000000000 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityWither.java 2015-02-26 22:40:22.727608138 +0000 ++++ src/main/java/net/minecraft/server/EntityWither.java 2015-02-26 22:40:22.727608138 +0000 @@ -5,6 +5,12 @@ import java.util.Iterator; import java.util.List; @@ -12,10 +12,10 @@ + public class EntityWither extends EntityMonster implements IRangedEntity { - private float[] b = new float[2]; -@@ -160,13 +166,38 @@ - if (this.cj() > 0) { - i = this.cj() - 1; + private float[] a = new float[2]; +@@ -168,13 +174,38 @@ + if (this.cl() > 0) { + i = this.cl() - 1; if (i <= 0) { - this.world.createExplosion(this, this.locX, this.locY + (double) this.getHeadHeight(), this.locZ, 7.0F, false, this.world.getGameRules().getBoolean("mobGriefing")); - this.world.a(1013, new BlockPosition(this), 0); @@ -28,11 +28,11 @@ + this.world.createExplosion(this, this.locX, this.locY + (double) this.getHeadHeight(), this.locZ, event.getRadius(), event.getFire(), this.world.getGameRules().getBoolean("mobGriefing")); + } + // CraftBukkit end -+ ++ + // CraftBukkit start - Use relative location for far away sounds + // this.world.a(1013, new BlockPosition(this), 0); + int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; -+ for (EntityPlayer player : (List) this.world.players) { ++ for (EntityPlayer player : (List) (List) this.world.players) { + double deltaX = this.locX - player.locX; + double deltaZ = this.locZ - player.locZ; + double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; @@ -55,19 +55,19 @@ } } else { -@@ -251,6 +282,11 @@ - Block block = this.world.getType(new BlockPosition(j2, k2, l2)).getBlock(); +@@ -264,6 +295,11 @@ + Block block = this.world.getType(blockposition).getBlock(); - if (block.getMaterial() != Material.AIR && block != Blocks.BEDROCK && block != Blocks.END_PORTAL && block != Blocks.END_PORTAL_FRAME && block != Blocks.COMMAND_BLOCK && block != Blocks.BARRIER) { + if (block.getMaterial() != Material.AIR && a(block)) { + // CraftBukkit start + if (CraftEventFactory.callEntityChangeBlockEvent(this, j2, k2, l2, Blocks.AIR, 0).isCancelled()) { + continue; + } + // CraftBukkit end - flag = this.world.setAir(new BlockPosition(j2, k2, l2), true) || flag; + flag = this.world.setAir(blockposition, true) || flag; } } -@@ -264,7 +300,7 @@ +@@ -277,7 +313,7 @@ } if (this.ticksLived % 20 == 0) { -- cgit v1.2.3