Started by
Notchguy76
on
Topic category: Troubleshooting, bugs, and solutions
The "Has Event/target entity have in Inventory" Procedure does not seem to register Items with NBT Data, this includes Custom items that have been given Special NBT Data or Items such as Chests or Shulker Boxes that have items stored inside of them.
Given that the Item in my mod needs both the inventory check and NBT data at the same time is causing me issues, I am struggling to find a solution/workaround and would appreciate any recommendations.
Edited by Notchguy76 on Sun, 07/28/2024 - 09:00
Contains procedure checks from vanilla Minecraft matches exact item with all of its data entries.
To check for specific item types only, you will need to iterate all items in inventory of player and check manually
Sounds good, thanks!
I just found a clever workaround, in case anyone else is having the same issue you can get the inventory check to work a lot more efficiently by having it check for a tag instead of just one item. To do this simply replace this code segment in your auto generated code:
replace it with:
You will also need to make sure the item that you want checked for is listed under the same tag used in the codeblock, as well a use Ctrl+W so that MCreator adds the required Imports.