pmardle Posted February 23, 2013 Share Posted February 23, 2013 Hi All, As usual all the tutorials I have found for this issue are either out of date, or don't exist !! I am trying to get a custom structure to spawn (similar to villages) - and am having the following issue. public class WorldGenBarbarianVillage implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { } private void generateSurface(World world, Random random, int blockX, int blockZ) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(16); (new WorldGenBarbarianVillage()).generate(world, random, Xcoord, Ycoord, Zcoord); } } } This is in my Mod.java file, and the error is at the bit I underlines. Error Message.. The method generate(Random, int, int, World, IChunkProvider, IChunkProvider) in the type ColoniesMain.WorldGenBarbarianVillage is not applicable for the arguments (World, Random, int, int, int) I appreciate that it is probabaly caused by the variables not being the same in the two generate thingies (sorry not up on my terminology) - but I'll be damned if I can get this working.. Can anyone assist?? (I'm sure it's a noob mistake/Easy fix !!) If you need it the code of my WorldGenBarbarianVillage is.. public class WorldGenBarbarianVillage extends WorldGenerator { public boolean generate(World var1, Random var2, int var3, int var4, int var5) { while (var1.isAirBlock(var3, var4, var5)&& var4 > 2) { --var4; } var1.setBlock(var3, var4 + 1, var5, Block.blockDiamond.blockID); return true; }} Thanks in Advance !! Quote Link to comment Share on other sites More sharing options...
vdvman1 Posted February 23, 2013 Share Posted February 23, 2013 Your two classes have the same name! You can't have multiple classes with the same name, so it is getting confused over which one the create when you say new WorldGenBarbarianVillage() ! That is the reason it is saying the arguments are incorrect, it thinks you are trying to use your IWorldGenertor not your WorldGenerator! Quote Link to comment Share on other sites More sharing options...
pmardle Posted February 23, 2013 Author Share Posted February 23, 2013 Holy Cow !! Told you it was probably a silly error !!! Thanks a bunch !! Quote Link to comment Share on other sites More sharing options...
vdvman1 Posted February 23, 2013 Share Posted February 23, 2013 Your welcome! Glad to be of assitance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.