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
tutorial:ores [2023/12/18 00:44] – use `tutorial` namespace for tutorials solidblocktutorial:ores [2023/12/18 01:03] (current) solidblock
Line 31: Line 31:
       {       {
         "state": {         "state": {
-          "Name": "tutorial:deepslate_custom_ore"+          "Name": "minecraft:end_rod"
         },         },
         "target": {         "target": {
Line 43: Line 43:
 </code> </code>
  
-This Configured Feature tells the game the size of the ore veins, what fraction of the ore blocks should be removed due to air exposure, and, importantly, which blocks the ore block should be allowed to replace. Notice how there are two ''target'' objects in the ''targets'' array: one for stone ore, and one for deepslate oreIf you have not yet made a deepslate ore blockdo that now, or simply replace ''"tutorial:deepslate_custom_ore"'' with ''"tutorial:custom_ore"'' to use the stone version of your ore block.+This Configured Feature tells the game the size of the ore veins, what fraction of the ore blocks should be removed due to air exposure, and, importantly, which blocks the ore block should be allowed to replace. Notice how there are two ''target'' objects in the ''targets'' array: one for ore in stone, and another is the ore in deepslate. To simplify itboth we use end rod in vanilla games.
  
 <code JavaScript src\main\resources\data\tutorial\worldgen\placed_feature\ore_custom.json> <code JavaScript src\main\resources\data\tutorial\worldgen\placed_feature\ore_custom.json>
Line 86: Line 86:
 public class ExampleMod implements ModInitializer { public class ExampleMod implements ModInitializer {
   
- public static final RegistryKey<PlacedFeature> CUSTOM_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("examplemod","ore_custom"));+ public static final RegistryKey<PlacedFeature> CUSTOM_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("tutorial","ore_custom"));
  
  @Override  @Override
Line 167: Line 167:
       {       {
         "state": {         "state": {
-          "Name": "minecraft:nether_custom_ore"+          "Name": "minecraft:end_rod"
         },         },
         "target": {         "target": {
tutorial/ores.1702860283.txt.gz · Last modified: 2023/12/18 00:44 by solidblock