Java Code Examples for net.minecraft.init.Blocks#stonebrick()

The following examples show how to use net.minecraft.init.Blocks#stonebrick() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: Chisel   File: Carving.java    License: GNU General Public License v2.0 6 votes vote down vote up
public CarvingGroup getGroup(Block block, int metadata)
{
    if(block.equals(Blocks.stone))
        block = Blocks.stonebrick;

    // Check name first
    CarvingGroup res;
    int i = OreDictionary.getOreID(block.getUnlocalizedName());
    if(i < 1)
        return null;

    //if((res = carvingGroupsByOre.get(OreDictionary.getOreIDs(new ItemStack(block, 1, metadata)))) != null)
    //    return res;

    if((res = carvingGroupsByVariation.get(key(block, metadata))) != null)
        return res;

    return null;
}
 
Example 2
Source Project: GardenCollection   File: BlockWindowBoxStone.java    License: MIT License 5 votes vote down vote up
public Block getBlockFromMeta (int meta) {
    switch (meta) {
        case 0: return Blocks.stone_slab;
        case 1: return Blocks.stonebrick;
        case 2: return Blocks.stonebrick;
        case 3: return Blocks.brick_block;
        case 4: return Blocks.nether_brick;
        case 5: return Blocks.sandstone;
        default: return null;
    }
}
 
Example 3
Source Project: GardenCollection   File: ItemMossPaste.java    License: MIT License 4 votes vote down vote up
@Override
public boolean onItemUse (ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
    Block block = world.getBlock(x, y, z);
    int meta = world.getBlockMetadata(x, y, z);

    Block newBlock = null;
    int newMeta = -1;

    if (block == Blocks.stonebrick) {
        if (meta == 0)
            newMeta = 1;
        else if (meta == 1) {
            newBlock = ModBlocks.mossBrick;
            newMeta = 0;
        }
        else if (meta == 2) {
            newBlock = ModBlocks.mossBrick;
            newMeta = 3;
        }
    }
    else if (block == ModBlocks.mossBrick) {
        if (meta == 0)
            newMeta = 1;
        if (meta == 1)
            newMeta = 2;
        if (meta == 3)
            newMeta = 4;
        if (meta == 4)
            newMeta = 5;
        if (meta == 5)
            newMeta = 6;
    }
    else if (block == Blocks.cobblestone) {
        if (meta == 0) {
            newBlock = Blocks.mossy_cobblestone;
            newMeta = 0;
        }
    }

    if (newBlock != null) {
        world.setBlock(x, y, z, newBlock);
    }
    if (newMeta != -1) {
        world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
        itemStack.damageItem(1, player);

        return true;
    }

    return super.onItemUse(itemStack, player, world, x, y, z, side, hitX, hitY, hitZ);
}
 
