From 470d9f9e1d3cd1234d19607f1b68e4a918657533 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Mon, 2 Apr 2012 14:06:33 -0500 Subject: [PATCH] Tell clients to update if EntityPortalCreateEvent is canceled. Fixes BUKKIT-1426 --- .../java/net/minecraft/server/EntityEnderDragon.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index 6f74bc5652..198c108fde 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -617,6 +617,16 @@ public class EntityEnderDragon extends EntityComplex { for (BlockState state : event.getBlocks()) { state.update(true); } + } else { + for (BlockState state : event.getBlocks()) { + Packet53BlockChange packet = new Packet53BlockChange(state.getX(), state.getY(), state.getZ(), this.world); + for (Iterator it = this.world.players.iterator(); it.hasNext();) { + EntityHuman entity = (EntityHuman) it.next(); + if (entity instanceof EntityPlayer) { + ((EntityPlayer) entity).netServerHandler.sendPacket(packet); + } + } + } } // CraftBukkit end