(Question): Is it possible to disable the error for empty tags? OR detect whether a tag isn't empty? #160
-
I've set up a script for creating dynamic recipes for ores and metals. It relies on:
The problem is this: This approach means that sometimes an empty tag will be inserted into a recipe. KubeJS errors on this and refuses to go any further. As far as I know, this is not vanilla behaviour. In Forge, I'm pretty sure empty tags are replaced by barriers, so I was planning to simply use Accounting for KubeJS not allowing empty tags would require me to detect whether or not a tag exists. I'm not sure it's even possible. Is it plausible to do this? If not, would it be possible to disable this error somehow? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should be able to do |
Beta Was this translation helpful? Give feedback.
You should be able to do
Ingredient.of('#tag').isEmpty()
to check whether it's empty; I don't think there's a way to allow invalid Ingredients as empty by default ^^