Example 4
Source Project: archimedes-ships   File: ArchimedesConfig.java    License: MIT License 4 votes vote down vote up
public void loadAndSave()
{
	Block[] defaultBlockBlacklist = { (Blocks.dirt), (Blocks.grass), (Blocks.sand), (Blocks.gravel), (Blocks.clay), (Blocks.ice), (Blocks.water), (Blocks.flowing_water), (Blocks.flowing_lava), (Blocks.lava), (Blocks.snow), Blocks.snow_layer, (Blocks.waterlily), (Blocks.netherrack), (Blocks.soul_sand), Blocks.tallgrass };
	Block[] defaultBlocksWhitelist = { Blocks.acacia_stairs, Blocks.activator_rail, Blocks.anvil, Blocks.bed, Blocks.birch_stairs, Blocks.bookshelf, Blocks.brewing_stand, Blocks.brick_block, Blocks.brick_stairs, Blocks.cactus, Blocks.cake, Blocks.carpet, Blocks.coal_block, Blocks.cobblestone, Blocks.cobblestone_wall, Blocks.command_block, Blocks.crafting_table, Blocks.dark_oak_stairs, Blocks.detector_rail, Blocks.diamond_block, Blocks.dispenser, Blocks.dropper, Blocks.daylight_detector, Blocks.double_stone_slab, Blocks.double_wooden_slab, Blocks.emerald_block, Blocks.enchanting_table, Blocks.end_stone, Blocks.ender_chest, Blocks.fence, Blocks.fence_gate, Blocks.flower_pot, Blocks.furnace, Blocks.fire, Blocks.glass, Blocks.glass_pane, Blocks.glowstone, Blocks.gold_block, Blocks.golden_rail, Blocks.hardened_clay, Blocks.hay_block, Blocks.heavy_weighted_pressure_plate, Blocks.hopper, Blocks.iron_bars, Blocks.iron_block, Blocks.iron_door, Blocks.jukebox, Blocks.jungle_stairs, Blocks.ladder, Blocks.lapis_block, Blocks.lever, Blocks.light_weighted_pressure_plate, Blocks.lit_furnace, Blocks.lit_pumpkin, Blocks.lit_redstone_lamp, Blocks.log, Blocks.log2, Blocks.melon_block, Blocks.mob_spawner, Blocks.monster_egg, Blocks.mossy_cobblestone, Blocks.nether_brick, Blocks.nether_brick_fence, Blocks.nether_brick_stairs, Blocks.noteblock, Blocks.oak_stairs, Blocks.obsidian, Blocks.planks, Blocks.pumpkin, Blocks.piston, Blocks.piston_extension, Blocks.piston_head, Blocks.powered_comparator, Blocks.powered_repeater, Blocks.quartz_block, Blocks.quartz_stairs, Blocks.rail, Blocks.redstone_block, Blocks.redstone_torch, Blocks.redstone_wire, Blocks.sandstone, Blocks.sandstone_stairs, Blocks.skull, Blocks.sponge, Blocks.spruce_stairs, Blocks.stained_hardened_clay, Blocks.standing_sign, Blocks.stone_brick_stairs, Blocks.stone_button, Blocks.stone_pressure_plate, Blocks.stone_stairs, Blocks.stonebrick, Blocks.stained_glass, Blocks.stained_glass_pane, Blocks.sticky_piston, Blocks.stone_slab, Blocks.tnt, Blocks.torch, Blocks.trapdoor, Blocks.trapped_chest, Blocks.tripwire, Blocks.tripwire_hook, Blocks.unlit_redstone_torch, Blocks.unpowered_comparator, Blocks.unpowered_repeater, Blocks.wall_sign, Blocks.web, Blocks.wooden_button, Blocks.wooden_door, Blocks.wooden_pressure_plate, Blocks.wool, Blocks.wooden_slab };
	Block[] defaultOverwritableBlocks = { Blocks.tallgrass, Blocks.waterlily };
	String[] defaultMaterialDensities = { "\"minecraft:air=0.0\"", "\"minecraft:wool=0.1\"" };
	String[] defaultBlockDensities = { "\"ArchimedesShips:floater=0.04\"", "\"ArchimedesShips:balloon=0.02\"" };
	
	String[] blockblacklistnames = new String[defaultBlockBlacklist.length];
	for (int i = 0; i < defaultBlockBlacklist.length; i++)
	{
		blockblacklistnames[i] = Block.blockRegistry.getNameForObject(defaultBlockBlacklist[i]);
	}
	
	String[] blockwhitelistnames = new String[6 + defaultBlocksWhitelist.length];
	for (int i = 0; i < blockwhitelistnames.length - 6; i++)
	{
		blockwhitelistnames[i] = Block.blockRegistry.getNameForObject(defaultBlocksWhitelist[i]);
	}
	blockwhitelistnames[blockwhitelistnames.length - 6] = "ArchimedesShips:marker";
	blockwhitelistnames[blockwhitelistnames.length - 5] = "ArchimedesShips:floater";
	blockwhitelistnames[blockwhitelistnames.length - 4] = "ArchimedesShips:balloon";
	blockwhitelistnames[blockwhitelistnames.length - 3] = "ArchimedesShips:gauge";
	blockwhitelistnames[blockwhitelistnames.length - 2] = "ArchimedesShips:seat";
	blockwhitelistnames[blockwhitelistnames.length - 1] = "ArchimedesShips:engine";
	
	String[] overwritableblocksnames = new String[defaultOverwritableBlocks.length];
	for (int i = 0; i < defaultOverwritableBlocks.length; i++)
	{
		overwritableblocksnames[i] = Block.blockRegistry.getNameForObject(defaultOverwritableBlocks[i]);
	}
	
	config.load();
	
	shipEntitySyncRate = config.get("settings", "sync_rate", 20, "The amount of ticks between a server-client synchronization. Higher numbers reduce network traffic. Lower numbers increase multiplayer experience. 20 ticks = 1 second").getInt();
	enableAirShips = config.get("settings", "enable_air_ships", true, "Enable or disable air ships.").getBoolean(true);
	useNewAlgorithm = config.get("settings", "use_iterative_assemble_algorithm", false, "New assemble algorithm implemented in v1.6.2. Allows for larger ships but is a heavier load for CPU.").getBoolean(false);
	bankingMultiplier = (float) config.get("settings", "banking_multiplier", 3d, "A multiplier for how much ships bank while making turns. Set a positive value for passive banking or a negative value for active banking. 0 disables banking.").getDouble(3d);
	
	shipControlType = config.get("control", "control_type", CONTROL_TYPE_ARCHIMEDES, "Set to 0 to use vanilla boat controls, set to 1 to use the new Archimedes controls.").getInt();
	turnSpeed = (float) config.get("control", "turn_speed", 1D, "A multiplier of the ship's turn speed.").getDouble(1D);
	speedLimit = (float) config.get("control", "speed_limit", 30D, "The maximum velocity a ship can have, in blocks per second. This does not affect acceleration.").getDouble(30D);
	speedLimit /= 20F;
	disassembleOnDismount = config.get("control", "decompile_on_dismount", false).getBoolean(false);
	
	maxShipChunkBlocks = config.get("mobile_chunk", "max_chunk_blocks", 2048, "The maximum amount of blocks that a mobile ship chunk may contain.").getInt();
	//maxShipChunkBlocks = Math.min(maxShipChunkBlocks, 3400);
	flyBalloonRatio = (float) config.get("mobile_chunk", "airship_balloon_ratio", 0.4D, "The part of the total amount of blocks that should be balloon blocks in order to make an airship.").getDouble(0.4D);
	connectDiagonalBlocks1 = config.get("mobile_chunk", "connect_diagonal_blocks_1", false, "Blocks connected diagonally on one axis will also be added to the ship if this value is set to 'true'.").getBoolean(false);
	useWhitelist = config.get("mobile_chunk", "use_whitelist", false, "Switch this property to select the block restriction list to use. 'true' for the 'allowed_blocks' whitelist, 'false' for the 'forbidden_blocks' blacklist.").getBoolean(false);
	String[] forbiddenblocks = config.get("mobile_chunk", "forbidden_blocks", blockblacklistnames, "A list of blocks that will not be added to a ship.").getStringList();
	String[] allowedblocks = config.get("mobile_chunk", "allowed_blocks", blockwhitelistnames, "A list of blocks that are allowed on a ship.").getStringList();
	String[] overwritableblocks = config.get("mobile_chunk", "overwritable_blocks", overwritableblocksnames, "A list of blocks that may be overwritten when decompiling a ship.").getStringList();
	Collections.addAll(blockBlacklist, forbiddenblocks);
	Collections.addAll(blockWhitelist, allowedblocks);
	Collections.addAll(overwritableBlocks, overwritableblocks);
	
	loadedBlockDensities = config.get("mobile_chunk", "block_densities", defaultBlockDensities, "A list of pairs of a block with a density value. This list overrides the 'material_densities' list.").getStringList();
	loadedMaterialDensities = config.get("mobile_chunk", "material_densities", defaultMaterialDensities, "A list of pairs of a material with a density value. The first value is the name of a block. All blocks with the same material will get this density value, unless overridden.").getStringList();
	
	if (FMLCommonHandler.instance().getSide().isClient())
	{
		loadKeybindings();
	}
	
	config.save();
}
 
