Figura

Figura

509k Downloads

Figura causes tile entity issues with Create 0.5.0g-796

RealityAnomaly opened this issue ยท 1 comments

commented

With the latest version of Create (create-fabric-0.5.0g-796+1.19.2) on the first map load Create tile entities (i.e. train bogeys & station flags) will disappear and will not be intractable with until the map is reloaded.

Steps to reproduce:

  1. Install Create 0.5.0g-796 and Figura
  2. Place some tracks, place a train station and create a train
  3. Shut down and restart the game
  4. Load the map again, the bogeys should be invisible and the train should not be interactable with
  5. Load the map again, the bogeys should reappear and appear to work normally
commented

Ended up looking into this a bit, and im pretty sure i've figured out what is going wrong with this
also yes, I know my spelling is terrible

When this occurs, create starts log spamming the following:

[Render thread/ERROR]: Invalid CarriageDataUpdatePacket for non-carriage entity: null

Whats happening here is that create goes to get a entity by its numeric id, and this is of course returning null, meaning some inconsistency between the client and server state. (This error is thrown here: https://github.com/Fabricators-of-Create/Create/blob/4be662c23c31ea3e02cde1806656f48a50c0f051/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageDataUpdatePacket.java#L42)

I was able to reproduce this in a Figura + Create dev environment which of course is offline mode unless you add something to actually authenticate, and because of this initially I wasnt able to recreate the problem, until I added authme so I could log in to a proper account, at which point the issue returned

This lead me to disable connecting to figuras backend by setting the connection address to something nonsensical, this fixed the issue, until the connection address was reset and the error occured again, see this video: https://www.youtube.com/watch?v=7fQqkjepljQ,

interestingly even in this state, any new trains still work as expected, other than running into other trains you cant see, this points to an issue occurring during figura's authentication

Figura seems to authenticate by opening a second client -> server session to the authentication servers, this on its own is fine, however it reuses existing minecraft code to do this (see org.moon.figura.backend2.AuthHandler), this minecraft code can and will alter the main minecraft client instance, thus screwing with the state that is being used in the actual world, breaking create and possibly other mods? in the process

another thing that points to this is the fact that as previously mentioned, figura and create will work fine following a relog, this is because figura has already authenticated and has no need to do so again and so the same messing with game state doesnt happen

the best solution to this is to probably replace the existing authentication implementation with one that is sure not to interact with any existing gamestate

quick note: this testing was done on 1.18.2, although as the initial report was for 1.19.2, its safe to say the same thing is likely happening there too