We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

2

Command-imbuded items

2 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 1
    Registered User commented
    Comment actions Permalink

    This is really cool! Maybe the items could be "imbuded" (as you call it) after you have the item? That could make it so it is not permanent and make it so if you were, for example, making an adventure map, you could unlock new "abilities" as you go? This is just an idea and I'm sure it could be solved with mods. As a Mac user, it is much, much harder to find mods for these kinds of things and I think this just might be in the realm of possibility for Minecraft.

    I personally feel like this would be an amazing addition to the game.

  • 1
    Registered User commented
    Comment actions Permalink

    If you need a workaround for right now, here's what you do.

    Create a scoreboard titled "carrot" with type minecraft.used:minecraft.carrot_on_a_stick

    Now every tick (either through the "tick" function of a datapack or a repeating command block), remove the tag "carrot" from everyone.

    Next, (either via chain, unconditional, always active command block or just the next line of code in a datapack), add the tag "carrot" to @a[scores={carrot=1..}].

    And now, to check if anyone right-clicked the carrot on a stick, you can do @a[tag=carrot]

    And, finally, if you have multiple unique carrot-on-a-stick "abilities" (via the custom data component of 1.21 snapshots or just by putting it on there in previous versions), instead of just checking [tag=carrot], check

    For pre-1.21 versions

    [tag=carrot, nbt={SelectedItem:{tag:{your_nbt_tag_here:1b}}}]

    For 1.21+ versions

    [tag=carrot, nbt={SelectedItem:{components:{"minecraft:custom_data":{your_nbt_tag_here:1b}}}}]

    If you're curious how to get a carrot on a stick with those tags, here's how

    1.21 Snapshots:

    /give @s carrot_on_a_stick[custom_data={your_nbt_tag_here: 1b}]

    Other versions:

    /give @s carrot_on_a_stick{your_nbt_tag_here: 1b}

     

    Hope this helps!