From ca22de36ab1164f67e5b36c994c62eb0411db056 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 6 Nov 2018 18:12:31 +1100 Subject: [PATCH] SPIGOT-4469: Age API for EndGateway --- nms-patches/TileEntityEndGateway.patch | 8 +++++++- .../org/bukkit/craftbukkit/block/CraftEndGateway.java | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/nms-patches/TileEntityEndGateway.patch b/nms-patches/TileEntityEndGateway.patch index 585f0f16e9..5487c6ed37 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 -@@ -6,6 +6,12 @@ +@@ -6,11 +6,17 @@ import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -13,6 +13,12 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITickable { + private static final Logger a = LogManager.getLogger(); +- private long e; ++ public long e; // PAIL + private int f; + public BlockPosition exitPortal; + public boolean exactTeleport; @@ -113,6 +119,26 @@ if (this.exitPortal != null) { BlockPosition blockposition = this.exactTeleport ? this.exitPortal : this.i(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java index 8ca614bd6e..5fbc336b7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java @@ -45,6 +45,16 @@ public class CraftEndGateway extends CraftBlockEntityState this.getSnapshot().exactTeleport = exact; } + @Override + public long getAge() { + return this.getSnapshot().e; + } + + @Override + public void setAge(long age) { + this.getSnapshot().e = age; + } + @Override public void applyTo(TileEntityEndGateway endGateway) { super.applyTo(endGateway);