mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
21 lines
1.3 KiB
Diff
21 lines
1.3 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
|
|
|
|
Original code by PurpurMC, licensed under MIT
|
|
You can find the original code on https://github.com/PurpurMC/Purpur
|
|
|
|
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 c73024cc62490c336ffe26313580e88d25ca7078..690d498a97b943a62e8ea415450ca44a2349fee0 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;
|