@Override
public ActionResultType onItemUse(ItemUseContext context) {
if(context.getWorld().getBlockState(context.getPos()).getBlock()==Blocks.BEDROCK) {
context.getWorld().setBlockState(context.getPos(), BlockInit.busted_bedrock.getDefaultState());
context.getItem().damageItem(10000, context.getPlayer(), player -> {});
}
return ActionResultType.PASS;
}
This works fine, but with another player, they don't see the block change unless they left or right click it.
Not including a flag defaults to 3, which should update the block and send the change to clients.