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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
2020-08-07 04:49:50 +02:00
|
|
|
index 50bb2ca7235781cd80ecde2bb378f37d67514658..89537dec8ed278e79e078cb2fd3d3e839cdbab59 100644
|
2020-05-16 10:31:26 +02:00
|
|
|
--- 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
|
|
|
|
--this.c;
|
|
|
|
} else if (!this.world.isClientSide) {
|
|
|
|
List<Entity> list = this.world.a(Entity.class, new AxisAlignedBB(this.getPosition()));
|
|
|
|
-
|
|
|
|
- if (!list.isEmpty()) {
|
2020-06-26 03:58:00 +02:00
|
|
|
- this.a((Entity) list.get(this.world.random.nextInt(list.size())));
|
|
|
|
+ // Paper start
|
|
|
|
+ for (Entity entity : list) {
|
2020-07-01 11:42:22 +02:00
|
|
|
+ if (entity.canPortal()) {
|
2020-06-26 03:58:00 +02:00
|
|
|
+ this.a(entity);
|
|
|
|
+ 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();
|