Posted April 1, 201510 yr I have GameRegistry.registerWorldGenerator(new RainbowGeneration(), 0); in my main mod file under PreInit. I have no problems, errors, red underline at all in my mod, but no ore spawns, and I need help. And I used Mr. Crayfishes' 1.7 modding tutorials and his worked fine. Below is my RainbowGeneration.java package giratinaninja.Xcite; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class RainbowGeneration implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.dimensionId) { case 1: generateEnd(world, random, chunkX, chunkZ); break; case 0: generateOverworld(world, random, chunkX, chunkZ); break; case -1: generateNether(world, random, chunkX, chunkZ); break; } } public void generateNether(World world, Random rand, int x, int z) { generateOre(XcitementMod.blockRainbowore, world, rand, x, z, 2, 10, 5, 0, 100, Blocks.stone); } public void generateOverworld(World world, Random rand, int x, int z) { generateOre(XcitementMod.blockRainbowore, world, rand, x, z, 2, 10, 5, 0, 100, Blocks.stone); } // generateOre(XcitementMod.blockRainbowore, world, rand, x, z, 1, 3, 60, 0, // 40, Blocks.stone); public void generateEnd(World world, Random rand, int x, int z) { generateOre(XcitementMod.blockRainbowore, world, rand, x, z, 2, 10, 5, 0, 100, Blocks.end_stone); } public void generateOre(Block block, World world, Random random, int chunkX, int chunkZ, int minVeinSize, int maxVeinSize, int chance, int minY, int maxY, Block generateIn) { int vienSize = minVeinSize + random.nextInt(maxVeinSize - minVeinSize); int heightRange = maxY - minY; WorldGenMinable gen = new WorldGenMinable(block, vienSize, generateIn); for (int i = 0; i < chance; i++) { int xRand = chunkX * 16 + random.nextInt(16); int yRand = random.nextInt(heightRange + minY); int zRand = chunkZ * 16 + random.nextInt(16); gen.generate(world, random, xRand, yRand, zRand); } } }
April 1, 201510 yr Probably it's because your ore is too rare to find. Try adjusting the chance value around 100. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.