User Tools

Site Tools


tutorial:chunkgenerator

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:chunkgenerator [2024/05/31 18:44] – [Registering and Codecs] added more information about the codec miirtutorial:chunkgenerator [2025/02/08 20:28] (current) – adds note to use Registries.CHUNK_GENERATOR on 1.19.3 and above 3xpl0173d
Line 123: Line 123:
 </code> </code>
  
-and then, create a constructor for your generator that uses each of those fields in that order:+and then, create a constructor for your generator that uses each of those fields **in the same order that you listed them in the codec**:
 <code java> <code java>
 public ExampleChunkGenerator(BiomeSource biomeSource, int seaLevel, int worldHeight, Identifier customBlockID) { public ExampleChunkGenerator(BiomeSource biomeSource, int seaLevel, int worldHeight, Identifier customBlockID) {
Line 139: Line 139:
 Registry.register(Registry.CHUNK_GENERATOR, new Identifier("wiki-example", "example"), ExampleChunkGenerator.CODEC); Registry.register(Registry.CHUNK_GENERATOR, new Identifier("wiki-example", "example"), ExampleChunkGenerator.CODEC);
 </code> </code>
 +//* For Minecraft Versions 1.19.3 and above, use ''Registries.CHUNK_GENERATOR'' instead of ''Registry.CHUNK_GENERATOR''
 +//
  
 Now, you can create json files to use your new chunk generator: Now, you can create json files to use your new chunk generator:
tutorial/chunkgenerator.1717181074.txt.gz · Last modified: 2024/05/31 18:44 by miir