2022-11-25 07:32:29 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
Date: Fri, 18 Mar 2022 21:30:00 -0700
|
|
|
|
Subject: [PATCH] Fix async entity add due to fungus trees
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
2023-09-22 17:51:48 +02:00
|
|
|
index d99626d529ac2d18f662e5af0264643e8582e12d..277984647658a067e66fd1766ab00736ea9083c3 100644
|
2022-11-25 07:32:29 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
2022-12-07 23:05:32 +01:00
|
|
|
@@ -228,6 +228,7 @@ public class WorldGenRegion implements WorldGenLevel {
|
2022-11-25 07:32:29 +01:00
|
|
|
if (iblockdata.isAir()) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
+ if (drop) LOGGER.warn("Potential async entity add during worldgen", new Throwable()); // Paper - log when this happens
|
|
|
|
if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
|
|
|
|
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
2023-09-10 04:28:03 +02:00
|
|
|
index 3b9d7f92f4e47da2d7eb1e9cb9e996ee36b57e4c..d8908ba20280d21a2114afebdf13b1a5520e48e7 100644
|
2022-11-25 07:32:29 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
2023-05-12 13:10:08 +02:00
|
|
|
@@ -401,10 +401,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
2022-11-25 07:32:29 +01:00
|
|
|
((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
|
|
|
|
return true;
|
|
|
|
case CRIMSON_FUNGUS:
|
|
|
|
- gen = TreeFeatures.CRIMSON_FUNGUS_PLANTED;
|
|
|
|
+ gen = this.isNormalWorld() ? TreeFeatures.CRIMSON_FUNGUS_PLANTED : TreeFeatures.CRIMSON_FUNGUS; // Paper - if world gen, don't use planted version
|
|
|
|
break;
|
|
|
|
case WARPED_FUNGUS:
|
|
|
|
- gen = TreeFeatures.WARPED_FUNGUS_PLANTED;
|
|
|
|
+ gen = this.isNormalWorld() ? TreeFeatures.WARPED_FUNGUS_PLANTED : TreeFeatures.WARPED_FUNGUS; // Paper - if world gen, don't use planted version
|
|
|
|
break;
|
|
|
|
case AZALEA:
|
|
|
|
gen = TreeFeatures.AZALEA_TREE;
|