mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Allow teleporting through end gateways as a passenger/vehicle
Vanilla allows this now for same world teleports Fixes #3735
This commit is contained in:
parent
b7d9e3d5dc
commit
f63e3dd135
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue