diff options
author | Newwind <[email protected]> | 2024-08-31 19:29:50 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-31 20:29:50 +0200 |
commit | 509ea2fd17fa03ce04f86046098607733b8767ba (patch) | |
tree | 3f7c9a29481fafbb6ad9f846839ec8f4863d2363 /patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch | |
parent | e01ddf46279fbb68d157749a906b7a2ecc60da1a (diff) | |
download | Paper-509ea2fd17fa03ce04f86046098607733b8767ba.tar.gz Paper-509ea2fd17fa03ce04f86046098607733b8767ba.zip |
Fix horse armor desync (#11341)
Diffstat (limited to 'patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch')
-rw-r--r-- | patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch new file mode 100644 index 0000000000..2a7830d952 --- /dev/null +++ b/patches/server/0771-Fix-async-entity-add-due-to-fungus-trees.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +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 +index 13229388ddce668061a34c787ab9586d41854d8a..682c8cfbd917c086072f1756861a340800ea40da 100644 +--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java ++++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +@@ -237,6 +237,7 @@ public class WorldGenRegion implements WorldGenLevel { + if (iblockdata.isAir()) { + return false; + } else { ++ if (drop) LOGGER.warn("Potential async entity add during worldgen", new Throwable()); // Paper - Fix async entity add due to fungus trees; 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 +index 3c1937b43b6834ae0ffdd8d22ac32a776bc7fb64..a14d3e6c43b94c543790571b13808713444a239f 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +@@ -261,10 +261,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { + ((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 - Fix async entity add due to fungus trees; 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 - Fix async entity add due to fungus trees; if world gen, don't use planted version + break; + case AZALEA: + gen = TreeFeatures.AZALEA_TREE; |