- check_circle Functions
Published May 1st, 2021, 5/1/21 6:40 pm
- 7,353 views, 16 today
- 547 downloads, 2 today
154
Item Highlights
With this datapack your items will be highlighted with a coloured outline, making them easier to spot!
This datapack is easily customizable!
If you want to add a custom group, or edit items in a particular group, it's all easy to do!
Creating your own custom group!
First, open up to:
Start with opening ih/functions/groups.mcfunction:
%appdata%/.minecraft/saves/YourWorld/datapacks/item-highlights/data/ih
Start with opening ih/functions/groups.mcfunction:
Copy this into groups.mcfunction
Paste the following under the last item in the file.
(e.g. if "Gear" is the final group, paste it under the commands for "Gear")
# Team: YourGroupName
# This group contains whatever you want
# Default Color: <Put a valid team color here>
team add YourGroupName
team modify YourGroupName color <Put a valid team color here>
After that create a file, YourGroupName.mcfunction in ih/functions/highlights/groups.
This file will be where you add items to the group.
Make sure the group name is lowercase when making the .mcfunction!
Paste this in YourGroupName.mcfunction
execute if entity @s[nbt={Item:{id:"minecraft:diamond_axe"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_shovel"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_hoe"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_sword"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_helment"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_chestplate"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_leggings"}}] run function ih:highlights/YourGroupName
execute if entity @s[nbt={Item:{id:"minecraft:diamond_boots"}}] run function ih:highlights/YourGroupName
You can change the "minecraft:diamond_axe" and the others to whatever valid Minecraft item ID you want.
This is just an example.
Next create YourGroupName.mcfunction in ih/functions/highlights.
Copy this into your YourGroupName.mcfunction
# Edit group name here.
## Change the text after "join" to whatever.
team join YourGroupName
# Required at the end of every group!
# DO NOT EDIT THIS
tag @s add ihh# Edit group name here.
Lastly, paste this:
Remember to make YourGroupName lowercase in this!
# Highlight Group: YourGroupName
execute unless entity @s[tag=ihh] run function ih:highlights/groups/YourGroupName
On the selected line in the image:
Now just /reload and your items shall be highlighted! Make sure you toggle highlights on with /trigger toggle_ih!
Use
/trigger toggle_ih
to enable/disable the highlights!
Special thanks to SamSwi for the original idea: Item dropped by player will glow!
Credit | @SamSwi for the original idea! |
Compatibility | Minecraft 1.16 |
to | Minecraft 1.17 |
Tags |
tools/tracking
5100928
119
item-highlights
Create an account or sign in to comment.
(However, if 2 players with different toggles stand near each other, the glowing might happen anyways.)
But that shouldn't be a problem most of the time.