For the Vault Hunters Minecraft Modpack
The Bug
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.
The Cause
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.
The Fix
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.
- If a client has it but not the server, the chest will appear to break at full speed on the client side, but will still be there on the server; it will pop back into existence after a second or two. (Technically this still kind-of helps, as the client starts mining the block behind it the moment the chest disappears, which resets the mining slowdown)
- If a server has it but not the client, nothing will happen. It should not prevent vanilla clients from joining the server