Record Class LootDataType<T>

java.lang.Object
java.lang.Record
net.minecraft.loot.LootDataType<T>
Record Components:
registryKey -
codec -
directory -
validator -

public record LootDataType<T>(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, String directory, LootDataType.Validator<T> validator) extends Record
Mappings:
Namespace Name
official eon
intermediary net/minecraft/class_8490
named net/minecraft/loot/LootDataType
official d
intermediary comp_2519
named registryKey
official e
intermediary comp_2520
named codec
official f
intermediary comp_2521
named directory
official g
intermediary comp_2522
named validator
  • Field Details

    • registryKey

      private final RegistryKey<Registry<T>> registryKey
      The field for the registryKey record component.
    • codec

      private final com.mojang.serialization.Codec<T> codec
      The field for the codec record component.
    • directory

      private final String directory
      The field for the directory record component.
    • validator

      private final LootDataType.Validator<T> validator
      The field for the validator record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official h Leon;h:Lorg/slf4j/Logger;
      intermediary field_44499 Lnet/minecraft/class_8490;field_44499:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/loot/LootDataType;LOGGER:Lorg/slf4j/Logger;
    • PREDICATES

      public static final LootDataType<LootCondition> PREDICATES
      Mappings:
      Namespace Name Mixin selector
      official a Leon;a:Leon;
      intermediary field_44496 Lnet/minecraft/class_8490;field_44496:Lnet/minecraft/class_8490;
      named PREDICATES Lnet/minecraft/loot/LootDataType;PREDICATES:Lnet/minecraft/loot/LootDataType;
    • ITEM_MODIFIERS

      public static final LootDataType<LootFunction> ITEM_MODIFIERS
      Mappings:
      Namespace Name Mixin selector
      official b Leon;b:Leon;
      intermediary field_44497 Lnet/minecraft/class_8490;field_44497:Lnet/minecraft/class_8490;
      named ITEM_MODIFIERS Lnet/minecraft/loot/LootDataType;ITEM_MODIFIERS:Lnet/minecraft/loot/LootDataType;
    • LOOT_TABLES

      public static final LootDataType<LootTable> LOOT_TABLES
      Mappings:
      Namespace Name Mixin selector
      official c Leon;c:Leon;
      intermediary field_44498 Lnet/minecraft/class_8490;field_44498:Lnet/minecraft/class_8490;
      named LOOT_TABLES Lnet/minecraft/loot/LootDataType;LOOT_TABLES:Lnet/minecraft/loot/LootDataType;
  • Constructor Details

  • Method Details

    • validate

      public void validate(LootTableReporter reporter, RegistryKey<T> key, T value)
      Mappings:
      Namespace Name Mixin selector
      official a Leon;a(Leor;Lakg;Ljava/lang/Object;)V
      intermediary method_51209 Lnet/minecraft/class_8490;method_51209(Lnet/minecraft/class_58;Lnet/minecraft/class_5321;Ljava/lang/Object;)V
      named validate Lnet/minecraft/loot/LootDataType;validate(Lnet/minecraft/loot/LootTableReporter;Lnet/minecraft/registry/RegistryKey;Ljava/lang/Object;)V
    • parse

      public <V> Optional<T> parse(Identifier id, com.mojang.serialization.DynamicOps<V> ops, V json)
      Mappings:
      Namespace Name Mixin selector
      official a Leon;a(Lakh;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;
      intermediary method_51204 Lnet/minecraft/class_8490;method_51204(Lnet/minecraft/class_2960;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;
      named parse Lnet/minecraft/loot/LootDataType;parse(Lnet/minecraft/util/Identifier;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;
    • stream

      public static Stream<LootDataType<?>> stream()
      Mappings:
      Namespace Name Mixin selector
      official a Leon;a()Ljava/util/stream/Stream;
      intermediary method_51215 Lnet/minecraft/class_8490;method_51215()Ljava/util/stream/Stream;
      named stream Lnet/minecraft/loot/LootDataType;stream()Ljava/util/stream/Stream;
    • simpleValidator

      private static <T extends LootContextAware> LootDataType.Validator<T> simpleValidator()
      Mappings:
      Namespace Name Mixin selector
      official f Leon;f()Leon$a;
      intermediary method_51216 Lnet/minecraft/class_8490;method_51216()Lnet/minecraft/class_8490$class_8491;
      named simpleValidator Lnet/minecraft/loot/LootDataType;simpleValidator()Lnet/minecraft/loot/LootDataType$Validator;
    • tableValidator

      private static LootDataType.Validator<LootTable> tableValidator()
      Mappings:
      Namespace Name Mixin selector
      official g Leon;g()Leon$a;
      intermediary method_51217 Lnet/minecraft/class_8490;method_51217()Lnet/minecraft/class_8490$class_8491;
      named tableValidator Lnet/minecraft/loot/LootDataType;tableValidator()Lnet/minecraft/loot/LootDataType$Validator;
    • 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.
    • registryKey

      public RegistryKey<Registry<T>> registryKey()
      Returns the value of the registryKey record component.
      Returns:
      the value of the registryKey record component
    • codec

      public com.mojang.serialization.Codec<T> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • directory

      public String directory()
      Returns the value of the directory record component.
      Returns:
      the value of the directory record component
    • validator

      public LootDataType.Validator<T> validator()
      Returns the value of the validator record component.
      Returns:
      the value of the validator record component