Implement EndGateway#isExactTeleport and EndGateway#setExactTeleport(boolean)

This commit is contained in:
Matthew 2016-03-16 21:48:53 -04:00 committed by md_5
parent 205982588f
commit e80114dff4
2 changed files with 14 additions and 2 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
@@ -5,13 +5,17 @@ @@ -5,14 +5,18 @@
import java.util.Random; import java.util.Random;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -15,10 +15,12 @@
private long f = 0L; private long f = 0L;
private int g = 0; private int g = 0;
- private BlockPosition h; - private BlockPosition h;
- private boolean i;
+ public BlockPosition h; // PAIL private to public + public BlockPosition h; // PAIL private to public
private boolean i; + public boolean i; // PAIL private to public
public TileEntityEndGateway() {} public TileEntityEndGateway() {}
@@ -103,6 +107,26 @@ @@ -103,6 +107,26 @@
if (this.h != null) { if (this.h != null) {
BlockPosition blockposition = this.i ? this.h : this.j(); BlockPosition blockposition = this.i ? this.h : this.j();

View File

@ -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 @Override
public boolean update(boolean force, boolean applyPhysics) { public boolean update(boolean force, boolean applyPhysics) {
boolean result = super.update(force, applyPhysics); boolean result = super.update(force, applyPhysics);