9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0100-Disable-end-gateway-portal-entity-ticking.patch
2025-08-16 22:08:16 +08:00

28 lines
2.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Mon, 1 Jul 2024 22:09:33 +0800
Subject: [PATCH] Disable end gateway portal entity ticking
diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java
index f22d502df5f444703a248fff50c864d2924c4549..356f074106d416c7e5b2524490a51cc83931c114 100644
--- a/net/minecraft/world/level/block/EndGatewayBlock.java
+++ b/net/minecraft/world/level/block/EndGatewayBlock.java
@@ -123,11 +123,14 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
if (portalPosition == null) {
return null;
} else {
+ // Leaves start - Disable end gateway portal entity ticking
+ TeleportTransition.PostTeleportTransition postTeleportTransition = org.leavesmc.leaves.LeavesConfig.modify.oldMC.disableGatewayPortalEntityTicking ? TeleportTransition.DO_NOTHING : TeleportTransition.PLACE_PORTAL_TICKET;
return entity instanceof ThrownEnderpearl
- ? new TeleportTransition(level, portalPosition, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_GATEWAY) // CraftBukkit
+ ? new TeleportTransition(level, portalPosition, Vec3.ZERO, 0.0F, 0.0F, Set.of(), postTeleportTransition, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_GATEWAY) // CraftBukkit
: new TeleportTransition(
- level, portalPosition, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_GATEWAY // CraftBukkit
+ level, portalPosition, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postTeleportTransition, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_GATEWAY // CraftBukkit
);
+ // Leaves end - Disable end gateway portal entity ticking
}
} else {
return null;