1.19.2 dankless dock drain
kreezxil opened this issue · 6 comments
Discovered a repeatable issue with the dock, and may or may not have anything to-do item pipez from the Pipez mod.
When removing the dank from a dock, the dock will sometimes get confused and think there is a dank of the same frequency in it. This allows you to drain your active dank in the field without having to worry about the dock having a dank of the same frequency within itself.
Sorry, that was a long moment, had to run my mom to the ER. She's ok now. It wasn't major, but it certainly seemed major at the time.
When right clicking the dock, this is called
Dank-Storage/src/main/java/tfar/dankstorage/block/DockBlock.java
Lines 82 to 94 in 35859c3
which calls
Dank-Storage/src/main/java/tfar/dankstorage/blockentity/DockBlockEntity.java
Lines 174 to 242 in 35859c3
and the get caps is
Dank-Storage/src/main/java/tfar/dankstorage/blockentity/DockBlockEntity.java
Lines 253 to 255 in 35859c3
which calls
so if you ask for IItemHandler capability with a dank in it, you get a reference to the DankInventory object, but when the contents changes the pipe mod still has a reference to the DankInventory since invalidateCaps is not being called by dank when the inventory changes.
This is similar to this issue
JDKDigital/productivemetalworks#28
Adding a call to invalidateCaps in removeDankWithoutItemSpawn will fix it I think since that method is called when adding and removing a dank from the dock
Dank-Storage/src/main/java/tfar/dankstorage/block/DockBlock.java
Lines 84 to 87 in 35859c3

