Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public static Predicate<JsonObject> get(Identifier identifier) {
* <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?

try {
JsonArray conditions = JsonHelper.getArray(object, CONDITIONS_KEY, null);

Expand Down