SPIGOT-4469: Age API for EndGateway

This commit is contained in:
md_5 2018-11-06 18:12:31 +11:00
parent de547749ec
commit ca22de36ab
2 changed files with 17 additions and 1 deletions

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/server/TileEntityEndGateway.java --- a/net/minecraft/server/TileEntityEndGateway.java
+++ b/net/minecraft/server/TileEntityEndGateway.java +++ b/net/minecraft/server/TileEntityEndGateway.java
@@ -6,6 +6,12 @@ @@ -6,11 +6,17 @@
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -13,6 +13,12 @@
public class TileEntityEndGateway extends TileEntityEnderPortal implements ITickable { 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 @@ @@ -113,6 +119,26 @@
if (this.exitPortal != null) { if (this.exitPortal != null) {
BlockPosition blockposition = this.exactTeleport ? this.exitPortal : this.i(); BlockPosition blockposition = this.exactTeleport ? this.exitPortal : this.i();

View File

@ -45,6 +45,16 @@ public class CraftEndGateway extends CraftBlockEntityState<TileEntityEndGateway>
this.getSnapshot().exactTeleport = exact; this.getSnapshot().exactTeleport = exact;
} }
@Override
public long getAge() {
return this.getSnapshot().e;
}
@Override
public void setAge(long age) {
this.getSnapshot().e = age;
}
@Override @Override
public void applyTo(TileEntityEndGateway endGateway) { public void applyTo(TileEntityEndGateway endGateway) {
super.applyTo(endGateway); super.applyTo(endGateway);