Fix incorrect ticket lock size computing
Yeah this would fully solve the issue of chunk unloading race condition The same fix was already initially added at "Force clamp grid-exponent to 1~6"
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NanaChiyo0721 <nanachiyo0721@163.com>
|
||||
Date: Fri, 7 Aug 2026 15:05:38 +0800
|
||||
Subject: [PATCH] Lithium skip unnecessary secondary poi sensing
|
||||
|
||||
This is a part of lithium(https://github.com/CaffeineMC/lithium/blob/c42972b6e9d21c8ff45559df6b271802050a22e2/common/src/main/java/net/caffeinemc/mods/lithium/mixin/ai/sensor/secondary_poi/SecondaryPoiSensorMixin.java#L13)
|
||||
|
||||
Original license: https://github.com/CaffeineMC/lithium/blob/c42972b6e9d21c8ff45559df6b271802050a22e2/LICENSE.md
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
index 7d3e843c2d3c5e15b7bea7302d6118419d3a4957..4c7326b3d6504038f7b359e37156f82b55ec7ccc 100644
|
||||
--- a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
@@ -22,6 +22,12 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
|
||||
|
||||
@Override
|
||||
protected void doTick(final ServerLevel level, final Villager body) {
|
||||
+ // Shiroha start - lithium skip unnecessary secondary poi sensing
|
||||
+ if (body.getVillagerData().profession().value().secondaryPoi().isEmpty()) {
|
||||
+ body.getBrain().eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Shiroha end - lithium skip unnecessary secondary poi sensing
|
||||
ResourceKey<Level> dimensionType = level.dimension();
|
||||
BlockPos center = body.blockPosition();
|
||||
List<GlobalPos> jobSites = Lists.newArrayList();
|
||||
Reference in New Issue
Block a user