#✅ | Less repetitive work

1 messages · Page 1 of 1 (latest)

rugged fossil
#

Hey, I have an text element that describes what the item is (akin to lore in tooltips) and I have 6 items which need said description but they can be in any of the first 6 slots of the hotbar. I need to know what the item is and if it is selected in the hotbar for it to show. That unfortunately creates the task of making and configuring 36 seperate elements. Is there a way to alleviate some of the work?

remote gladeBOT
#

Hi! 👋 Please first click the button below to start this support ticket.

⚠️ It is not possible for anybody to send messages in this ticket before it has been started, so you need to click the button for others to be able to help/answer you.

remote gladeBOT
# rugged fossil Hey, I have an text element that describes what the item is (akin to lore in too...

Yes, you can cut this down from 36 elements to just 6 🧩

The trick is: don’t make one element per slot. Make one element per item, and check the item currently in the selected hotbar slot.

How to set it up:

  1. Create 1 text element for item A.
  2. Add a loading requirement: Is Text
  3. Compare:
    • left side: {"placeholder":"slot_item","values":{"slot":"{"placeholder":"active_hotbar_slot"}"}}
    • right side: the item id, like minecraft:diamond_sword
  4. Put the lore/description text into that element.
  5. Duplicate it for the other 5 items and only change the item id + description.

So instead of 6 items × 6 slots = 36, you only need:

  • 6 text elements total
  • 1 requirement per element

You do not need Is Hotbar Slot Selected for every slot if you use active_hotbar_slot like this, because the selected slot is already the one being checked.

If you want, I can write one exact example for a single item so you can copy the pattern directly 📘

#

✅ | Less repetitive work