Example 5
Source Project: Artifacts   File: BlockArtifactsPressurePlate.java    License: MIT License 4 votes vote down vote up
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
{
	if(this.camouflaged) {

		if(side != 1) {
			return this == camoStone ? Blocks.stone.getBlockTextureFromSide(0) : this == camoObsidian ? Blocks.obsidian.getBlockTextureFromSide(0) : Blocks.planks.getBlockTextureFromSide(0);
		}

		IIcon icon = this.blockIcon;
		Block block = world.getBlock(x, y-1, z);
		int meta = world.getBlockMetadata(x, y-1, z);

		if(block != null) {
			if(block == BlockTrap.instance) {
				int[] blockToCopyLocation = BlockTrap.getNeighbourBlockPosition(world, x, y-1, z, block, meta);
				Block blockToCopy = Blocks.stonebrick;
				int metaToCopy = 0;
				if(! (blockToCopyLocation[0] == x && blockToCopyLocation[1] == y && blockToCopyLocation[2] == z )) {
					blockToCopy = world.getBlock(blockToCopyLocation[0], blockToCopyLocation[1], blockToCopyLocation[2]);
					metaToCopy = world.getBlockMetadata(blockToCopyLocation[0], blockToCopyLocation[1], blockToCopyLocation[2]);
				}
				return blockToCopy.getIcon(side, metaToCopy);
			}
			else if(block != this && block.isOpaqueCube()) {
				icon = block.getIcon(side, meta);
				if(icon != null) {
					return icon;
				}
			}
			else if(block == BlockIllusionary.instance) {
				return block.getIcon(world, x, y-1, z, side);
				
			}
		}
	}

	//If it fails, return default icon.
			return super.getIcon(world, x, y, z, side);

}
 
