} else if(par1ItemStack.stackSize == 0) {
return false;
} else if(!player.canPlayerEdit(x, y, z, side, par1ItemStack)) {
return false;
} else {
Block i1 = world.getBlock(x, y, z);
int j1 = world.getBlockMetadata(x, y, z);
int k1 = j1 & 7;
boolean flag = (j1 & 8) != 0;
if((side == 1 && !flag || side == 0 && flag) && i1 == EnderIO.blockPaintedSlab && k1 == par1ItemStack.getItemDamage()) {
if(world.checkNoEntityCollision(EnderIO.blockPaintedDoubleSlab.getCollisionBoundingBoxFromPool(world, x, y, z))) {
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityPaintedSlab) {
((TileEntityPaintedSlab) te).isConvertingToFullBlock = true;
}
if(world.setBlock(x, y, z, EnderIO.blockPaintedDoubleSlab, k1, 3)) {
te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityPaintedBlock) {
Block b = PainterUtil.getSourceBlock(par1ItemStack);
TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;
tef.setSourceBlock(b);
tef.setSourceBlockMetadata(PainterUtil.getSourceBlockMetadata(par1ItemStack));
world.markBlockForUpdate(x, y, z);
}