CustomBlock cb = MaterialData.getCustomBlock(damage);
if (cb != null && isReplaceable(block.getType())) {
BlockState oldState = block.getState();
block.setTypeIdAndData(cb.getBlockId(), (byte)(cb.getBlockData()), true);
cb.onBlockPlace(block.getWorld(), block.getX(), block.getY(), block.getZ(), player);
int rot = Math.round(player.getLocation().getYaw() + 45 % 360);
boolean mirrored = player.getLocation().getPitch() < -45;
if (rot < 0 ) {
rot += 360;