Skip to content

Creating an item component

Olafcio1 edited this page Aug 20, 2026 · 1 revision

This guide assumes you've already created and setup an Avoid project.


§ Making an item component with the Avoid Framework


Go to your mod's main class, and override the onLoad method if you didn't yet.
Then, paste this into it:

ItemComponents.create("avoidtestproject:poop", Payload.TYPE);

Of course, you need to replace these values.
Replace:

  • the component id (avoidtestproject:poop),
  • the component value type (Payload.TYPE).

The component ID should use your mod's ID.


Avoid Framework


    🏚️ 1. Home
    📽️ 2. Creating your mod
    🌄 3. Adding assets to your mod
    🧊 4. Creating a block
    💧 5. Creating a fluid
    ✏️ 6. Creating an item
    🎯 7. Creating an entity selector
    🤖 8. Creating a command
    ⌨️ 9. Creating a keybind
    🐺 10. Creating an entity
    🌫️ 11. Creating a fog
    🔩 12. Creating an item component
    🔮 13. Creating an effect

Clone this wiki locally