User Tools

Site Tools


tutorial:ores

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:ores [2019/08/19 19:31] – [Iterating Biome Registry] Rewrite jamieswhiteshirttutorial:ores [2020/02/26 15:23] – Change to new format supercoder79
Line 8: Line 8:
 ==== Adding ores to a biome ==== ==== Adding ores to a biome ====
  
-As we need to handle exiting biomes and biomes being added later on in the loading stage creating a method to handle adding the ore to the biome.+First we need to create a method to process a biome, checking if it is a valid biome then adding the ore.
  
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
Line 15: Line 15:
  biome.addFeature(  biome.addFeature(
             GenerationStep.Feature.UNDERGROUND_ORES,             GenerationStep.Feature.UNDERGROUND_ORES,
-            Biome.configureFeature( +            Feature.ORE.configure( 
-                Feature.ORE, + new OreFeatureConfig( 
-         new OreFeatureConfig( +     OreFeatureConfig.Target.NATURAL_STONE, 
-         OreFeatureConfig.Target.NATURAL_STONE, +     Blocks.NETHER_QUARTZ_ORE.getDefaultState(), 
-         Blocks.NETHER_QUARTZ_ORE.getDefaultState(), +     8 //Ore vein size 
-                 8 //Ore vein size +    )).createDecoratedFeature( 
-         ), + Decorator.COUNT_RANGE.configure(new RangeDecoratorConfig( 
-                 Decorator.COUNT_RANGE+     8, //Number of veins per chunk 
-        new RangeDecoratorConfig( +     0, //Bottom Offset 
-             8, //Number of veins per chunk +     0, //Min y level 
-             0, //Bottom Offset +     64 //Max y level 
-             0, //Min y level + ))));
-             64 //Max y level +
-         )));+
  }  }
 } }
tutorial/ores.txt · Last modified: 2023/12/18 01:03 by solidblock