/quick-mining

Allow MCBE players to mine the entire ore veins, trees, and more

Primary LanguageTypeScriptCreative Commons Zero v1.0 UniversalCC0-1.0

Quick Mining Addon

Quick Mining Addon logo

This is a Minecraft Bedrock addon for quickly mining ore veins and cutting the entire trees down. With this addon enabled, when a player mines a block, all the surrounding blocks with the same type break, which in turn causes other blocks surrounding them with the same type to break in a chain reaction.

Screen shot of cutting trees down Screen shot of mining coal vein

There are already plenty of similar addons out there, and this is yet another one joining the party. Why do we need more? What makes it different from others?

  1. It respects tool enchantments. Mining ores with Fortune pickaxes yields more. Unbreaking tools last longer. XP-producing blocks like Coal ores repair your Mending tools. Silk Touch may produce different kind of items depending on the block type.
  2. It consumes durability of your tools correctly. Most vein-mining addons let you mine the entire vein with consuming durability worth only one use of your tool. This addon consumes durability worth one use per block you mine, making it less overpowered.
  3. It decays leaves fast. Cutting logs with an axe also breaks leaves immediately, with no additional consumption of tool durability.
  4. It collects items and XP orbs for you. Items produced by mining blocks are directly placed in your inventory. The same goes for XP orbs, unless you have damaged Mending tools and armors.
  5. It is customizable. It comes with a configuration UI to let you customize the behavior of the addon, such as when to enable quick-mining, what kind of blocks should be quick-mined, and more.
  6. It can coexist with other addons. Modifying player.json is one of the greatest ways to make an addon incompatible with others. This addon doesn't do things like that. Custom tools added by other addons should also work as long as they have vanilla-compatible item tags.

Installation

  1. Enable the behavior pack on your world. This automatically enables its resource pack counterpart. Enabling it globally is not recommended.
  2. Enable Beta APIs in the experimental settings for your world.

Usage

Quick-mining happens when you mine blocks with a suitable tool while sneaking, such as cutting logs with an axe and mining ores with a pickaxe. You must use a correct tool for your task, that is, cutting trees with bare hand will not trigger quick-mining.

Special cases

  • Logs: Cutting non-stripped logs also breaks non-player-placed leaves surrounding them. This is a fast simulation of decaying so your axe don't lose durability for this, and its enchantments don't apply. If you want to gather leaf blocks, break them with shears or a Silk Touch hoe.
  • Mangrove trees: Cutting mangrove logs or roots cuts the entire mangrove tree down, including moss carpets touching them.
  • Azalea leaves: Breaking azalea leaves (flowering or not) also breaks the other variant.
  • Huge Mushrooms: Mining mushroom blocks (red or brown) also mines mushroom stems and vice versa.
  • Huge Nether Fungi: Mining nether wart blocks (warped or not) also mines surrounding shroomlights and vice versa.

Customization

Type ;qmine prefs on the chat screen, then close it. A customization UI will show up. These are per-player settings and do not affect any other players.

Screenshot of preferences UI

Protection settings:

  • Abort mining blocks when your named tool is about to break: With this option enabled, quick-mining will abort or will not trigger when the durability of your tool is depleting. This only applies to named tools.
  • Keep your ground blocks from getting quick-mined: This option protects blocks underneath the player from being quick-mined. Note it's not perfect. The addon does not take account of the type of block you are standing on, so you can still accidentally fall down if you are on a gravity-affected block such as sand, or one that requires supporting blocks like redstone repeater.
  • Prevent you from accidentally breaking Budding Amethyst in Survival: Budding Amethyst is not eligible for quick-mining in the first place, but this option also prevents you from accidentally mining them with or without any tools. This doesn't mean a perfect protection. You can still break them with TNT, and Creepers don't care the option at all. This option is disabled by default.

Loots settings:

  • Automatically collect items and XP orbs: Items produced by mining blocks are directly placed in your inventory as long as they fit. Overflowed items will be spawned as item entities at the same location as the player. Experience orbs go directly into any Mending equipment until they are fully repaired, and excess XP will go into the player.

Quick-mining mode:

  • When sneaking: Enable quick-mining only when the player is sneaking.
  • When not sneaking: Enable quick-mining only when the player is not sneaking.
  • Always: Always trigger quick-mining.
  • Never: Never trigger quick-mining.

Block coverage:

For server admins

Players with operator privileges can also change worldwide settings by typing ;qmine admin on the chat screen.

  • Time budget for quick-mining in milliseconds per tick: Setting this to higher values may speed up the process of quick-mining, but can cause severe server lags. MCBE addons are single-threaded, that is, addon scripts run on the same thread that ticks the server. This means addons cannot spend too much time in each game tick, so this addon measures the time it's taking and reschedules its remaining work for the next tick if it's going to take longer than this value. It is not recommended to change this value unless you know what you are doing.
  • Maximum horizontal distance for blocks to quick-mine, Maximum vertical distance for blocks to quick-mine: The range of blocks to be quick-mined is limited by these values. Setting them to higher values would allow players to cause a massive destruction.

Known issues

  • Hanging mangrove propagules aren't auto-collected. This is currently unfixable because their drop rate is not known to the community and thus we cannot simulate its loot table.
  • Quick-mining huge mushrooms with a non-silk-touch axe yields too many mushrooms. This happens because we don't know their drop rate accurately.
  • Tall variants of Grass and Fern cannot be quick-mined due to the way how they are implemented in the game. That is, replacing their upper half with minecraft:air causes their lower half to break, and we cannot collect loots from their lower halves. The same goes for tall flowers.
  • The addon lets players mine blocks without consuming their Hunger value. This is because the scripting API is currently not capable of allowing addons to manipulate hunger. You might consider it overpowered but you have to live with that.
  • Custom ores added by add-ons aren't quick-mined. This is because:
    1. There are no standard block tags for ore blocks representing the required tool tier,
    2. Loot tables are not accessible from the scripting API, and
    3. The API doesn't provide any means to simulate what would be dropped when a block is mined.

In short, these are issues that we can do absolutely nothing about. Ask Mojang to improve the API if you want these to be fixed.

Download

See releases.

Release notes

See NEWS.

Tested on

  • Minecraft Bedrock 1.20.51, M1 iPad Pro

Author

PHO

License

CC0 “No Rights Reserved”