-
-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We cannot yield the job site if it is outside of the current region. Fixes #316
- Loading branch information
1 parent
b54ba0d
commit 35b9863
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
.../minecraft-patches/sources/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- a/net/minecraft/world/entity/ai/behavior/YieldJobSite.java | ||
+++ b/net/minecraft/world/entity/ai/behavior/YieldJobSite.java | ||
@@ -33,7 +_,13 @@ | ||
} else if (villager.getVillagerData().getProfession() != VillagerProfession.NONE) { | ||
return false; | ||
} else { | ||
- BlockPos blockPos = instance.<GlobalPos>get(potentialJobSite).pos(); | ||
+ // Folia start - region threading | ||
+ GlobalPos globalPos = instance.get(potentialJobSite); | ||
+ BlockPos blockPos = globalPos.pos(); | ||
+ if (globalPos.dimension() != level.dimension() || !ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(level, blockPos)) { | ||
+ return true; | ||
+ } | ||
+ // Folia end - region threading | ||
Optional<Holder<PoiType>> type = level.getPoiManager().getType(blockPos); | ||
if (type.isEmpty()) { | ||
return true; |