Amethyst Imbuement

Amethyst Imbuement

2M Downloads

Planar door not working

Sinisterpengun opened this issue ยท 15 comments

commented

Whenever I cast planar door it just keeps teleporting me to the other one then teleportimg me back and forth

commented

That is how the doors are supposed to work, unless you mean its teleporting you back and forth really quickly over and over..?

commented

Yes it's teleporting me so quickly that I can't move out of it

commented

Also It is in the dark rpg modpack

commented

hmm definitely not intended. Also I can't replicate it in my development environment, so maybe something in DRPG is messing with how it works. I'll dig into that when I get a chance.

commented

That makes sense, in the meantime I'm going to try to get a minimal reproducible example sorted out

commented

Also running into this issue on my own pack. What should be preventing the second teleportation, and what could be interfering with it? It also exclusively happens on the server and not in singleplayer.

commented

Since the teleportation is still happening, which means that entity collision is still happening, it has to be the map that is messed up somehow, either the comparing of BlockPos, the entity uuid, or the time. Speaking of, I don't seem to be able to find Entity.world.time in the yarn mappings, should this maybe be Entity.world.getTime() instead?

commented

Since the teleportation is still happening, which means that entity collision is still happening, it has to be the map that is messed up somehow, either the comparing of BlockPos, the entity uuid, or the time. Speaking of, I don't seem to be able to find Entity.world.time in the yarn mappings, should this maybe be Entity.world.getTime() instead?

AI is written in Kotlin, kotlin shortcuts most getX()/setX() to just the field name

I also assume something with the map functionality, but the fact that it works on my development dedicated server adds a layer of complexity. Something messing with one of the pieces of info the map needs? I really do need to sit down and dig into this...

commented

Okay so I can't reproduce the issue on a fresh server, maybe it's TPS related?

commented

The mods are exactly the same as before, the only difference is it's on a brand new world, and now the issue is not present.

commented

Another interesting note is that if the teleportation takes a long time (for example between dimensions or over long distances) then the issue doesn't happen, only if the portals are nearby does the issue happen. Maybe some sort of caching or race condition issue with the map, where it's trying to read it before it finishes writing?

commented

Instead of having a global map of positions, entities and the times at which they teleported, could it be better to just have a map on each PlanarDoorBlock that keeps track of just the entities and the time?

commented

I would test some alternatives myself, unfortunately I can't build due to the FlatDir repositories for your libs.

commented

Ah yeah that'll put a damper on things. All of those except SIHT could be 1:1 replaced with modrinth maven. SIHT isn't released anywhere as of yet. I really should get around to that...

commented

That would be appreciated!