pull all items out of a docked dank using a hopper
use up the last item in construction mode
Slots unlocking themselves
There's also the issue that locked slots can unlock themselves by:
placing a Dank in a Dock
entering construction mode and changing the current slot (shift-scroll)
I'm not sure what the exact conditions are, but slots can randomly unlock themselves as well and even worse:
Locking does sometimes not actually lock the slot; it shows the slot is red, but opening the dank again shows it is unlocked.
When a slot is locked, you see the dank moving up in your hand as if you freshly picked it up. This is because the NBT has changed.
When slot locking doesn't work, this animation is missing, suggesting it doesn't set the NBT.
Steps to reproduce
Give yourself a fresh dank
Open it, notice the animation because NBT is added the first time
Place an item inside, this updates NBT
Lock the slot, this updates NBT
Close the dank
If you look at the NBT of the item, it should correctly have the item inside and the slot locked.
Open it again, this updates the NBT again(!) and the slot appears to be locked, but in reality it is already unlocked
At this point, trying to lock slots doesn't update NBT, but adding items does, which can be used to force slots to lock.
Locked slots can be emptied
Locking a slot should ensure that there's always 1 item left in that slot.
But you can:
Slots unlocking themselves
There's also the issue that locked slots can unlock themselves by:
I'm not sure what the exact conditions are, but slots can randomly unlock themselves as well and even worse: Locking does sometimes not actually lock the slot; it shows the slot is red, but opening the dank again shows it is unlocked.
When a slot is locked, you see the dank moving up in your hand as if you freshly picked it up. This is because the NBT has changed. When slot locking doesn't work, this animation is missing, suggesting it doesn't set the NBT.
Steps to reproduce
If you look at the NBT of the item, it should correctly have the item inside and the slot locked.
At this point, trying to lock slots doesn't update NBT, but adding items does, which can be used to force slots to lock.