Yatopia/patches/Purpur/patches/server/0050-End-gateway-should-che...

19 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Mar 2020 18:33:05 -0500
Subject: [PATCH] End gateway should check if entity can use portal
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
index 855c49164277ca96ca08fb204d851a5ad6789990..d918194e45953764fa3fd286b715714330a60941 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
@@ -153,6 +153,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
public void b(Entity entity) {
if (this.world instanceof WorldServer && !this.f()) {
+ if (!entity.canPortal()) return; // Purpur
this.c = 100;
if (this.exitPortal == null && this.world.getTypeKey() == DimensionManager.THE_END) { // CraftBukkit - work in alternate worlds
this.a((WorldServer) this.world);