Skip to content

Commit

Permalink
fix heightmap assignment in DynamicTreeFeature.java
Browse files Browse the repository at this point in the history
replace originPos (y=-64) with basePos (y=0), so correct overworld biome will be chosen and correct heightmap used
  • Loading branch information
djsimmonds authored Jul 26, 2023
1 parent fae47cf commit 5ea7d1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {

protected void generateTrees(LevelContext levelContext, BiomeDatabase biomeDatabase, PoissonDisc disc, BlockPos originPos, SafeChunkBounds safeBounds) {
BlockPos basePos = new BlockPos(disc.x, 0, disc.z);
Biome biome = levelContext.accessor().getBiome(originPos).value();
Biome biome = levelContext.accessor().getBiome(basePos).value();
Heightmap.Types heightmap = Heightmap.Types.valueOf(biomeDatabase.getHeightmap(biome).toUpperCase());
for (BlockPos groundPos : GroundFinder.getGroundFinder(levelContext.level()).findGround(levelContext.accessor(), basePos, heightmap)) {
BiomeDatabase.EntryReader entry = biomeDatabase.getEntry(levelContext.accessor().getBiome(groundPos).value());
Expand Down

0 comments on commit 5ea7d1c

Please sign in to comment.