- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Surface Builders
        gniftygnome edited this page Mar 27, 2024 
        ·
        5 revisions
      
    Biolith's surface builders can only be accessed via the code API, because the purpose of restoring surface builder functionality is to enable the use of custom code to build surfaces when material rules cannot provide the required functionality (or it is too cumbersome). A primary reason to use surface builders is to enable changing the surface height from that dictated by vanilla noise.
Extend com.terraformersmc.biolith.api.surface.BiolithSurfaceBuilder and override either the generate or generateLate method (or both).  Register your surface builder class with biolith like this:
- Methods: addOverworldSurfaceRules,addNetherSurfaceRules,addEndSurfaceRules
// Any needed configuration for the builder can be supplied via the constructor.
SurfaceGeneration.addOverworldSurfaceRules(
        Identifier.of(MyMod.MOD_ID, "surface_rules"),
        new MySurfaceBuilder(Blocks.SAND.getDefaultState()).setBiomeKey(MyBiomeKeys.MY_BIOME))