Class SetTag<T>

java.lang.Object
net.minecraft.tag.SetTag<T>
All Implemented Interfaces:
Tag<T>

public class SetTag<T>
extends Object
implements Tag<T>
  • Field Details

    • valueList

      private final ImmutableList<T> valueList
    • valueSet

      private final Set<T> valueSet
    • type

      protected final Class<?> type
  • Constructor Details

    • SetTag

      protected SetTag​(Set<T> values, Class<?> type)
  • Method Details

    • empty

      public static <T> SetTag<T> empty()
    • of

      public static <T> SetTag<T> of​(Set<T> values)
    • contains

      public boolean contains​(T entry)
      Specified by:
      contains in interface Tag<T>
    • values

      public List<T> values()
      Specified by:
      values in interface Tag<T>
    • getCommonType

      private static <T> Class<?> getCommonType​(Set<T> values)
    • getCommonType

      private static Class<?> getCommonType​(Class<?> first, Class<?> second)