Applied-Energistics-2 icon indicating copy to clipboard operation
Applied-Energistics-2 copied to clipboard

entities stuck in spatial IO

Open Ilikepinapples opened this issue 2 years ago • 7 comments

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

Ilikepinapples avatar Jun 25 '22 11:06 Ilikepinapples

happens on fabric too

Mari023 avatar Jun 25 '22 12:06 Mari023

Wrong issue 😅

Technici4n avatar Jun 25 '22 16:06 Technici4n

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

Mari023 avatar Jun 25 '22 18:06 Mari023

Hmmm, that is annoying indeed.

Technici4n avatar Jun 26 '22 10:06 Technici4n

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

Mari023 avatar Jun 29 '22 17:06 Mari023

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.

ubergeek77 avatar Aug 17 '22 19:08 ubergeek77

spatial anchors are indeed not implemented on Fabric. There is no "easy" chunkloading API for us to use.

shartte avatar Aug 17 '22 19:08 shartte

This is probably fixable using a temporary chunk loading ticket for the spatial plot.

PS: Spatial Anchor implementation is coming soon on Fabric.

Technici4n avatar Apr 02 '23 15:04 Technici4n