[1.15.2] Is it possible to make the item be equipped in the ring slot by clicking a button ??
Fakeziinho opened this issue ยท 8 comments
Is it possible to make the item be equipped in the ring slot by clicking a button ??
I'm a beginner in forge can you help me ??
Please elaborate a bit more. What do you mean by clicking a button? Like right-click equipping them?
Okay, so, if you need more information:
You need to obtain an instance of the Curios handler on the player. This is accomplished using CuriosAPI.getCuriosHandler(player)
. Then you need to get the right stack handler for the slot type you're looking for, which seems to be "ring". So, you call getStackHandler("ring")
on the handler you got earlier. And then you can use setStackInSlot
like you do with any other stack handler to set the stack in the indexed slot.
The only part left after that is to wrap this logic and connect it to your keybinding, but that's basic Forge stuff that you can look up in tutorials elsewhere.
If you need more help, you can try to contact me on Discord or visit my Discord server: https://discord.gg/JWgrdwt
Please elaborate a bit more. What do you mean by clicking a button? Like right-click equipping them?
Example: I click on the 'F' button on the keyboard, it sets the item in the ring slot
Are you speaking as a developer or as a user? As a developer, yes. As a user, no.
Are you developing a Minecraft mod using Curios as an API, or are you using Curios as a player in a Minecraft instance?
If you're a developer, then yes, there are ways to add keybinding functionality to set an item to a slot.
If you're a user/player, then no, there's no way for you to customize that sort of function.