Example 6
Source Project: Artifacts   File: BlockTrap.java    License: MIT License 4 votes vote down vote up
public static int[] getNeighbourBlockPosition(IBlockAccess world, int x, int y, int z, Block block, int blockMeta) {
  	
  	int xOffset = 0;
int zOffset = 0;
switch(blockMeta) {
	case 0: 
       case 2:
       case 3:
       	xOffset = 1;
       	break;
       case 1:
       case 4:
       case 5:
       	zOffset = 1;
       	break;
   }
int metaToCopy = 0;
Block adjacentBlock1 = world.getBlock(x + xOffset, y, z + zOffset);
Block adjacentBlock2 = world.getBlock(x - xOffset, y, z - zOffset);
Block blockToCopy = Blocks.stonebrick;
if(adjacentBlock1 != block && adjacentBlock1 != null && adjacentBlock1.isOpaqueCube()) {
	return new int[]{x + xOffset, y, z + zOffset};
}
else if(adjacentBlock2 != block && adjacentBlock2 != null && adjacentBlock2.isOpaqueCube()) {
	return new int[]{x - xOffset, y, z - zOffset};
}
else {
	if(blockMeta <= 1) {
		adjacentBlock1 = world.getBlock(x + zOffset, y, z + xOffset);
		adjacentBlock2 = world.getBlock(x - zOffset, y, z - xOffset);
		if(adjacentBlock1 != block && adjacentBlock1 != null && adjacentBlock1.isOpaqueCube()) {
			return new int[]{x + zOffset, y, z + xOffset};
		}
		else if(adjacentBlock2 != block && adjacentBlock2 != null && adjacentBlock2.isOpaqueCube()) {
			return new int[]{x - zOffset, y, z - xOffset};
		}
	}
	else {
		adjacentBlock1 = world.getBlock(x, y+1, z);
		adjacentBlock2 = world.getBlock(x, y-1, z);
		if(adjacentBlock1 != block && adjacentBlock1 != null && adjacentBlock1.isOpaqueCube()) {
			return new int[]{x, y+1, z};
		}
		else if(adjacentBlock2 != block && adjacentBlock2 != null && adjacentBlock2.isOpaqueCube()) {
			return new int[]{x, y-1, z};
		}
	}
}

return new int[]{x, y, z};
  }
 
