Started by
FortniteChild1234
on
Topic category: Help with Minecraft modding (Java Edition)
So currently, I have an issue where if an item is enchanted or damaged, it won't unlock an achievement. But, I have potentially found a way to fix this problem by using tags. The problem is, there isn't any block of code, or way I know, to check to see if an item in the player's inventory has an item with a certain tag certain tag. I was searching for ways to do this when I came across iterating through the inventory. But everything I tried didn't seem to work, it didn't unlock the achievement, and the procedures didn't even run, and now I've hit a wall. If someone could help me, I'd be very grateful!
Thanks in advance.
Make local variable found of type logic
Set its value to false
Use for each item in player inventory block.
for each item in the loop, check if it is tagged in desired tag
if yes, set local variable found to true
if found
do custom action
Name can be something else than found if you want to
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
Thanks!