SuperFactoryManager icon indicating copy to clipboard operation
SuperFactoryManager copied to clipboard

SFM broken with dank storages

Open Rrett opened this issue 1 year ago • 2 comments

using sfm v4.19

using dank storage v13

When you push a label to a dank storage in a dock, it permanently binds that specific label to the dank whether the dank is in the dock or in your inventory

Also, when you re push the same label to a chest instead, the label stays bound to dank storage in your inventory.

Also, pulling from a dank does work with filters, but the retain feature and importing items into the dank is completely broken. There's no point really describing it other than the interaction with SFM and Dank storage does NOT work as intended. This is very obvious as soon as you try and import items or export items.

I will say though, im actually super impressed this isn't crashing the game horribly so to whoever programed that crash prevention good job

Rrett avatar Oct 13 '24 23:10 Rrett

are you pushing the labels to the manager? can you provide a video?

TeamDman avatar Oct 14 '24 14:10 TeamDman

I have also run into this issue in ATM9 on version 4.20.0. Here is a video of the issue. https://github.com/user-attachments/assets/a24f2d91-0f3c-430d-b3db-5327cf4a6eb9

When I put the dank in the dock, items are not extracted until I rebuild the cable network. Once I do that, the items start coming out, even if the dank is not in the dock. I have to rebuild the cable network with the dank outside the dock to prevent items from coming out of the dank. Let me know if you need more information. Thanks!

Edit: here is my code

name "smelting"

every 20 ticks do
    input from dock top side
    output with #forge:raw_materials to each furnace top side
forget
    input from each furnace bottom side
    output to barrel
end

ModestTG avatar Mar 24 '25 14:03 ModestTG

regarding SFM still inserting when the dank is removed from the dock, this is a problem with the dank mod not calling invalidateCaps

https://github.com/Tfarcenim/Dank-Storage/issues/206


regarding SFM not playing nice with dank and RETAIN keyword

I found https://github.com/Tfarcenim/Dank-Storage/issues/192 which seems close but I don't think it's what's happening.

I was able to confirm that the inventory is properly exposing the item count

Image

Image

and confirmed using RETAIN worked

Image

Image

I suspect the majority of the problems are from the dock not calling invalidateCaps, I left the dank mod author a comment in the dank/206 issue.

For now, you can mitigate this by clicking the rebuild button when you change the dank in the dock, or running the /sfm bust_cable_network_cache command

Image

TeamDman avatar May 21 '25 18:05 TeamDman

Looks like there is a problem with retention on the input... investigating

EVERY 20 TICKS DO
    INPUT RETAIN 100 FROM a BOTTOM SIDE
    OUTPUT TO b TOP SIDE
END

Image

Should be only leaving 100, is leaving more than that...

trace log
-- Diagnostic info --
-- Program:
EVERY 20 TICKS DO
    INPUT RETAIN 100 FROM a BOTTOM SIDE
    OUTPUT TO b TOP SIDE
END

-- DateTime: 2025-05-21 14:25.05
-- Game Version: Minecraft 1.19.2 (MOD_DEV/forge)
-- Forge Version: 43.4.0
-- SFM Version: 4.21.0

-- Labels
-- LabelPositionHolder - 2 total labels
-- * a - 1 positions
-- * b - 1 positions