Example 7
Source Project: Artifacts   File: BlockWallPlate.java    License: MIT License 4 votes vote down vote up
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
{
	if(this.camouflage) {
		
		IIcon icon = this.blockIcon;
		Block block = Blocks.air;
		int bMeta = 0;
		int bx = x;
		int bz = z;
		int meta = world.getBlockMetadata(x, y, z) & 0x07;

		if (meta == 2 && side == 2)
		{
			block = world.getBlock(x, y, z+1);
			bMeta = world.getBlockMetadata(x, y, z+1);
			bz = z+1;
		}
		else if (meta == 3 && side == 3)
		{
			block = world.getBlock(x, y, z-1);
			bMeta = world.getBlockMetadata(x, y, z-1);
			bz = z-1;
		}
		else if (meta == 4 && side == 4)
		{
			block = world.getBlock(x+1, y, z);
			bMeta = world.getBlockMetadata(x+1, y, z);
			bx = x+1;
		}
		else if (meta == 5 && side == 5)
		{
			block = world.getBlock(x-1, y, z);
			bMeta = world.getBlockMetadata(x-1, y, z);
			bx = x-1;
		}
		else {
			block = this == camoStone ? Blocks.stone : this == camoObsidian ? Blocks.obsidian : Blocks.planks;
			bMeta = 0;
		}
		
		if(block != null) {
			if(block == BlockTrap.instance) {
				int[] blockToCopyLocation = BlockTrap.getNeighbourBlockPosition(world, bx, y, bz, block, bMeta);
				Block blockToCopy = Blocks.stonebrick;
				int metaToCopy = 0;
				if(! (blockToCopyLocation[0] == x && blockToCopyLocation[1] == y && blockToCopyLocation[2] == z )) {
					blockToCopy = world.getBlock(blockToCopyLocation[0], blockToCopyLocation[1], blockToCopyLocation[2]);
					metaToCopy = world.getBlockMetadata(blockToCopyLocation[0], blockToCopyLocation[1], blockToCopyLocation[2]);
				}
				return blockToCopy.getIcon(side, metaToCopy);
			}
			else if(block != this && block.isOpaqueCube()) {
				icon = block.getIcon(side, bMeta);
				if(icon != null) {
					return icon;
				}
			}
			else if(block == BlockIllusionary.instance) {
				return block.getIcon(world, bx, y, bz, side);
			}
		}
	}
	
	//If it fails, return default icon.
	return super.getIcon(world, x, y, z, side);

}
 
Example 8
Source Project: Artifacts   File: PlaceTraps.java    License: MIT License 4 votes vote down vote up
private Vec3[] locateStrongholdCorridor(World world, int x, int y, int z) {
	if(world.getBlock(x, y+1, z) == Blocks.air) {
		if(world.getBlock(x+1, y+1, z) == Blocks.air && world.getBlock(x-1, y+1, z) == Blocks.air && world.getBlock(x, y+1, z+1) == Blocks.air && world.getBlock(x, y+1, z-1) == Blocks.air) {
			if(world.getBlock(x+1, y+1, z+1) == Blocks.air && world.getBlock(x+1, y+1, z-1) == Blocks.air && world.getBlock(x-1, y+1, z+1) == Blocks.air && world.getBlock(x-1, y+1, z-1) == Blocks.air) {
				return new Vec3[]{Vec3.createVectorHelper(x, y, z),Vec3.createVectorHelper(0, 0, 0)};
			}
			else {
				if(world.getBlock(x+1, y+1, z+1) == Blocks.stonebrick) {
					return locateStrongholdCorridor(world,x+1, y+1, z+1);
				}
				else if(world.getBlock(x+1, y+1, z-1) == Blocks.stonebrick) {
					return locateStrongholdCorridor(world,x+1, y+1, z-1);
				}
				else if(world.getBlock(x-1, y+1, z+1) == Blocks.stonebrick) {
					return locateStrongholdCorridor(world,x-1, y+1, z+1);
				}
				else if(world.getBlock(x-1, y+1, z-1) == Blocks.stonebrick) {
					return locateStrongholdCorridor(world,x-1, y+1, z-1);
				}
			}
		}
		else if(world.getBlock(x+1, y+1, z) == Blocks.air && world.getBlock(x, y+1, z+1) == Blocks.air && world.getBlock(x+2, y+1, z) == Blocks.air && world.getBlock(x, y+1, z+2) == Blocks.air && world.getBlock(x+1, y+1, z+1) == Blocks.air) {
			return new Vec3[]{Vec3.createVectorHelper(x+1, y, z+1),Vec3.createVectorHelper(-1, 0, -1)};
		}
		else if(world.getBlock(x-1, y+1, z) == Blocks.air && world.getBlock(x, y+1, z+1) == Blocks.air && world.getBlock(x-2, y+1, z) == Blocks.air && world.getBlock(x, y+1, z+2) == Blocks.air && world.getBlock(x-1, y+1, z+1) == Blocks.air) {
			return new Vec3[]{Vec3.createVectorHelper(x-1, y, z+1),Vec3.createVectorHelper(1, 0, -1)};
		}
		else if(world.getBlock(x+1, y+1, z) == Blocks.air && world.getBlock(x, y+1, z-1) == Blocks.air && world.getBlock(x+2, y+1, z) == Blocks.air && world.getBlock(x, y+1, z-2) == Blocks.air && world.getBlock(x+1, y+1, z-1) == Blocks.air) {
			return new Vec3[]{Vec3.createVectorHelper(x+1, y, z-1),Vec3.createVectorHelper(-1, 0, 1)};
		}
		else if(world.getBlock(x-1, y+1, z) == Blocks.air && world.getBlock(x, y+1, z-1) == Blocks.air && world.getBlock(x-2, y+1, z) == Blocks.air && world.getBlock(x, y+1, z-2) == Blocks.air && world.getBlock(x-1, y+1, z-1) == Blocks.air) {
			return new Vec3[]{Vec3.createVectorHelper(x-1, y, z-1),Vec3.createVectorHelper(-1, 0, -1)};
		}
	}
	else if(world.getBlock(x, y+1, z) == Blocks.stonebrick) {
		y++;
		if(world.getBlock(x+1, y, z) == Blocks.air) {
			return locateStrongholdCorridor(world, x+1, y-1, z);
		}
		else if(world.getBlock(x-1, y, z) == Blocks.air) {
			return locateStrongholdCorridor(world, x-1, y-1, z);
		}
		else if(world.getBlock(x, y, z+1) == Blocks.air) {
			return locateStrongholdCorridor(world, x, y-1, z+1);
		}
		else if(world.getBlock(x, y, z-1) == Blocks.air) {
			return locateStrongholdCorridor(world, x, y-1, z-1);
		}
		else {
			if(world.getBlock(x+1, y, z+1) == Blocks.air) {
				return locateStrongholdCorridor(world, x+1, y-1, z+1);
			}
			else if(world.getBlock(x-1, y, z+1) == Blocks.air) {
				return locateStrongholdCorridor(world, x-1, y-1, z+1);
			}
			else if(world.getBlock(x-1, y, z-1) == Blocks.air) {
				return locateStrongholdCorridor(world, x-1, y-1, z-1);
			}
			else if(world.getBlock(x+1, y, z-1) == Blocks.air) {
				return locateStrongholdCorridor(world, x+1, y-1, z-1);
			}
		}
	}
	return null;
}
 
