Figura has a method, player:getNbt(), usable by model creators, that fetches the player's NBT as json and converts it to a Lua table. Normally this works fine, but when using this with Requiem present as well, the method returns this error:
vm error: java.lang.IllegalStateException: Locks can only be managed serverside (check !world.isClient)
From what I can understand, it seems like when Figura puts in a request to retrieve the player's NBT, it trips InventoryKeeperBase.writeToNbt, and since the call is coming from the minecraft client rather than server, PlayerInventoryKeeper.getLocks throws an error.
It seems a bit weird that just getting lock data on the client side rather than the server side is grounds to throw an error, and I imagine any other mod that fetches NBT on the client side would similarly encounter this error when run alongside Requiem/Locki.
Figura has a method,
player:getNbt()
, usable by model creators, that fetches the player's NBT as json and converts it to a Lua table. Normally this works fine, but when using this with Requiem present as well, the method returns this error:Stacktrace in Minecraft log
Version info: Minecraft: 1.19.2 Quilt: 0.18.2 Java: 18 (also on 17) Figura: 0.1.0 rc13 Requiem: 2.0.0 beta 16
Looking at the stack trace, I've managed to trace it back to these two methods in Locki:
From what I can understand, it seems like when Figura puts in a request to retrieve the player's NBT, it trips
InventoryKeeperBase.writeToNbt
, and since the call is coming from the minecraft client rather than server,PlayerInventoryKeeper.getLocks
throws an error.It seems a bit weird that just getting lock data on the client side rather than the server side is grounds to throw an error, and I imagine any other mod that fetches NBT on the client side would similarly encounter this error when run alongside Requiem/Locki.