2020-05-16 10:31:26 +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
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
2021-03-16 16:50:45 +01:00
|
|
|
index b7548d0b3938d95328fc86db4000190532eaa8f5..855c49164277ca96ca08fb204d851a5ad6789990 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
2021-03-16 16:50:45 +01:00
|
|
|
@@ -89,9 +89,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
2020-05-16 10:31:26 +02:00
|
|
|
} else if (!this.world.isClientSide) {
|
2020-08-25 04:22:08 +02:00
|
|
|
List<Entity> list = this.world.a(Entity.class, new AxisAlignedBB(this.getPosition()), TileEntityEndGateway::a);
|
|
|
|
|
2020-05-16 10:31:26 +02:00
|
|
|
- if (!list.isEmpty()) {
|
2020-08-25 04:22:08 +02:00
|
|
|
- this.b((Entity) list.get(this.world.random.nextInt(list.size())));
|
2020-06-26 03:58:00 +02:00
|
|
|
+ // Paper start
|
|
|
|
+ for (Entity entity : list) {
|
2020-07-01 11:42:22 +02:00
|
|
|
+ if (entity.canPortal()) {
|
2020-08-25 04:22:08 +02:00
|
|
|
+ this.b(entity);
|
2020-06-26 03:58:00 +02:00
|
|
|
+ break;
|
2020-05-16 10:31:26 +02:00
|
|
|
+ }
|
2020-06-26 03:58:00 +02:00
|
|
|
}
|
|
|
|
+ // Paper end
|
2020-05-16 10:31:26 +02:00
|
|
|
|
|
|
|
if (this.age % 2400L == 0L) {
|
|
|
|
this.h();
|