βοΈMining Speed
Learn how the block hardness setting works and how to use it
Mining speed is a drop setting, but it is often misunderstood. To help with this, I have created a dedicated page in the wiki.
How It Works
As you may or may not know, you can't actually change how fast a block breaks in Minecraft using plugins. Just like you can't actually add new blocks using plugins. So the way block hardness (the system I created to power the mining speed setting), works is essentially by creating a new breaking system.
For the system to work, the player can't be allowed to normally break a block, otherwise, block breaking particles will be displayed client side and ruin the effect. Thus, we have to allow them to interact with the block, but not display the block breaking particles somehow. I'm sure there are other ways, but the most popular, which seems to be used a lot on popular servers like Hypixel, CosmicPrisons, etc. is giving the player Mining Fatigue -1. This doesn't actually affect the player's swing speed, but it does exactly what we need. It prevents block breaking particles while allowing block interactions. Now that the player can't display particles but can interact with the block, they can normally swing their pickaxe when mining a block, but we'll need to display the breaking particles ourselves. This is where the magic happens, if we can display the particles ourselves, we can also decide the break speed ourselves. Then, once the particles reach the last display interval, (10th break stage), we can break the block.
TLDR;
Players must avoid normal block-breaking to prevent distracting particles. Giving them Mining Fatigue -1 allows block interaction without particles, and does not affect swing speed. This method is used on popular servers like Hypixel and CosmicPrisons.
Using The Setting
As we established, the setting requires mining fatigue to work properly, so CustomDrops automatically applies it in two scenarios:
Mine speed setting is only enabled when a BlockDrop has the setting set to a value greater than 0.
Only blocks defined in CustomDrops will be mineable if the setting is enabled and the player meets the criteria below.
Player enters/is in a region assigned to any drop with the setting enabled.
Player enters/is in a global region world. (If a drop with the setting enabled has the global region added, and the world isn't on the blacklist).
Last updated