mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
Check portal restrictions when entering end gateways
This commit is contained in:
parent
0219f4acd4
commit
0de6c6f86a
1 changed files with 29 additions and 0 deletions
29
Spigot-Server-Patches/Ensure-safe-gateway-teleport.patch
Normal file
29
Spigot-Server-Patches/Ensure-safe-gateway-teleport.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
@@ -0,0 +0,0 @@ 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()) {
|
||||
- this.a(((Entity) list.get(0)).getRootVehicle());
|
||||
- }
|
||||
+ // Paper start
|
||||
+ for (Entity entity : list) {
|
||||
+ if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) {
|
||||
+ this.a(entity);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
if (this.age % 2400L == 0L) {
|
||||
this.h();
|
Loading…
Add table
Reference in a new issue