From e80114dff4db3ecaf7bbc4b090bce1eee494e864 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 16 Mar 2016 21:48:53 -0400 Subject: [PATCH] Implement EndGateway#isExactTeleport and EndGateway#setExactTeleport(boolean) --- nms-patches/TileEntityEndGateway.patch | 6 ++++-- .../org/bukkit/craftbukkit/block/CraftEndGateway.java | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nms-patches/TileEntityEndGateway.patch b/nms-patches/TileEntityEndGateway.patch index df6f022651..750c0f2a41 100644 --- a/nms-patches/TileEntityEndGateway.patch +++ b/nms-patches/TileEntityEndGateway.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/TileEntityEndGateway.java +++ b/net/minecraft/server/TileEntityEndGateway.java -@@ -5,13 +5,17 @@ +@@ -5,14 +5,18 @@ import java.util.Random; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -15,10 +15,12 @@ private long f = 0L; private int g = 0; - private BlockPosition h; +- private boolean i; + public BlockPosition h; // PAIL private to public - private boolean i; ++ 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(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java index 0828b36e00..4e49b18a4e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java @@ -43,6 +43,16 @@ public class CraftEndGateway extends CraftBlockState implements EndGateway { } } + @Override + public boolean isExactTeleport() { + return gateway.i; // PAIL: Rename exactTeleport + } + + @Override + public void setExactTeleport(boolean exact) { + gateway.i = exact; + } + @Override public boolean update(boolean force, boolean applyPhysics) { boolean result = super.update(force, applyPhysics);