Paper
Paper copied to clipboard
Raids don't trigger correctly
Expected behavior
If you have Bad Omen, a raid should start as soon as you enter a village.
Observed/Actual behavior
After updating from build 171 to 174, raids won't start until you sleep in a bed at that village.
Steps/models to reproduce
With build 174+ :
- Get Bad Omen
- Go in a village. The raid won't start until you sleep in that village.
Plugin and Datapack List
Plugins (3): AntiEndermanGrief, NoMoreReports, TabTPS
There are 5 data packs enabled: [vanilla (built-in)], [file/bukkit (world)], [file/afk display v1.1.0.zip (world)], [file/player head drops v1.1.0.zip (world)], [file/OnePlayerSleepV2_5.zip (world)] There are no more data packs available
Paper version
1.19.2, build 174 and up.
Other
This started happening after updating from 1.19.2 build 171 to 174. I have tried disabling all datapacks and plugins, and of course restarting the server, updating to the latest build (177) and such. The only fix that I found was downgrading from 174 back to 171. I enabled the datapacks and plugins back and it still works fine on that build.
I haven't tested 172 nor 173, but I assume that this comes from the new Chunk system.
Let me know if you can't reproduce, I'll gladly give out more info about my config.
Replicable. It appears that the internal village distance tracker is not updated correctly, leading to a desync between the actual POIs indicating a village section and the distance tracker.
As the bad omen effect checks against the map to determine a raid start, this fails until the map is properly updated.
My server also has this issue. (Rewrite chunk system)
Potential cause of this issue is a premature PoiChunk.loaded = true
, or specifically a missing PoiChunk.loaded = false
if content was parsed in PoiChunk#parse, which prevents calls to PoiManager#loadInPoiChunk
on PoiChunk#load
later down the line.
diff --git a/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java b/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java
index b1bdd7904..c288bbb47 100644
--- a/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java
+++ b/src/main/java/io/papermc/paper/chunk/system/poi/PoiChunk.java
@@ -206,6 +206,8 @@ public final class PoiChunk {
ret.sections[sectionY - ret.minSection] = deserialized;
}
+ ret.loaded = !readAnything; // we hate branches
+
return ret;
}
}
resolved the issue, however this patch is yet to be analysed to maintain optimisations off the main thread
My server also has this issue. (Rewrite chunk system). There must be some problems in RAID.