Push forward
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Wed, 8 Jul 2026 21:13:39 +0800
|
||||
Subject: [PATCH] Fix off region leashing
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Leashable.java b/net/minecraft/world/entity/Leashable.java
|
||||
index 98034a4c96bf2972316078d3b3a49140921aab50..ba4ee88ada40997759f4650b8d4aa9ecce0fab1d 100644
|
||||
--- a/net/minecraft/world/entity/Leashable.java
|
||||
+++ b/net/minecraft/world/entity/Leashable.java
|
||||
@@ -95,10 +95,24 @@ public interface Leashable {
|
||||
if (leashUuid.isPresent()) {
|
||||
Entity leasher = serverLevel.getEntity(leashUuid.get());
|
||||
if (leasher != null) {
|
||||
+ // Shiroha start - Fix off region leashing
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(leasher)) {
|
||||
+ entity.spawnAtLocation(serverLevel, Items.LEAD);
|
||||
+ entity.setLeashData(null);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Shiroha end
|
||||
setLeashedTo(entity, leasher, true);
|
||||
return;
|
||||
}
|
||||
} else if (pos.isPresent()) {
|
||||
+ // Shiroha start - Fix off region leashing
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(serverLevel, pos.get())) {
|
||||
+ entity.spawnAtLocation(serverLevel, Items.LEAD);
|
||||
+ entity.setLeashData(null);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Shiroha end
|
||||
setLeashedTo(entity, LeashFenceKnotEntity.getOrCreateKnot(serverLevel, pos.get()), true);
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user