Posted March 30, 201510 yr Hi everyone I've searched quite long on the Internet, but I couldn't find anything on this issue I'm having.. I followed a tutorial to generate structures, and all goes well until the part where I placed the structure.java in Eclipse, and fixed all other errors. The error I am getting is The method setBlock(World, int, int, int, Block, int) in the type structure is not applicable for the arguments (World, int, int, int, int, int) And the actual code that causes this is this.setBlock(world, i + 0, j + 0, k + 0, 0, 0); And this is just one of the, I don't know how many, same errors I am getting. Not sure if it's needed, but here is the beginning of the function public boolean generate(World world, Random rand, int i, int j, int k) { //check that each corner is one of the valid spawn blocks if(!locationIsValidSpawn(world, i, j, k) || !locationIsValidSpawn(world, i + 39, j, k) || !locationIsValidSpawn(world, i + 39, j, k + 65) || !locationIsValidSpawn(world, i, j, k + 65)) { return false; } k = k - 10; i = i - 10; this.setBlock(world, i + 0, j + 0, k + 0, 0, 0); //etc.. The code in the 'structure.java', comes from a file exported from MCEdit (.schematic), and was converted to java code using MrPonyCaptain's converter. All help is appreciated, thanks in advance!
March 30, 201510 yr setBlock(World, int, int, int, Block, int) and (World, int, int, int, int, int) you need to change fifth parameter to a block as setblock only accepts it as a block not an int Did you really need to know?
March 30, 201510 yr Author setBlock(World, int, int, int, Block, int) and (World, int, int, int, int, int) you need to change fifth parameter to a block as setblock only accepts it as a block not an int Yeah I figured that that was the problem, I wasn't sure how to fix it though. As I see it now, I would need to change the fith '0' to Block.air right? Thanks
March 30, 201510 yr I'm not sure if the setblocktoair function is in 1.7.10 but if it is you would use that instead cause I'm not completely sure Minecraft registers air as a block. Note mind has 1.8 and it's state system running through it so really can't remember 1.7 atm Did you really need to know?
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.