2021-06-14 07:32:56 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: kickash32 <kickash32@gmail.com>
|
|
|
|
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
|
2022-06-08 07:02:19 +02:00
|
|
|
index befd35b0edf4a76b119f711f8536369a02abc1ba..56d68b87287f0bb2c79ce0bed02fa333b85c4287 100644
|
2021-06-14 07:32:56 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
2022-03-01 06:43:03 +01:00
|
|
|
@@ -105,7 +105,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
2021-06-14 07:32:56 +02:00
|
|
|
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) {
|