SPIGOT-7966: Some trees do not generate with #generateTree

This commit is contained in:
md_5 2024-11-27 07:00:57 +11:00
parent f2822317cb
commit fd3f5a3802
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -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();
}
}