Posted March 23, 201312 yr I have the following problem. I want to set all the blocks from the coordinates of a specific Integer[] to id 0. I'm doing this with this code: for (Integer[] coord : this.coords.get(meta)) { System.out.println((x + coord[0]) + " " + (y + coord[1]) + " " + (z + coord[2]) + " " + world.getBlockId(x + coord[0], y + coord[1], z + coord[2])); world.setBlock((x + coord[0]), (y + coord[1]), (z + coord[2]), 0); } Th output is now 2013-03-23 14:47:19 [iNFO] [sTDOUT] -274 64 94 2676 2013-03-23 14:47:19 [iNFO] [sTDOUT] -275 63 94 0 2013-03-23 14:47:19 [iNFO] [sTDOUT] -275 64 94 0 Which means that the final two are probably already 0. But this is not the case, they are 2676 too. Here comes the weird thing. If I do this: for (Integer[] coord : this.coords.get(meta)) { System.out.println((x + coord[0]) + " " + (y + coord[1]) + " " + (z + coord[2]) + " " + world.getBlockId(x + coord[0], y + coord[1], z + coord[2])); } it prints out this: 2013-03-23 14:51:38 [iNFO] [sTDOUT] -277 65 114 2676 2013-03-23 14:51:38 [iNFO] [sTDOUT] -278 64 114 2676 2013-03-23 14:51:38 [iNFO] [sTDOUT] -278 65 114 2676 Which means that the id is indeed 2676. Now what have I done wrong? When I run the code, the blocks are still there, except the one that was called first.
March 25, 201312 yr Author I did some testing, and i seems that with 3 different block IDs, it doesn't give the bug. This is weird...
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.