mirror of
https://github.com/PaperMC/Folia.git
synced 2025-01-09 19:47:41 +01:00
Update new bee position before adding to beehive
This will ensure the thread check from discard does not fail
This commit is contained in:
parent
760de0a276
commit
9e835221b9
@ -22270,6 +22270,18 @@ index d33476ffa49d7f6388bb227f8a57cf115a74698f..6d1d49811af39e8c943404d82e8acd64
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c;
|
||||
if (chunk != null) addTicket(x, z); // Paper
|
||||
ret.complete(chunk == null ? null : chunk.getBukkitChunk());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
||||
index fb6454cc64ebc549f61ad7d51efb16ef15f8384d..903408d4d8f9ce5c9566ec96312281ab15f16c2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
||||
@@ -40,6 +40,7 @@ public final class CapturedBlockState extends CraftBlockState {
|
||||
|
||||
for (int k = 0; k < j; ++k) {
|
||||
Bee entitybee = new Bee(EntityType.BEE, generatoraccessseed.getMinecraftWorld());
|
||||
+ entitybee.setPosRaw(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()); // Folia - region threading - set position so that thread checks do not fail
|
||||
|
||||
tileentitybeehive.addOccupantWithPresetTicks(entitybee, false, random.nextInt(599));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 350cbf64c17938021002d5fd67176c44b398231e..e54713a530e18344a7c7d1c400147fc33d64967f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
|
Loading…
Reference in New Issue
Block a user