Tutorial - Adding the block to the world generation
In this part we're going to add our platinum ore to the world generation.
Create a file in the worldGeneration directory and name it platinumOre.js. Add the following
contents to it:
blockId = config.getBlockId("platinumOre");
minHeight = 0;
maxHeight = 32;
generationsPerChunk = 10.0;
numberOfBlocks = 8;
minHeight = 0;
maxHeight = 32;
generationsPerChunk = 10.0;
numberOfBlocks = 8;
generationsPerChunk: The world generator generates ten veines per chunk.
numberOfBlocks: The world generator generates eight blocks per vein.
Now add the following line to the mod.js file right below mod.addBlock:
mod.addWorldGen("platinumOre.js", "ore");
That's it. Notice that the block is only generated in new worlds or not already generated parts of an
existing world.
Continue with: Creating an item