ladysnake / locki Goto Github PK
View Code? Open in Web Editor NEWA library for controlling access to the player's inventory
License: GNU Lesser General Public License v3.0
A library for controlling access to the player's inventory
License: GNU Lesser General Public License v3.0
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)
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.
@Redirect annotation on lockAdditionalSlots could not find any targets matching 'lambda$init$0' in net.backslot.network.SwitchPacket.
A mixin must be updated to re-support Backslot's latest versions.
Originally reported by @iDunno#0637
in Ladysnake's discord server
Hello, I would like to unlock the inventory row by row when the player finishes a quest chapter. But is this possible with Locki?
I noticed that the inventory slots were unlocked after death. So you can currently bypass the unlock quest in my modpack and unlock your inventory earlier. It's not what I imagined.
Currently I am unable to eat whenever I am using the mod.
I'm trying to use locki within another fabric mod I'm making for myself but whenever I do, I always get the error "The type net.minecraft.class_[number] cannot be resolved. It is indirectly referenced from required .class files". When looking in the source code, the references to objects such as the PlayerEntity object are fine, but when built it sets it to "class_[number]" (such as InventoryKeeper.get(class_1657)), which makes it unusable from within another mod as a referenceable library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.