Record Class RegistryEntryPredicateArgumentType.EntryBased<T>

java.lang.Object
java.lang.Record
net.minecraft.command.argument.RegistryEntryPredicateArgumentType.EntryBased<T>
Record Components:
value -
All Implemented Interfaces:
Predicate<RegistryEntry<T>>, RegistryEntryPredicateArgumentType.EntryPredicate<T>
Enclosing class:
RegistryEntryPredicateArgumentType<T>

private static record RegistryEntryPredicateArgumentType.EntryBased<T>(RegistryEntry.Reference<T> value) extends Record implements RegistryEntryPredicateArgumentType.EntryPredicate<T>
Mappings:
Namespace Name
official et$b
intermediary net/minecraft/class_7737$class_7740
named net/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryBased
official a
intermediary comp_1023
named value
  • Field Details

  • Constructor Details

  • Method Details

    • getEntry

      public com.mojang.datafixers.util.Either<RegistryEntry.Reference<T>,RegistryEntryList.Named<T>> getEntry()
      Specified by:
      getEntry in interface RegistryEntryPredicateArgumentType.EntryPredicate<T>
      Mappings:
      Namespace Name Mixin selector
      official a Let$c;a()Lcom/mojang/datafixers/util/Either;
      intermediary method_45647 Lnet/minecraft/class_7737$class_7741;method_45647()Lcom/mojang/datafixers/util/Either;
      named getEntry Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;getEntry()Lcom/mojang/datafixers/util/Either;
    • tryCast

      public <E> Optional<RegistryEntryPredicateArgumentType.EntryPredicate<E>> tryCast(RegistryKey<? extends Registry<E>> registryRef)
      Specified by:
      tryCast in interface RegistryEntryPredicateArgumentType.EntryPredicate<T>
      Mappings:
      Namespace Name Mixin selector
      official a Let$c;a(Laev;)Ljava/util/Optional;
      intermediary method_45648 Lnet/minecraft/class_7737$class_7741;method_45648(Lnet/minecraft/class_5321;)Ljava/util/Optional;
      named tryCast Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;tryCast(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
    • test

      public boolean test(RegistryEntry<T> registryEntry)
      Specified by:
      test in interface Predicate<T>
      Mappings:
      Namespace Name Mixin selector
      official a Let$b;a(Lhe;)Z
      intermediary method_45649 Lnet/minecraft/class_7737$class_7740;method_45649(Lnet/minecraft/class_6880;)Z
      named test Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryBased;test(Lnet/minecraft/registry/entry/RegistryEntry;)Z
    • asString

      public String asString()
      Specified by:
      asString in interface RegistryEntryPredicateArgumentType.EntryPredicate<T>
      Mappings:
      Namespace Name Mixin selector
      official b Let$c;b()Ljava/lang/String;
      intermediary method_45650 Lnet/minecraft/class_7737$class_7741;method_45650()Ljava/lang/String;
      named asString Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;asString()Ljava/lang/String;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • value

      public RegistryEntry.Reference<T> value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component