mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
19 lines
1.2 KiB
Diff
19 lines
1.2 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/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
|
index 0b238666a506816b8948d1db7397c26ca50b89d3..b2c098a02008b860b2fb17323831ab8af27751ae 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
|
|
@@ -178,6 +178,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
|
|
|
public static void teleportEntity(Level world, BlockPos pos, BlockState state, Entity entity, TheEndGatewayBlockEntity blockEntity) {
|
|
if (world instanceof ServerLevel && !blockEntity.isCoolingDown()) {
|
|
+ if (!entity.canChangeDimensions()) return; // Purpur
|
|
ServerLevel worldserver = (ServerLevel) world;
|
|
|
|
blockEntity.teleportCooldown = 100;
|