Skip to content

Conversation

@ThexXTURBOXx
Copy link

Fixes #154
Fixes #129
This is somewhat akin to 59440bc, but for 1.20.1

I got a bug report over at ThexXTURBOXx/Balkons-WeaponMod-Legacy#97 regarding this

Fixes Sinytra#154
Fixes Sinytra#129
This is somewhat akin to 59440bc, but for 1.20.1
* <p>If an exception is thrown during condition testing, it will be caught and logged, and false will be returned.
*/
public static boolean objectMatchesConditions(JsonObject object) {
if (JsonHelper.hasArray(object, "conditions")) return true;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure whether there is a better way to reference "conditions". I couldn't find a constant which contains this string in Forge's source code, so I hardcoded it here for now... Is there something?

@Su5eD Su5eD merged commit 9e342fc into Sinytra:1.20.1 Mar 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants