Applied-Energistics-2
Applied-Energistics-2 copied to clipboard
entities stuck in spatial IO
Describe the bug
when entities are stored in a spatial io port they become stuck there and cannot be taken out however when a player is stored and unstored they come out with them
How to reproduce the bug
build spatial io setup store an entity attempt to unstore the entity (this fails) store your self (in the same cell) you can see the entity that was stored unstore your self (this brings the entity back out with you)
Expected behavior
the entity should be able to be unstored regardless of if the player is present
Additional details
no other mods used
Which minecraft version are you using?
1.18
On which mod loaders does it happen?
Forge
Crash log
https://gist.github.com/Ilikepinapples/ef33246b9338414697b494029b20406a
happens on fabric too
Wrong issue 😅
this happens because https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/d9158b8b0d2a93321596d6c52d2ad1634eba588b/src/main/java/appeng/spatial/SpatialStorageHelper.java#L163 returns an empty list if the chunk isn't loaded
Hmmm, that is annoying indeed.
if I store a powered spatial anchor with the entities, they will be teleported back. (on forge) this confirms my suspicion that the reason no entities are found is because the chunk isn't loaded.
so I probably didn't load the chunks properly when testing that earlier
On Fabric, sending a powered Spatial Anchor along with the mob isn't enough to be able to bring it back. There needs to be a player standing next to the entity in the spatial storage dimension in order for the entity to be brought back. I guess the anchor just gets deactivated once its sent over? Marking the appropriate chunk with /forceload
works.
spatial anchors are indeed not implemented on Fabric. There is no "easy" chunkloading API for us to use.
This is probably fixable using a temporary chunk loading ticket for the spatial plot.
PS: Spatial Anchor implementation is coming soon on Fabric.