I am adding block behavior to every block on start (haven't found another way to control mining speed yet. Been told this is not a great solution) that intends to control mining speed based on the position of the block. I simplified to this function to see if it will work:
public override float GetMiningSpeedModifier(IWorldAccessor world, BlockPos pos, IPlayer player) { return 0.001f; }
But still blocks are broken at the same mining speed. Some functions like OnBlockBroken seems to work, and others like OnBlockBreaking don't seem do be giving any output. In the discord someone said certain block behavior functions are just not called by the block class.
Any alternatives to this? Ways to control mining speed programmatically?
If it helps, I am making a mod like Minecraft factions. I am storing the positions of claims, and if the player is breaking a block inside a claimed chunk, their mining speed is drastically reduced.