-- LOGS --
0m1s ago [INFO] Ahoy, world!
Change the log level using the buttons at the top of this screen.
Loud log levels will be reset after a single program execution.
Logging can make statements take longer to execute.
The scrolling is wacky, I'm working on it.
Only a few hundred lines are drawn to reduce lag.
Use the copy button to view in a better editor for now lol.
0m0s ago [INFO] Log level updated to TRACE
0m0s ago [TRACE] ======= Cable network =======
0m0s ago [TRACE] Cable positions:
0m0s ago [TRACE] - BlockPos{x=-1, y=-58, z=14} Block{sfm:manager}[triggered=false]
0m0s ago [TRACE] Capability positions:
0m0s ago [TRACE] - BlockPos{x=-2, y=-58, z=14} Block{minecraft:chest}[facing=north,type=single,waterlogged=false]
0m0s ago [TRACE] - BlockPos{x=0, y=-58, z=14} Block{dankstorage:dock}[tier=1]
0m0s ago [TRACE] =============================
0m0s ago [TRACE] === Label position holder ===
0m0s ago [TRACE] - a: BlockPos{x=0, y=-58, z=14} Block{dankstorage:dock}[tier=1]
0m0s ago [TRACE] - b: BlockPos{x=-2, y=-58, z=14} Block{minecraft:chest}[facing=north,type=single,waterlogged=false]
0m0s ago [TRACE] =============================
0m0s ago [TRACE] Initial program context: ProgramContext{PROGRAM=NAME ""
EVERY 20 TICKS DO
 INPUT RETAIN 100 FROM a BOTTOM SIDE
 OUTPUT TO b TOP SIDE
END
, MANAGER=ManagerBlockEntity{hasDisk=true}, NETWORK=CableNetwork{level=minecraft:overworld, #cables=1, #cache=2}, INPUTS=[], LEVEL=ServerLevel[anoy there], EXECUTION_POLICY=ca.teamdman.sfm.common.program.DefaultProgramBehaviour@3d8bc0c3, REDSTONE_PULSES=0, LABEL_POSITIONS=LabelPositionHolder{size=2; a=1, b=1}, did_something=true}
0m0s ago [DEBUG] PROGRAM TICK BEGIN
0m0s ago [DEBUG] INPUT RETAIN 100 FROM a BOTTOM SIDE
0m0s ago [INFO] Program statement tick took 0.0235 ms:
INPUT RETAIN 100 FROM a BOTTOM SIDE

0m0s ago [DEBUG] OUTPUT  TO b TOP SIDE
0m0s ago [DEBUG] Gathering slots for IO statement 
INPUT RETAIN 100 FROM a BOTTOM SIDE

0m0s ago [TRACE] Cache miss - this is the first time this statement is being gathered
0m0s ago [DEBUG] EACH keyword not used - trackers will be shared between blocks
0m0s ago [DEBUG] Gathering for: net/minecraftforge/items/IItemHandler (net/minecraftforge/items/IItemHandler)
0m0s ago [TRACE] Gathering capabilities of type sfm:item (net/minecraftforge/items/IItemHandler) against labels a BOTTOM SIDE
0m0s ago [TRACE] Capability cache HIT for BlockPos{x=0, y=-58, z=14} net/minecraftforge/items/IItemHandler direction=down
0m0s ago [DEBUG] Capability net/minecraftforge/items/IItemHandler BlockPos{x=0, y=-58, z=14} direction=down present
0m0s ago [DEBUG] Gathering slots in range set: [ALL]
0m0s ago [DEBUG] Slot 0 - tracking - 256 dirt - SharedQuantitySharedRetentionInputResourceTracker@418bb23b{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 100 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 1 - tracking - 36 dirt - SharedQuantitySharedRetentionInputResourceTracker@418bb23b{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 100 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 2 - skipping - 1 air
0m0s ago [DEBUG] Slot 3 - skipping - 1 air
0m0s ago [DEBUG] Slot 4 - skipping - 1 air
0m0s ago [DEBUG] Slot 5 - skipping - 1 air
0m0s ago [DEBUG] Slot 6 - skipping - 1 air
0m0s ago [DEBUG] Slot 7 - skipping - 1 air
0m0s ago [DEBUG] Slot 8 - skipping - 1 air
0m0s ago [INFO] Discovered 2 input slots
0m0s ago [DEBUG] Gathering slots for IO statement 
OUTPUT TO b TOP SIDE

0m0s ago [DEBUG] EACH keyword not used - trackers will be shared between blocks
0m0s ago [DEBUG] Gathering for: net/minecraftforge/items/IItemHandler (net/minecraftforge/items/IItemHandler)
0m0s ago [TRACE] Gathering capabilities of type sfm:item (net/minecraftforge/items/IItemHandler) against labels b TOP SIDE
0m0s ago [TRACE] Capability cache HIT for BlockPos{x=-2, y=-58, z=14} net/minecraftforge/items/IItemHandler direction=up
0m0s ago [DEBUG] Capability net/minecraftforge/items/IItemHandler BlockPos{x=-2, y=-58, z=14} direction=up present
0m0s ago [DEBUG] Gathering slots in range set: [ALL]
0m0s ago [DEBUG] Slot 0 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 1 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 2 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 3 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 4 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 5 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 6 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 7 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 8 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 9 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 10 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 11 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 12 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 13 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 14 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 15 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 16 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 17 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 18 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 19 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 20 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 21 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 22 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 23 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 24 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 25 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [DEBUG] Slot 26 - tracking - 1 air - SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}
0m0s ago [INFO] Discovered 27 output slots
0m0s ago [TRACE] Begin moving LimitedInputSlot{label=a, pos=BlockPos{x=0, y=-58, z=14}, direction=down, slot=0, cap=net/minecraftforge/items/IItemHandler, tracker=SharedQuantitySharedRetentionInputResourceTracker@418bb23b{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 100 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}} into LimitedOutputSlot{label=b, pos=BlockPos{x=-2, y=-58, z=14}, direction=up, slot=0, cap=net/minecraftforge/items/IItemHandler, tracker=SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}}
0m0s ago [TRACE] Promised to leave 0 in the source slot, still obligated to leave 64
0m0s ago [TRACE] Nothing to move after retention obligations, marking source slot done and skipping
0m0s ago [TRACE] Begin moving LimitedInputSlot{label=a, pos=BlockPos{x=0, y=-58, z=14}, direction=down, slot=1, cap=net/minecraftforge/items/IItemHandler, tracker=SharedQuantitySharedRetentionInputResourceTracker@418bb23b{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=64, RESOURCE_LIMIT=9223372036854775807 RETAIN 100 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}} into LimitedOutputSlot{label=b, pos=BlockPos{x=-2, y=-58, z=14}, direction=up, slot=0, cap=net/minecraftforge/items/IItemHandler, tracker=SharedQuantitySharedRetentionOutputResourceTracker@22e5ef11{TRANSFERRED=0, RETENTION_OBLIGATION_PROGRESS=0, RESOURCE_LIMIT=9223372036854775807 RETAIN 9223372036854775807 ResourceIdSet{sfm:item:.*:.*}, EXCLUSIONS=ResourceIdSet{}}}
0m0s ago [TRACE] Promised to leave 0 in the source slot, still obligated to leave 36
0m0s ago [TRACE] Nothing to move after retention obligations, marking source slot done and skipping
0m0s ago [INFO] Program statement tick took 2.7366 ms:
OUTPUT TO b TOP SIDE

0m0s ago [INFO] Program trigger tick took 2.8044 ms:
EVERY 20 TICKS DO
 INPUT RETAIN 100 FROM a BOTTOM SIDE
 OUTPUT TO b TOP SIDE
END

0m0s ago [TRACE] Program tick took 7.1328 ms

TeamDman avatar May 21 '25 18:05 TeamDman

Should be fixed in the newest version (v4.22.0), please follow up if you're still having issues <3

TeamDman avatar Jun 22 '25 01:06 TeamDman