Posted January 27, 20169 yr Guten tag! So, I have this generator code: package com.gashk.amethyst.generation; import java.util.Random; import com.gashk.amethyst.init.Amethyst; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.fml.common.IWorldGenerator; public class AMGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimensionId()) { case 0: generateSurface(world, random, chunkX*16, chunkZ*16); break; } } public void generateSurface(World world, Random rand, int chunkX, int chunkZ) { for (int i = 0; i < 25; i++) { int randPosX = chunkX + rand.nextInt(16); int randPosY = rand.nextInt(100); int randPosZ = chunkZ + rand.nextInt(16); (new WorldGenMinable(Amethyst.am_ore.getDefaultState(), 10)).generate(world, rand, new BlockPos(randPosX, randPosY, randPosZ)); } } } Everything is fine here. But when I try to register it in my main class like so: GameRegistry.registerWorldGenerator(new PigGen(), 0); It says: The method registerWorldGenerator(IWorldGenerator, int) in the type GameRegistry is not applicable for the arguments (AMGen, int) But AMGen implements IWorldGenerator ;-; pls help! Thanks!
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.