Posted February 19, 20214 yr Hi, I have a custom biome which uses a custom surface builder: public static final RegistryObject<SurfaceBuilder<SurfaceBuilderConfig>> BINARY_SURFACE_BUILDER = SURFACE_BUILDERS.register("binary_surface_builder", () -> new BinarySurfaceBuilder(SurfaceBuilderConfig.field_237203_a_)); public static final RegistryObject<Biome> BINARY_BIOME = BIOMES.register("binary_biome", Biomes::makeBinaryBiome); However, the biome is registered frist so I have an error since it uses the unregistered SurfaceBuilder: public static Biome makeBinaryBiome() { MobSpawnInfo.Builder spawns = new MobSpawnInfo.Builder(); BinDimBiomeFeatures.addBinDimSpawns(spawns); BiomeGenerationSettings.Builder gen = new BiomeGenerationSettings.Builder(); gen.withSurfaceBuilder(GenerationInit.BINARY_SURFACE_BUILDER.get().func_242929_a(new SurfaceBuilderConfig(BlockInit.BINARY_BLOCK.get().getDefaultState(), BlockInit.ON_BINARY_BLOCK.get().getDefaultState(), null))); //^^ error ^^ BinDimBiomeFeatures.addOres(gen); BinDimBiomeFeatures.addBugVirus(gen); BinDimBiomeFeatures.addStructures(gen); int color = 0x00ff00; return new Biome.Builder() .precipitation(Biome.RainType.NONE).category(Biome.Category.NONE).depth(0.1F).downfall(0F).scale(0.02F).temperature(1.5F) .setEffects(new BiomeAmbience.Builder().setWaterColor(color).setWaterFogColor(color).setFogColor(color).withSkyColor(color).build()) .withMobSpawnSettings(spawns.copy()) .withGenerationSettings(gen.build()).build(); } I tried setting the BiomeGenerationSettings in the BiomeLoadingEvent but I have an error with makeBinaryBiome since it cannot build without BiomeGenerationSettings What is the right way to fix this ? Thanks in advance. Edited February 19, 20214 yr by QuantumSoul
February 19, 20214 yr Author I fixed it using the supplier version of BiomeGenerationSettings.Builder#withSurfaceBuilder()
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.