tutorial:ores
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:ores [2019/08/18 23:41] – rewrite modmuss50 | tutorial:ores [2019/08/19 19:31] – [Iterating Biome Registry] Rewrite jamieswhiteshirt | ||
---|---|---|---|
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 core to the 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. |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 37: | Line 37: | ||
==== Iterating Biome Registry ==== | ==== Iterating Biome Registry ==== | ||
- | What we need to do next is loop over the existing | + | What we need to do next is process all biomes |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 43: | Line 43: | ||
public void onInitialize() { | public void onInitialize() { | ||
//Loop over existing biomes | //Loop over existing biomes | ||
- | Registry.BIOME.stream().forEach(this:: | + | Registry.BIOME.forEach(this:: |
//Listen for other biomes being registered | //Listen for other biomes being registered |
tutorial/ores.txt · Last modified: 2023/12/18 01:03 by solidblock