mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
41 lines
2.4 KiB
Diff
41 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Thu, 15 May 2025 12:17:30 +0800
|
|
Subject: [PATCH] Vanilla portal handle
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index d768b1de1bc75ab73198379b1099cc09f58d1ca4..0ec5603097a984713bc3ae7a03a7535e552cf851 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -807,6 +807,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
|
|
// CraftBukkit start
|
|
public void postTick() {
|
|
+ if (org.leavesmc.leaves.LeavesConfig.fix.vanillaPortalHandle) return; // Leaves - vanilla
|
|
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
|
if (!(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities
|
|
this.handlePortal();
|
|
@@ -827,7 +828,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
this.boardingCooldown--;
|
|
}
|
|
|
|
- if (this instanceof ServerPlayer) this.handlePortal(); // CraftBukkit - Moved up to postTick
|
|
+ if (org.leavesmc.leaves.LeavesConfig.fix.vanillaPortalHandle || this instanceof ServerPlayer) this.handlePortal(); // CraftBukkit - Moved up to postTick // Leaves - vanilla
|
|
if (this.canSpawnSprintParticle()) {
|
|
this.spawnSprintParticle();
|
|
}
|
|
diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
|
index 99617c08cbd989092ba357d8df928786fd04c89a..619f87b4ce69629b230229f33487fc653f6a39a7 100644
|
|
--- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
|
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
|
@@ -294,7 +294,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
|
}
|
|
|
|
this.checkBelowWorld();
|
|
- // this.handlePortal(); // CraftBukkit - handled in postTick
|
|
+ if (org.leavesmc.leaves.LeavesConfig.fix.vanillaPortalHandle) this.handlePortal(); // CraftBukkit - handled in postTick // Leaves - vanilla
|
|
this.behavior.tick();
|
|
// CraftBukkit start
|
|
org.bukkit.World bworld = this.level().getWorld();
|