Allow teleporting through end gateways as a passenger/vehicle

Vanilla allows this now for same world teleports

Fixes #3735
This commit is contained in:
Aikar 2020-07-01 05:42:22 -04:00
parent b7d9e3d5dc
commit f63e3dd135
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Ensure safe gateway teleport
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f34cc268f5 100644 index ea61a473d8e47428ed5cd4541a5855f0e2c50815..ce239d2b2fe942915aa093b86343c3740d10e273 100644
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
@@ -62,10 +62,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick @@ -62,10 +62,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
@ -17,7 +17,7 @@ index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f3
- this.a((Entity) list.get(this.world.random.nextInt(list.size()))); - this.a((Entity) list.get(this.world.random.nextInt(list.size())));
+ // Paper start + // Paper start
+ for (Entity entity : list) { + for (Entity entity : list) {
+ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { + if (entity.canPortal()) {
+ this.a(entity); + this.a(entity);
+ break; + break;
+ } + }