This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
public void onBlockClicked(World world, int i, int j, int k, EntityPlayer entityplayer) { // Basic Building int block = Block.wood.blockID; int size = 5; for (int i1 = 0; i1 < size; i1++) { for (int j1 = 0; j1 < size; j1++) { //Walls // i == ++ k == 0 world.setBlockWithNotify(i+i1,j+j1,k,block); // i == ++ k == 4 world.setBlockWithNotify(i+i1,j+j1,k+(size-1),block); // i == 0 k == ++ world.setBlockWithNotify(i,j+j1,k+i1,block); // i == 4 k == ++ world.setBlockWithNotify(i+(size-1),j+j1,k+i1,block); //Roof world.setBlockWithNotify(i+i1,j+(size-1),k+j1,block); //Floor world.setBlockWithNotify(i+i1,j,k+j1,block); } } //Door world.setBlockWithNotify(i+1,j+2,k,0); world.setBlockWithNotify(i+1,j+1,k,0); //Windows int offset = size % 2 == 0 ? (size / 2) - 1 : (size / 2); world.setBlockWithNotify(i,j+offset,k+offset,Block.glass.blockID); world.setBlockWithNotify(i+offset,j+offset,k,Block.glass.blockID); world.setBlockWithNotify(i+(size-1),j+offset,k+offset,Block.glass.blockID); world.setBlockWithNotify(i+offset,j+offset,k+(size-1),Block.glass.blockID); //Utilities world.setBlockWithNotify(i+1,j+1,k+(size-2),Block.crate.blockID); world.setBlockWithNotify(i+(size-2),j+1,k+1,Block.workbench.blockID); world.setBlockWithNotify(i+(size-2),j+1,k+(size-2),Block.stoneOvenIdle.blockID); }
Generating houses