package info.jbcs.minecraft.chisel;

import net.minecraft.block.Block;
import net.minecraft.world.World;

public class BlockMarbleSlab extends BlockMarble {
	Block master;

	public BlockMarbleSlab(String name,int i, Block m) {
		super(name,i);
		
		setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);

		master = m;
	}

	@Override
	public void onBlockAdded(World world, int i, int j, int k) {
		int l = world.getBlockId(i, j - 1, k);
		int i1 = world.getBlockMetadata(i, j, k);
		int j1 = world.getBlockMetadata(i, j - 1, k);
		if (i1 != j1)
			return;
		if (l == blockID) {
			world.setBlock(i, j, k, 0);
			world.setBlock(i, j - 1, k, master.blockID, i1, 0x02);
		}
	}

	@Override
	public boolean isOpaqueCube() {
		return false;
	}

	@Override
	public int getRenderBlockPass() {
		return 0;
	}
}
