mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 17:26:07 +00:00
improve fabric/forge getHeight impl
This commit is contained in:
@@ -146,7 +146,7 @@ public class ForgeChunkGeneratorWrapper extends ChunkGenerator implements Genera
|
||||
public int getBaseHeight(int x, int z, Heightmap.@NotNull Type type) {
|
||||
TerraWorld world = TerraForgePlugin.getInstance().getWorld(dimensionType);
|
||||
int height = world.getWorld().getMaxHeight();
|
||||
while(height >= 0 && !type.isOpaque().test(((ForgeBlockData) world.getUngeneratedBlock(x, height - 1, z)).getHandle())) {
|
||||
while(height >= 0 && !type.isOpaque().test(((ForgeBlockData) world.getUngeneratedBlock(x, height-1, z)).getHandle())) {
|
||||
height--;
|
||||
}
|
||||
return height;
|
||||
|
||||
Reference in New Issue
Block a user