From f63e3dd135c020c9c735649ed22f58fefee46782 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 1 Jul 2020 05:42:22 -0400 Subject: [PATCH] Allow teleporting through end gateways as a passenger/vehicle Vanilla allows this now for same world teleports Fixes #3735 --- Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch index 39235c4524..af8fb316e3 100644 --- a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch +++ b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch @@ -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 -index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f34cc268f5 100644 +index ea61a473d8e47428ed5cd4541a5855f0e2c50815..ce239d2b2fe942915aa093b86343c3740d10e273 100644 --- a/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 @@ -17,7 +17,7 @@ index ea61a473d8e47428ed5cd4541a5855f0e2c50815..aebb6b6b2b869231310567b030fe32f3 - this.a((Entity) list.get(this.world.random.nextInt(list.size()))); + // Paper start + for (Entity entity : list) { -+ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { ++ if (entity.canPortal()) { + this.a(entity); + break; + }