diff options
Diffstat (limited to 'nms-patches/TileEntityEndGateway.patch')
-rw-r--r-- | nms-patches/TileEntityEndGateway.patch | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/nms-patches/TileEntityEndGateway.patch b/nms-patches/TileEntityEndGateway.patch index 750c0f2a..cb6f07d7 100644 --- a/nms-patches/TileEntityEndGateway.patch +++ b/nms-patches/TileEntityEndGateway.patch @@ -1,29 +1,21 @@ --- a/net/minecraft/server/TileEntityEndGateway.java +++ b/net/minecraft/server/TileEntityEndGateway.java -@@ -5,14 +5,18 @@ - import java.util.Random; +@@ -6,6 +6,12 @@ + import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; ++// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.craftbukkit.entity.CraftPlayer; +import org.bukkit.event.player.PlayerTeleportEvent; ++// CraftBukkit end public class TileEntityEndGateway extends TileEntity implements ITickable { - private static final Logger a = LogManager.getLogger(); - private long f = 0L; - private int g = 0; -- private BlockPosition h; -- private boolean i; -+ public BlockPosition h; // PAIL private to public -+ public boolean i; // PAIL private to public - - public TileEntityEndGateway() {} - -@@ -103,6 +107,26 @@ - if (this.h != null) { - BlockPosition blockposition = this.i ? this.h : this.j(); +@@ -107,6 +113,26 @@ + if (this.exitPortal != null) { + BlockPosition blockposition = this.exactTeleport ? this.exitPortal : this.k(); + // CraftBukkit start - Fire PlayerTeleportEvent + if (entity instanceof EntityPlayer) { @@ -39,7 +31,7 @@ + } + + ((EntityPlayer) entity).playerConnection.teleport(teleEvent.getTo()); -+ this.h(); ++ this.i(); + return; + + } |