Class TagEntry

java.lang.Object
net.minecraft.tags.TagEntry

public class TagEntry extends Object
  • Field Details

    • FULL_CODEC

      private static final com.mojang.serialization.Codec<TagEntry> FULL_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<TagEntry> CODEC
    • id

      private final Identifier id
    • tag

      private final boolean tag
    • required

      private final boolean required
  • Constructor Details

  • Method Details

    • elementOrTag

      private ExtraCodecs.TagOrElementLocation elementOrTag()
    • withRequired

      TagEntry withRequired(boolean required)
      Returns a copy of this entry with the required flag set to the given parameter.
      Parameters:
      required - whether the new entry is required
      Returns:
      a copy of this entry with the required flag set to the given parameter
    • element

      public static TagEntry element(Identifier elementLocation)
    • optionalElement

      public static TagEntry optionalElement(Identifier elementLocation)
    • tag

      public static TagEntry tag(Identifier tagLocation)
    • optionalTag

      public static TagEntry optionalTag(Identifier tagLocation)
    • build

      public <T> boolean build(TagEntry.Lookup<T> lookup, Consumer<T> consumer)
    • visitRequiredDependencies

      public void visitRequiredDependencies(Consumer<Identifier> visitor)
    • visitOptionalDependencies

      public void visitOptionalDependencies(Consumer<Identifier> visitor)
    • verifyIfPresent

      public boolean verifyIfPresent(Predicate<Identifier> elementPredicate, Predicate<Identifier> tagPredicate)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public Identifier getId()
    • isRequired

      public boolean isRequired()
    • isTag

      public boolean isTag()