Class DefaultResourceConditions
java.lang.Object
net.fabricmc.fabric.api.resource.conditions.v1.DefaultResourceConditions
Contains
ConditionJsonProvider
s for resource conditions provided by fabric itself.-
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionJsonProvider
allModsLoaded
(String... modIds) Creates a condition that returns true if all the passed mod ids correspond to a loaded mod.static ConditionJsonProvider
and
(ConditionJsonProvider... values) Creates a condition that returns true if all of its child conditions are true.static ConditionJsonProvider
anyModLoaded
(String... modIds) Creates a condition that returns true if at least one of the passed mod ids corresponds to a loaded mod.static ConditionJsonProvider
blockTagsPopulated
(TagKey<Block>... tags) Deprecated.static ConditionJsonProvider
fluidTagsPopulated
(TagKey<Fluid>... tags) Deprecated.UsetagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.(package private) static void
init()
static ConditionJsonProvider
itemTagsPopulated
(TagKey<Item>... tags) Deprecated.UsetagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.static ConditionJsonProvider
not
(ConditionJsonProvider value) Creates a NOT condition that returns true if its child condition is false, and false if its child is true.static ConditionJsonProvider
or
(ConditionJsonProvider... values) Creates a condition that returns true if any of its child conditions are true.static <T> ConditionJsonProvider
tagsPopulated
(TagKey<T>... tags) Creates a condition that returns true if each of the passed tags exists and has at least one element.
-
Method Details
-
not
Creates a NOT condition that returns true if its child condition is false, and false if its child is true. -
and
Creates a condition that returns true if all of its child conditions are true. -
or
Creates a condition that returns true if any of its child conditions are true. -
allModsLoaded
Creates a condition that returns true if all the passed mod ids correspond to a loaded mod. -
anyModLoaded
Creates a condition that returns true if at least one of the passed mod ids corresponds to a loaded mod. -
blockTagsPopulated
@SafeVarargs @Deprecated public static ConditionJsonProvider blockTagsPopulated(TagKey<Block>... tags) Deprecated.UsetagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.Create a condition that returns true if each of the passed block tags exists and has at least one element. -
fluidTagsPopulated
@SafeVarargs @Deprecated public static ConditionJsonProvider fluidTagsPopulated(TagKey<Fluid>... tags) Deprecated.UsetagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.Create a condition that returns true if each of the passed fluid tags exists and has at least one element. -
itemTagsPopulated
@SafeVarargs @Deprecated public static ConditionJsonProvider itemTagsPopulated(TagKey<Item>... tags) Deprecated.UsetagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.Create a condition that returns true if each of the passed item tags exists and has at least one element. -
tagsPopulated
Creates a condition that returns true if each of the passed tags exists and has at least one element. This works for any registries, and the registry ID of the tags is serialized to JSON as well as the tags. -
init
static void init()
-
tagsPopulated(net.minecraft.tag.TagKey<T>...)
instead.