mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
23 lines
2.0 KiB
Diff
23 lines
2.0 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/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
index 50d726874af316a264fa0c2589f5b04559dffb50..fd9c27cf12cca630b192f9cdf876b024157b6073 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java
|
|
@@ -130,7 +130,10 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
|
}
|
|
// Leaves end - force void trade
|
|
|
|
- return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit
|
|
+ // 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 vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), postTeleportTransition, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postTeleportTransition, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit
|
|
+ // Leaves end - Disable end gateway portal entity ticking
|
|
} else {
|
|
return null;
|
|
}
|