Updated Upstream(Folia)
This commit is contained in:
@@ -2,7 +2,7 @@ group = me.earthme.luminol
|
||||
version=1.21.5-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.5
|
||||
|
||||
foliaRef=da0d7cd1beb8eb7b84a5210dcefa6ffb4cce7415
|
||||
foliaRef=6c77040ff6ad3401687b1fc49f9d0e8e2e09de87
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
@@ -5,19 +5,6 @@ Subject: [PATCH] Fix mispatched entity custom spawning logic
|
||||
|
||||
we should use local players as each tickregion will only foreach their own player entities so that we won't come across async accessing world data
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
index f5d27988605d48cdf314f28ba332f33f0a314266..39b506dad0601b2d75acb14989f2758132155d1b 100644
|
||||
--- a/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
+++ b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
@@ -27,7 +27,7 @@ public class CatSpawner implements CustomSpawner {
|
||||
worldData.catSpawnerNextTick--; // Folia - region threading
|
||||
if (worldData.catSpawnerNextTick <= 0) { // Folia - region threading
|
||||
worldData.catSpawnerNextTick = 1200; // Folia - region threading
|
||||
- Player randomPlayer = level.getRandomPlayer();
|
||||
+ Player randomPlayer = level.getRandomLocalPlayer(); // Luminol - Fix mispatched entity custom spawning logic - Use local players for only the players in current tickregion
|
||||
if (randomPlayer != null) {
|
||||
RandomSource randomSource = level.random;
|
||||
int i = (8 + randomSource.nextInt(24)) * (randomSource.nextBoolean() ? -1 : 1);
|
||||
diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index a7f56126a26e1fca86c39d8d656b648f5d6bb4ca..4626ee9f4410d8fd683db17b49ef79ab67eeda5f 100644
|
||||
--- a/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
|
||||
Reference in New Issue
Block a user