For the Vault Hunters Minecraft Modpack
Sometimes when you mine a vault chest (Living, Ornate, Gilded or Coin Pile), the mining speed will bug out and prevent you from breaking the chest as fast as it should.
This occurs when you are falling or have stepped off a block (including slabs) while mining the chest. The bug persists until you either change tools, or try to mine another block instead.
This is caused by an inherent Minecraft game mechanic; when you are not on solid ground (e.g. flying, swimming, falling) the game will slow down your mining speed. This is to prevent players from mining blocks too quickly while in the air.
In theory, this means after the first "break" of the chest, the game should reset the mining speed penalty. However, in Vault Hunters, mining chests/coins occurs in "slices", popping an item out of the chest with each slice, the block isn't actually broken on slicing. Thus, any penalty applied to the first slice will propagate indefinitely.
This mod aims to fix this bug by simply negating the mining speed penalty when specifically mining vault chests if the player is falling. It ignores subsequent checks (i.e. does not check if it needs to reset the mining penalty) since the bug that causes the incorrect behaviour in the first place is used here to fix it.
We use the bug to fix the bug
This does not apply to wooden chests or strongboxes, as they are not affected by the bug (I think).
Requires the mod to be present on both clients and servers.