diff options
Diffstat (limited to 'patches/server/0432-Ensure-safe-gateway-teleport.patch')
-rw-r--r-- | patches/server/0432-Ensure-safe-gateway-teleport.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/server/0432-Ensure-safe-gateway-teleport.patch b/patches/server/0432-Ensure-safe-gateway-teleport.patch new file mode 100644 index 0000000000..c81dcd4074 --- /dev/null +++ b/patches/server/0432-Ensure-safe-gateway-teleport.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 <[email protected]> +Date: Fri, 15 May 2020 01:10:03 -0400 +Subject: [PATCH] Ensure safe gateway teleport + + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +index 1d8af8475d0aac71a4ed8a2fed9861dd89d8319b..bc028de0ac71e69e8d714db5f65286f306544bf1 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +@@ -104,7 +104,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { + List<Entity> list = world.getEntitiesOfClass(Entity.class, new AABB(pos), TheEndGatewayBlockEntity::canEntityTeleport); + + if (!list.isEmpty()) { +- TheEndGatewayBlockEntity.teleportEntity(world, pos, state, (Entity) list.get(world.random.nextInt(list.size())), blockEntity); ++ // Paper start ++ for (Entity entity : list) { ++ if (entity.canChangeDimensions()) { ++ TheEndGatewayBlockEntity.teleportEntity(world, pos, state, entity, blockEntity); ++ break; ++ } ++ } ++ // Paper end + } + + if (blockEntity.age % 2400L == 0L) { |