mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
1ab021ddca
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
CraftBukkit Changes:
927200a9
#718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
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
|
|
index 8eb1520d603aa59650418ee12cb1031168271fea..5d158e72378c02032fe6043696b9e3dd82e71e5c 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
@@ -63,9 +63,14 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
|
} else if (!this.world.isClientSide) {
|
|
List<Entity> list = this.world.a(Entity.class, new AxisAlignedBB(this.getPosition()), TileEntityEndGateway::a);
|
|
|
|
- if (!list.isEmpty()) {
|
|
- this.b((Entity) list.get(this.world.random.nextInt(list.size())));
|
|
+ // Paper start
|
|
+ for (Entity entity : list) {
|
|
+ if (entity.canPortal()) {
|
|
+ this.b(entity);
|
|
+ break;
|
|
+ }
|
|
}
|
|
+ // Paper end
|
|
|
|
if (this.age % 2400L == 0L) {
|
|
this.h();
|