This Code "should" make 2 square rings one outside the other with an obsidian block in the middle, then a wool block on top of that,but it just makes a bit of a mess.the wool,and obsidion in the center work but then it goes wrong, Does anyone know why? Code: public void makecenterstand(Player player,Location location){ Material newblock = Material.OBSIDIAN; Block oldblock = player.getLocation().getBlock().getFace(BlockFace.DOWN); oldblock.setType(newblock); Material newflagblock = Material.WOOL; Block oldflagblock = player.getLocation().getBlock(); oldflagblock.setType(newflagblock); makefirstring(player,location); } public void makefirstring(Player player,Location location){ Material newblock = Material.STONE; Block blockunderplayer = player.getLocation().getBlock().getFace(BlockFace.DOWN); Block one = blockunderplayer.getFace(BlockFace.EAST); one.setType(newblock); Block two = one.getFace(BlockFace.NORTH); two.setType(newblock); Block three = two.getFace(BlockFace.WEST); three.setType(newblock); Block four = three.getFace(BlockFace.WEST); four.setType(newblock); Block five = four.getFace(BlockFace.SOUTH); five.setType(newblock); Block six = five.getFace(BlockFace.SOUTH); six.setType(newblock); Block seven = six.getFace(BlockFace.EAST); six.setType(newblock); Block eight = six.getFace(BlockFace.EAST); seven.setType(newblock); makesecondring(player,location); } public void makesecondring(Player player,Location location){ Material newblock = Material.MOSSY_COBBLESTONE; Block blockunderplayer = player.getLocation().getBlock().getFace(BlockFace.DOWN); Block blockleftunderplayer = blockunderplayer.getFace(BlockFace.EAST); Block one = blockleftunderplayer.getFace(BlockFace.EAST); one.setType(newblock); Block two = one.getFace(BlockFace.NORTH); two.setType(newblock); Block three = two.getFace(BlockFace.WEST); three.setType(newblock); Block four = three.getFace(BlockFace.WEST); four.setType(newblock); Block five = four.getFace(BlockFace.SOUTH); five.setType(newblock); Block six = five.getFace(BlockFace.SOUTH); six.setType(newblock); Block seven = six.getFace(BlockFace.EAST); six.setType(newblock); Block eight = six.getFace(BlockFace.EAST); seven.setType(newblock); } bump EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I haven't never used block faces and don't know what uses does it have. In my plugin, I change the mateial of the target block. If I understand your description of the problem right, you want something similar. Why do you read/set the material on a face and not the whole block? Hmmm. And when you add/subtract x/y/z from the start-block and set the material for each block? PS: Maybe, you can draw a little picture (or use smileys) to express the starting- and endingpoint.