Giter Site home page Giter Site logo

Comments (8)

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Please elaborate a bit more. What do you mean by clicking a button? Like right-click equipping them?

from curios.

Fakeziinho avatar Fakeziinho commented on August 19, 2024

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

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Are you speaking as a developer or as a user? As a developer, yes. As a user, no.

from curios.

Fakeziinho avatar Fakeziinho commented on August 19, 2024

I did not understand

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

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.

from curios.

Fakeziiinho avatar Fakeziiinho commented on August 19, 2024

I'm a developer.
(I'm on another account)

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

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

from curios.

Fakeziiinho avatar Fakeziiinho commented on August 19, 2024

Okay

from curios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.