From b06cbec171f2a1fd79dae5724548ecacea5e315e Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 27 Nov 2024 07:00:57 +1100 Subject: [PATCH] SPIGOT-7966: Some trees do not generate with #generateTree By: md_5 --- .../bukkit/craftbukkit/util/BlockStateListPopulator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java index 81c11159fd..c258a6d1a6 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -10,6 +10,7 @@ import java.util.function.Predicate; import net.minecraft.core.BlockPosition; import net.minecraft.core.IRegistryCustom; import net.minecraft.server.level.WorldServer; +import net.minecraft.util.RandomSource; import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.block.ITileEntity; import net.minecraft.world.level.block.entity.TileEntity; @@ -153,4 +154,10 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { public long nextSubTickCount() { return world.nextSubTickCount(); } + + // SPIGOT-7966: Needed for some tree generations + @Override + public RandomSource getRandom() { + return world.getRandom(); + } }