aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0371-Ensure-safe-gateway-teleport.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0371-Ensure-safe-gateway-teleport.patch')
-rw-r--r--patches/server/0371-Ensure-safe-gateway-teleport.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0371-Ensure-safe-gateway-teleport.patch b/patches/server/0371-Ensure-safe-gateway-teleport.patch
new file mode 100644
index 0000000000..c1867dbc2c
--- /dev/null
+++ b/patches/server/0371-Ensure-safe-gateway-teleport.patch
@@ -0,0 +1,20 @@
+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
+
+== AT ==
+public net.minecraft.world.entity.Entity teleportPassengers()V
+
+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 f8053b42fbf144d427cc4ed44b3b735358c58a20..93bd70c1dc2ba8b893a6087730071c81fb1132f4 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
+@@ -214,6 +214,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
+
+ entity1.setPortalCooldown();
+ ((ServerPlayer) entity1).connection.teleport(teleEvent.getTo());
++ entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport.
+ TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); // CraftBukkit - call at end of method
+ return;
+