Example 9
Source Project: Artifacts   File: PlaceTraps.java    License: MIT License 4 votes vote down vote up
private boolean generateStrongholdTrap(Random rand, World world, Vec3[] center) {
	boolean ret = false;
	if(center != null) {
		int x = MathHelper.floor_double(center[0].xCoord);
		int y = MathHelper.floor_double(center[0].yCoord);
		int z = MathHelper.floor_double(center[0].zCoord);
		// = MathHelper.floor_double(center[1].xCoord*2)
		if(MathHelper.floor_double(center[1].xCoord) != 0 && world.getBlock(x+MathHelper.floor_double(center[1].xCoord*2), y+1, z) == Blocks.stonebrick) {
			
		}
		else if(MathHelper.floor_double(center[1].xCoord) != 0 && world.getBlock(x-MathHelper.floor_double(center[1].xCoord*2), y+1, z) == Blocks.stonebrick) {
			center[1].xCoord *= -1;
		}
		else {
			center[1].xCoord = 0;
		}
		if(MathHelper.floor_double(center[1].zCoord) != 0 && world.getBlock(x, y+1, z+MathHelper.floor_double(center[1].zCoord*2)) == Blocks.stonebrick) {
			
		}
		else if(MathHelper.floor_double(center[1].zCoord) != 0 && world.getBlock(x, y+1, z-MathHelper.floor_double(center[1].zCoord*2)) == Blocks.stonebrick) {
			center[1].zCoord *= -1;
		}
		else {
			center[1].zCoord = 0;
		}
		int r = rand.nextInt(6);
		//r = 5;
		if(MathHelper.floor_double(center[1].xCoord) == 0 && MathHelper.floor_double(center[1].zCoord) == 0 && r > 4) {
			r = rand.nextInt(5);
		}
		
		switch(r) {
			case 0:
			case 1:
				ret = simpleTrap(rand, world, center[0]);
				break;
			case 2:
			case 3:
				ret = spikedPit(rand, world, center[0]);
				break;
			case 4:
				ret = coveredSpikedPit(rand, world, center[0], Blocks.stonebrick, -3);
				break;
			case 5:
				ret = trapChest(rand, world, center);
				break;
		}
		//if(ret)
			//System.out.println(r + ":" + MathHelper.floor_double(center[0].xCoord) + " " + MathHelper.floor_double(center[0].yCoord) + " " + MathHelper.floor_double(center[0].zCoord));
	}
	return ret;
}