rutgerkok / WorldGeneratorApi

Minecraft Spigot plugin that enables other plugins to customize world generation
MIT License
95 stars 9 forks source link

Not Overriding the #getHeight method in BaseTerrainGenerator will throw an RunTimeException #39

Closed apollyon600 closed 3 years ago

apollyon600 commented 3 years ago

Title says it all, when not overriding the new #getHeight method, it automatically runs the old getHeight method and then throws an exception, meaning you're required to override a return int in #getHeight

rutgerkok commented 3 years ago

Indeed, you need to override int getHeight(BiomeGenerator biomeGenerator, int x, int z, HeightType type). This is working as intended. It's used by villages and a few other structures to probe the height map.

You can use a noise generator instead if you're looking for an easier way to implement hilly terrain - https://github.com/rutgerkok/WorldGeneratorApi/wiki/Creating-hilly-terrain .