Class DefaultResourceConditions

java.lang.Object
net.fabricmc.fabric.api.resource.conditions.v1.DefaultResourceConditions

public final class DefaultResourceConditions extends Object
Contains ConditionJsonProviders for resource conditions provided by fabric itself.
  • Method Details

    • not

      public static ConditionJsonProvider not(ConditionJsonProvider value)
      Create a NOT condition: returns true if its child condition is false, and false if its child is true.
    • and

      public static ConditionJsonProvider and(ConditionJsonProvider... values)
      Create a condition that returns true if all of its child conditions are true.
    • or

      public static ConditionJsonProvider or(ConditionJsonProvider... values)
      Create a condition that returns true if at least one of its child conditions is true.
    • allModsLoaded

      public static ConditionJsonProvider allModsLoaded(String... modIds)
      Create a condition that returns true if all the passed mod ids correspond to a loaded mod.
    • anyModLoaded

      public static ConditionJsonProvider anyModLoaded(String... modIds)
      Create a condition that returns true if at least one of the passed mod ids corresponds to a loaded mod.
    • blockTagsPopulated

      public static ConditionJsonProvider blockTagsPopulated(net.minecraft.tag.TagKey<net.minecraft.block.Block>... tags)
      Create a condition that returns true if each of the passed block tags exists and has at least one element.
    • fluidTagsPopulated

      public static ConditionJsonProvider fluidTagsPopulated(net.minecraft.tag.TagKey<net.minecraft.fluid.Fluid>... tags)
      Create a condition that returns true if each of the passed fluid tags exists and has at least one element.
    • itemTagsPopulated

      public static ConditionJsonProvider itemTagsPopulated(net.minecraft.tag.TagKey<net.minecraft.item.Item>... tags)
      Create a condition that returns true if each of the passed item tags exists and has at least one element.
    • init

      static void init()