Planar door not working
Sinisterpengun opened this issue ยท 15 comments
Whenever I cast planar door it just keeps teleporting me to the other one then teleportimg me back and forth
That is how the doors are supposed to work, unless you mean its teleporting you back and forth really quickly over and over..?
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.
That makes sense, in the meantime I'm going to try to get a minimal reproducible example sorted out
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.
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?
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...
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.
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?
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?
I would test some alternatives myself, unfortunately I can't build due to the FlatDir repositories for your libs.
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...