@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float par8,
float par9, float par10) {
if(world.getBlock(x, y, z) == EnderIO.blockFusedQuartz) {
TileEntityPaintedBlock tecb = (TileEntityPaintedBlock) world.getTileEntity(x, y, z);
if(tecb == null) {
return false;
}
tecb.setSourceBlock(PainterUtil.getSourceBlock(itemStack));
tecb.setSourceBlockMetadata(PainterUtil.getSourceBlockMetadata(itemStack));
world.markBlockForUpdate(x, y, z);
world.markBlockForUpdate(x, y, z);
if(!world.isRemote) {
if(!player.capabilities.isCreativeMode) {
itemStack.stackSize--;