diff options
author | Matthew <stteg@hotmail.com> | 2016-03-16 21:48:53 -0400 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-18 14:30:03 +1100 |
commit | e80114dff4db3ecaf7bbc4b090bce1eee494e864 (patch) | |
tree | ae6760340f0e14adb20eaa0b0449c5bb52a5c348 | |
parent | 205982588ff34bdd4885472d3eba4a26860fca7c (diff) | |
download | craftbukkit-e80114dff4db3ecaf7bbc4b090bce1eee494e864.tar craftbukkit-e80114dff4db3ecaf7bbc4b090bce1eee494e864.tar.gz craftbukkit-e80114dff4db3ecaf7bbc4b090bce1eee494e864.tar.lz craftbukkit-e80114dff4db3ecaf7bbc4b090bce1eee494e864.tar.xz craftbukkit-e80114dff4db3ecaf7bbc4b090bce1eee494e864.zip |
Implement EndGateway#isExactTeleport and EndGateway#setExactTeleport(boolean)
-rw-r--r-- | nms-patches/TileEntityEndGateway.patch | 6 | ||||
-rw-r--r-- | src/main/java/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 df6f0226..750c0f2a 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 0828b36e..4e49b18a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java @@ -44,6 +44,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); |