Table of Contents

Thinking With Resource Conditions (DRAFT)

Introduction

Sometimes you want a recipe to only exist when a certain mod is loaded, or maybe have something happen when an empty tag actually has some items. This is where resource conditions come into play. Resource Conditions allow you to define things like these in a non-breaking way.

Types of Conditions

There are 6 basic types, and 3 'modifier' types.

TrueResourceCondition

The TrueResourceCondition returns true. That's all it does.

AllModsLoadedResourceCondition

This one returns true if all mods(defined by id) listed in it are loaded(running in the current environment).

AnyModsLoadedResourceCondition

Returns true if any mods listed in it are loaded.

TagsPopulatedResourceCondition

Returns true if all tags listed in it have members(not empty).

FeaturesEnabledResourceCondition

Returns true if all features listed in it are enabled.

RegistryContainsResourceCondition

Returns true if the registry has the identifiers listed in it as entries.

NotResourceCondition

Returns true if the resource condition nested inside is false.

OrResourceCondition

Returns true if either condition inside it is true.

AndResourceCondition

Returns true if both conditions are true.