Yep, you can do that with SpiffyHUD by letting FancyMenu check your active hotbar slot and showing the matching weapon art via an Image element.
Here’s the rough setup:
-
Create a Ticker that runs every tick and updates a FancyMenu variable (e.g.
current_weapon_id).- Use a
Set Variableaction inside the ticker that writes theslot_itemplaceholder for the currently selected hotbar slot:
{"placeholder":"slot_item","values":{"slot":"{"placeholder":"active_hotbar_slot"}"}} - That gives you the item ID (like
minecraft:iron_sword) even without touching any inventory screens. - If you want to hide the HUD when the slot is empty, wrap the action in an
Ifthat only runs whenslot_itemisn’t empty.
- Use a
-
Add an Image element for the weapon sprite.
- In the image’s Source field, use a path that includes the variable, e.g.
/config/fancymenu/assets/weapons/{"placeholder":"getvariable","values":{"name":"current_weapon_id"}}.png. - That lets you drop in PNGs named after each weapon ID (
minecraft:iron_sword.png,tacz:custom_rifle.png, etc.).
- In the image’s Source field, use a path that includes the variable, e.g.
-
Optional loading requirement: add an
Is TextorIs Numberrequirement so the image only shows whencurrent_weapon_idreturns something. You can also animate/fade it via FancyMenu’s image options.
Keep everything inside /config/fancymenu/assets/ so the resources load properly.
For a refresher on the slot_item, active_hotbar_slot, and variable placeholders you’ll be using, check the Placeholders documentation.