9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0099-Configurable-MC-67.patch
2025-08-16 22:08:16 +08:00

19 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lumine1909 <133463833+lumine1909@users.noreply.github.com>
Date: Wed, 26 Jun 2024 18:15:57 +0800
Subject: [PATCH] Configurable MC-67
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 5d13f47936069ce1577ef0eb2627d5ef6492dcd6..05ca8e944645d8184576b3eb577d2a981e0b10f9 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -4194,6 +4194,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) return false; // Leaves - allowEntityPortalWithPassenger
if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
for (Entity entity : this.getPassengers()) {