Posted January 26, 20169 yr So I've been recently coding. Creating a new 1.8 Minecraft Mod. I've been looking for tutorials and what not on how to create the files and actually have something generate. I've got most of it working. But I'm having a bit of trouble. The parts I'm having trouble with are the IBlockState checkID = world.setDefaultState(new BlockPos(i, j, k) (IBlockState)); while (checkID != 0){ if (distanceToAir > 3){ return false; } if(b1.isAir(world, x, y, z) || b1.isLeaves(world, x, y, z)) and if (checkID != 0){ return false; } Any help is greatly appreciated Here is my code import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; public class VillageComponentSteelCraftHouse { protected Block[] getValidSpawnBlocks() { return new Block[] { Blocks.stone, Blocks.grass, Blocks.dirt, Blocks.cobblestone, Blocks.sand, Blocks.gravel, }; } public boolean LocationIsValidSpawn(World world, int i, int j, int k){ int distanceToAir = 0; IBlockState checkID = world.setDefaultState(new BlockPos(i, j, k) (IBlockState)); while (checkID != 0){ if (distanceToAir > 3){ return false; } distanceToAir++; checkID = world.getBlockState(new BlockPos(i, j + distanceToAir, k)); } j += distanceToAir - 1; IBlockState blockID = world.getBlockState(new BlockPos(i, j, k)); IBlockState blockIDAbove = world.getBlockState(new BlockPos(i, j+1, k)); IBlockState blockIDBelow = world.getBlockState(new BlockPos(i, j-1, k); for (Block x : getValidSpawnBlocks()){ if (checkID != 0){ return false; } if (blockID == blockIDAbove){ return true; }else if (blockID == Blocks.snow && blockIDBelow == x){ return true; } } return false; } public VillageComponentSteelCraftHouse() { } public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { } public void setBlock(World world, int x, int y, int z, Block block, int metadata) { IBlockState b1 = world.getBlockState(new BlockPos(x, y, z)); if(b1.isAir(world, x, y, z) || b1.isLeaves(world, x, y, z)) { } } 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 + 9, j, k) || !LocationIsValidSpawn(world, i + 9, j, k + 9) || !LocationIsValidSpawn(world, i, j, k + 9)) { return false; } k = k - 10; i = i - 10; this.setBlock(world, i + 0, j + 0, k + 0, Blocks.stone_slab2, 0); this.setBlock(world, i + 0, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 0, j + 0, k + 2, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 3, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 4, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 0, j + 0, k + 6, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 7, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 8, Blocks.grass, 0); this.setBlock(world, i + 0, j + 0, k + 9, Blocks.grass, 0); this.setBlock(world, i + 0, j + 1, k + 1, Blocks.log, 0); this.setBlock(world, i + 0, j + 1, k + 2, Blocks.stone_brick_stairs, 0); this.setBlock(world, i + 0, j + 1, k + 3, Blocks.stone_brick_stairs, 0); this.setBlock(world, i + 0, j + 1, k + 4, Blocks.stone_brick_stairs, 0); this.setBlock(world, i + 0, j + 1, k + 5, Blocks.log, 0); this.setBlock(world, i + 0, j + 1, k + 6, Blocks.air, 2); this.setBlock(world, i + 0, j + 1, k + 8, Blocks.air, 2); this.setBlock(world, i + 0, j + 2, k + 1, Blocks.oak_fence, 0); this.setBlock(world, i + 0, j + 2, k + 5, Blocks.oak_fence, 0); this.setBlock(world, i + 0, j + 2, k + 6, Blocks.air, 10); this.setBlock(world, i + 0, j + 2, k + 8, Blocks.air, 10); this.setBlock(world, i + 1, j + 0, k + 0, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 1, j + 1, k + 0, Blocks.log, 0); this.setBlock(world, i + 1, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 3, Blocks.stone_brick_stairs, 3); this.setBlock(world, i + 1, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 2, k + 0, Blocks.oak_fence, 0); // this.setBlock(world, i + 1, j + 2, k + 1, -117, 0); this.setBlock(world, i + 1, j + 2, k + 6, Blocks.log, 0); this.setBlock(world, i + 1, j + 2, k + 7, Blocks.planks, 0); this.setBlock(world, i + 1, j + 2, k + 8, Blocks.planks, 0); this.setBlock(world, i + 1, j + 2, k + 9, Blocks.log, 0); // this.setBlock(world, i + 1, j + 3, k + 1, -117, 0); this.setBlock(world, i + 1, j + 3, k + 6, Blocks.log, 0); this.setBlock(world, i + 1, j + 3, k + 7, Blocks.planks, 0); this.setBlock(world, i + 1, j + 3, k + 8, Blocks.planks, 0); this.setBlock(world, i + 1, j + 3, k + 9, Blocks.log, 0); // this.setBlock(world, i + 1, j + 4, k + 1, -117, 0); this.setBlock(world, i + 1, j + 4, k + 6, Blocks.log, 0); this.setBlock(world, i + 1, j + 4, k + 7, Blocks.planks, 0); this.setBlock(world, i + 1, j + 4, k + 8, Blocks.planks, 0); this.setBlock(world, i + 1, j + 4, k + 9, Blocks.log, 0); this.setBlock(world, i + 1, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 6, Blocks.log, 0); this.setBlock(world, i + 1, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 1, j + 5, k + 9, Blocks.log, 0); this.setBlock(world, i + 1, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 2, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 3, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 4, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 5, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 6, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 7, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 8, Blocks.stone_slab, 0); this.setBlock(world, i + 1, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 2, j + 0, k + 0, Blocks.grass, 0); this.setBlock(world, i + 2, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 2, j + 1, k + 0, Blocks.stone_brick_stairs, 2); this.setBlock(world, i + 2, j + 1, k + 1, Blocks.stone_brick_stairs, 3); this.setBlock(world, i + 2, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 4, Blocks.stone_slab, 3); this.setBlock(world, i + 2, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 2, k + 3, Blocks.stone_slab2, 0); this.setBlock(world, i + 2, j + 2, k + 6, Blocks.planks, 0); this.setBlock(world, i + 2, j + 2, k + 7, Blocks.stone_slab2, 0); this.setBlock(world, i + 2, j + 2, k + 8, Blocks.stone_slab2, 0); this.setBlock(world, i + 2, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 2, j + 3, k + 6, Blocks.planks, 0); // this.setBlock(world, i + 2, j + 3, k + 7, -116, 0); // this.setBlock(world, i + 2, j + 3, k + 8, -116, 0); this.setBlock(world, i + 2, j + 3, k + 9, Blocks.planks, 0); this.setBlock(world, i + 2, j + 4, k + 6, Blocks.planks, 0); this.setBlock(world, i + 2, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 2, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 2, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 2, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 3, j + 0, k + 0, Blocks.grass, 0); this.setBlock(world, i + 3, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 3, j + 1, k + 0, Blocks.stone_brick_stairs, 2); this.setBlock(world, i + 3, j + 1, k + 1, Blocks.stone_brick_stairs, 3); this.setBlock(world, i + 3, j + 1, k + 2, Blocks.stone_brick_stairs, 0); this.setBlock(world, i + 3, j + 1, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 2, k + 3, Blocks.stone_slab2, 0); this.setBlock(world, i + 3, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 3, j + 3, k + 9, Blocks.glass_pane, 0); this.setBlock(world, i + 3, j + 4, k + 6, Blocks.planks, 0); this.setBlock(world, i + 3, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 3, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 3, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 3, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 4, j + 0, k + 0, Blocks.grass, 0); this.setBlock(world, i + 4, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 4, j + 1, k + 0, Blocks.stone_brick_stairs, 2); this.setBlock(world, i + 4, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 1, k + 3, Blocks.stone_brick_stairs, 2); this.setBlock(world, i + 4, j + 1, k + 4, Blocks.stone_slab, 3); this.setBlock(world, i + 4, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 1, k + 7, Blocks.stone_brick_stairs, 1); this.setBlock(world, i + 4, j + 1, k + 8, Blocks.stone_slab, 3); this.setBlock(world, i + 4, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 2, k + 6, Blocks.planks, 0); this.setBlock(world, i + 4, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 4, j + 3, k + 6, Blocks.planks, 0); this.setBlock(world, i + 4, j + 3, k + 9, Blocks.glass_pane, 0); this.setBlock(world, i + 4, j + 4, k + 6, Blocks.planks, 0); this.setBlock(world, i + 4, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 4, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 4, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 4, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 5, j + 0, k + 0, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 5, j + 1, k + 0, Blocks.log, 0); this.setBlock(world, i + 5, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 2, k + 0, Blocks.oak_fence, 0); this.setBlock(world, i + 5, j + 2, k + 1, Blocks.log, 0); this.setBlock(world, i + 5, j + 2, k + 2, Blocks.planks, 0); this.setBlock(world, i + 5, j + 2, k + 3, Blocks.planks, 0); this.setBlock(world, i + 5, j + 2, k + 4, Blocks.planks, 0); this.setBlock(world, i + 5, j + 2, k + 5, Blocks.planks, 0); this.setBlock(world, i + 5, j + 2, k + 6, Blocks.log, 0); this.setBlock(world, i + 5, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 5, j + 3, k + 1, Blocks.log, 0); this.setBlock(world, i + 5, j + 3, k + 2, Blocks.planks, 0); this.setBlock(world, i + 5, j + 3, k + 3, Blocks.glass_pane, 0); this.setBlock(world, i + 5, j + 3, k + 4, Blocks.glass_pane, 0); this.setBlock(world, i + 5, j + 3, k + 5, Blocks.planks, 0); this.setBlock(world, i + 5, j + 3, k + 6, Blocks.log, 0); this.setBlock(world, i + 5, j + 3, k + 9, Blocks.planks, 0); this.setBlock(world, i + 5, j + 4, k + 1, Blocks.log, 0); this.setBlock(world, i + 5, j + 4, k + 2, Blocks.planks, 0); this.setBlock(world, i + 5, j + 4, k + 3, Blocks.planks, 0); this.setBlock(world, i + 5, j + 4, k + 4, Blocks.planks, 0); this.setBlock(world, i + 5, j + 4, k + 5, Blocks.planks, 0); this.setBlock(world, i + 5, j + 4, k + 6, Blocks.log, 0); this.setBlock(world, i + 5, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 5, j + 5, k + 1, Blocks.log, 0); this.setBlock(world, i + 5, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 5, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 5, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 6, j + 0, k + 0, Blocks.stone_slab2, 0); this.setBlock(world, i + 6, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 6, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 1, k + 3, Blocks.stone_slab, 3); this.setBlock(world, i + 6, j + 1, k + 4, Blocks.stone_brick_stairs, 1); this.setBlock(world, i + 6, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 1, k + 6, Blocks.stone_slab, 3); this.setBlock(world, i + 6, j + 1, k + 7, Blocks.stone_brick_stairs, 0); this.setBlock(world, i + 6, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 2, k + 1, Blocks.planks, 0); this.setBlock(world, i + 6, j + 2, k + 2, Blocks.chest, 3); this.setBlock(world, i + 6, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 6, j + 3, k + 1, Blocks.planks, 0); this.setBlock(world, i + 6, j + 3, k + 9, Blocks.glass_pane, 0); this.setBlock(world, i + 6, j + 4, k + 1, Blocks.planks, 0); this.setBlock(world, i + 6, j + 4, k + 2, Blocks.furnace, 3); this.setBlock(world, i + 6, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 6, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 6, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 6, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 7, j + 0, k + 0, Blocks.stone_slab2, 0); this.setBlock(world, i + 7, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 7, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 5, Blocks.stone_slab, 3); this.setBlock(world, i + 7, j + 1, k + 6, Blocks.stone_brick_stairs, 2); this.setBlock(world, i + 7, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 2, k + 1, Blocks.planks, 0); this.setBlock(world, i + 7, j + 2, k + 2, Blocks.crafting_table, 0); this.setBlock(world, i + 7, j + 2, k + 8, Blocks.oak_stairs, 2); this.setBlock(world, i + 7, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 7, j + 3, k + 1, Blocks.planks, 0); this.setBlock(world, i + 7, j + 3, k + 9, Blocks.glass_pane, 0); this.setBlock(world, i + 7, j + 4, k + 1, Blocks.planks, 0); this.setBlock(world, i + 7, j + 4, k + 2, Blocks.furnace, 3); this.setBlock(world, i + 7, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 7, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 7, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 7, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 8, j + 0, k + 0, Blocks.stone_slab2, 0); this.setBlock(world, i + 8, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 8, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 3, Blocks.stone_brick_stairs, 3); this.setBlock(world, i + 8, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 2, k + 1, Blocks.planks, 0); this.setBlock(world, i + 8, j + 2, k + 2, Blocks.chest, 3); this.setBlock(world, i + 8, j + 2, k + 7, Blocks.oak_stairs, 0); this.setBlock(world, i + 8, j + 2, k + 8, Blocks.oak_stairs, 0); this.setBlock(world, i + 8, j + 2, k + 9, Blocks.planks, 0); this.setBlock(world, i + 8, j + 3, k + 1, Blocks.planks, 0); this.setBlock(world, i + 8, j + 3, k + 9, Blocks.planks, 0); this.setBlock(world, i + 8, j + 4, k + 1, Blocks.planks, 0); this.setBlock(world, i + 8, j + 4, k + 2, Blocks.furnace, 3); this.setBlock(world, i + 8, j + 4, k + 9, Blocks.planks, 0); this.setBlock(world, i + 8, j + 5, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 5, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 8, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 8, j + 6, k + 9, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 0, k + 0, Blocks.stone_slab2, 0); this.setBlock(world, i + 9, j + 0, k + 1, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 2, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 3, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 4, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 5, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 6, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 7, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 8, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 0, k + 9, Blocks.dirt, 0); this.setBlock(world, i + 9, j + 1, k + 1, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 1, k + 9, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 2, k + 1, Blocks.log, 0); this.setBlock(world, i + 9, j + 2, k + 2, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 3, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 4, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 5, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 6, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 7, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 8, Blocks.planks, 0); this.setBlock(world, i + 9, j + 2, k + 9, Blocks.log, 0); this.setBlock(world, i + 9, j + 3, k + 1, Blocks.log, 0); this.setBlock(world, i + 9, j + 3, k + 2, Blocks.planks, 0); this.setBlock(world, i + 9, j + 3, k + 3, Blocks.glass_pane, 0); this.setBlock(world, i + 9, j + 3, k + 4, Blocks.planks, 0); this.setBlock(world, i + 9, j + 3, k + 5, Blocks.glass_pane, 0); this.setBlock(world, i + 9, j + 3, k + 6, Blocks.planks, 0); this.setBlock(world, i + 9, j + 3, k + 7, Blocks.glass_pane, 0); this.setBlock(world, i + 9, j + 3, k + 8, Blocks.planks, 0); this.setBlock(world, i + 9, j + 3, k + 9, Blocks.log, 0); this.setBlock(world, i + 9, j + 4, k + 1, Blocks.log, 0); this.setBlock(world, i + 9, j + 4, k + 2, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 3, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 4, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 5, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 6, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 7, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 8, Blocks.planks, 0); this.setBlock(world, i + 9, j + 4, k + 9, Blocks.log, 0); this.setBlock(world, i + 9, j + 5, k + 1, Blocks.log, 0); this.setBlock(world, i + 9, j + 5, k + 2, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 3, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 4, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 5, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 6, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 7, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 8, Blocks.cobblestone, 0); this.setBlock(world, i + 9, j + 5, k + 9, Blocks.log, 0); this.setBlock(world, i + 9, j + 6, k + 1, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 2, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 3, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 4, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 5, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 6, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 7, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 8, Blocks.stone_slab, 0); this.setBlock(world, i + 9, j + 6, k + 9, Blocks.stone_slab, 0); return true; } }
January 27, 20169 yr An IBlockState will never be equal to an int . Use IBlockState#getBlock to get the Block represented by an IBlockState . There's no method called World#setDefaultState . World#setBlockState is the method you want. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
January 27, 20169 yr Author An IBlockState will never be equal to an int . Use IBlockState#getBlock to get the Block represented by an IBlockState . There's no method called World#setDefaultState . World#setBlockState is the method you want. So would it be : Block checkID = world.setBlockState(new BlockPos(i, j, k), IBlockState.getBlock, checkID); I simply cant figure it out.
January 27, 20169 yr Author Note: I've found a 1.8 tutorial on creating a structure. But it doesn't help much. My structure isn't loading within the world. How does one register and initialize it within the main class?
January 27, 20169 yr An IBlockState will never be equal to an int . Use IBlockState#getBlock to get the Block represented by an IBlockState . There's no method called World#setDefaultState . World#setBlockState is the method you want. So would it be : Block checkID = world.setBlockState(new BlockPos(i, j, k), IBlockState.getBlock, checkID); I simply cant figure it out. IBlockState#getBlock means that getBlock is an instance method of IBlockState . Call it on an instance of IBlockState to get its Block . Use World#getBlockState to get the IBlockState at the specified position. You can think of an IBlockState as a combination of a Block and its metadata value. Use GameRegistry.registerWorldGenerator to register an IWorldGenerator . Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
January 27, 20169 yr Author An IBlockState will never be equal to an int . Use IBlockState#getBlock to get the Block represented by an IBlockState . There's no method called World#setDefaultState . World#setBlockState is the method you want. So would it be : Block checkID = world.setBlockState(new BlockPos(i, j, k), IBlockState.getBlock, checkID); I simply cant figure it out. IBlockState#getBlock means that getBlock is an instance method of IBlockState . Call it on an instance of IBlockState to get its Block . Use World#getBlockState to get the IBlockState at the specified position. You can think of an IBlockState as a combination of a Block and its metadata value. Use GameRegistry.registerWorldGenerator to register an IWorldGenerator . GameRegistry.registerWorldGenerator would be put in the main class? Or the village class?
January 28, 20169 yr Registrations usually belong in one's main class (probably in init). Sometimes, for something client-only, a registration might belong in a client proxy. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
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.