Started by
thijs_films
on
Topic category: Help with MCreator software
i have been looking everywhere for a good tutorial on how to do this but i can't find it.
what i'm trying to do is have a GUI slot where you can only put in a select view items, instead of only being able to limit it to just one item.
is there a good way to do this? maybe with tags but idk.
any help would be appreciated alot!
Hi! I'm using version 2023.4 and trying to do this. I think just using
or
can make it work perfectly.For example, I first chose the diamond ore for the GUI limit stack input, so I could see a part of the code like this:
Then, just in the editor, I used the hint or found the namespaced identifier to add the code like this:
There was a small issue when I tried to limit the equipment to items like the iron helmet or iron chestplate. The original code looked like this:
When I used this code and tried to test the mod, MCreator gave me some errors. I wasn't sure if this was the best solution, but I was able to fix the problem by changing
StackItems
toItems
like this:There are more items that I haven't tested yet. I only tested the equipment and blocks, so it might be necessary to make some adjustments to the code for other types of items, similar to how I did with the blocks and equipment. However, I think most of it should be the same.
Hope this can help you~