Answers for "fabric minecraft new ore"

1

fabric how to generate ores

public class ExampleMod implements ModInitializer {
  private static ConfiguredFeature<?, ?> ORE_WOOL_OVERWORLD = Feature.ORE
    .configure(new OreFeatureConfig(
      OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
      Blocks.WHITE_WOOL.getDefaultState(),
      9)) // vein size
    .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(
      0,
      0,
      64)))
    .spreadHorizontally()
    .repeat(20); // number of veins per chunk
 
  @Override
  public void onInitialize() {
    RegistryKey<ConfiguredFeature<?, ?>> oreWoolOverworld = RegistryKey.of(Registry.CONFIGURED_FEATURE_WORLDGEN,
        new Identifier("tutorial", "ore_wool_overworld"));
    Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, oreWoolOverworld.getValue(), ORE_WOOL_OVERWORLD);
    BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, oreWoolOverworld);
  }
}
Posted by: Guest on March-18-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language