Package net.minecraft.loot
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 eonintermediary net/minecraft/class_8490named net/minecraft/loot/LootDataTypeofficial dintermediary comp_2519named registryKeyofficial eintermediary comp_2520named codecofficial fintermediary comp_2521named directoryofficial gintermediary comp_2522named validator
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<T> The field for thecodecrecord component.private final StringThe field for thedirectoryrecord component.static final LootDataType<LootFunction> private static final Loggerstatic final LootDataType<LootTable> static final LootDataType<LootCondition> private final RegistryKey<Registry<T>> The field for theregistryKeyrecord component.private final LootDataType.Validator<T> The field for thevalidatorrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLootDataType(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, String string, LootDataType.Validator<T> validator) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.Returns the value of thedirectoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.parse(Identifier id, com.mojang.serialization.DynamicOps<V> ops, V json) Returns the value of theregistryKeyrecord component.private static <T extends LootContextAware>
LootDataType.Validator<T> static Stream<LootDataType<?>> stream()private static LootDataType.Validator<LootTable> final StringtoString()Returns a string representation of this record class.voidvalidate(LootTableReporter reporter, RegistryKey<T> key, T value) Returns the value of thevalidatorrecord component.
-
Field Details
-
registryKey
The field for theregistryKeyrecord component. -
codec
The field for thecodecrecord component. -
directory
The field for thedirectoryrecord component. -
validator
The field for thevalidatorrecord component. -
LOGGER
- Mappings:
Namespace Name Mixin selector official hLeon;h:Lorg/slf4j/Logger;intermediary field_44499Lnet/minecraft/class_8490;field_44499:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/loot/LootDataType;LOGGER:Lorg/slf4j/Logger;
-
PREDICATES
- Mappings:
Namespace Name Mixin selector official aLeon;a:Leon;intermediary field_44496Lnet/minecraft/class_8490;field_44496:Lnet/minecraft/class_8490;named PREDICATESLnet/minecraft/loot/LootDataType;PREDICATES:Lnet/minecraft/loot/LootDataType;
-
ITEM_MODIFIERS
- Mappings:
Namespace Name Mixin selector official bLeon;b:Leon;intermediary field_44497Lnet/minecraft/class_8490;field_44497:Lnet/minecraft/class_8490;named ITEM_MODIFIERSLnet/minecraft/loot/LootDataType;ITEM_MODIFIERS:Lnet/minecraft/loot/LootDataType;
-
LOOT_TABLES
- Mappings:
Namespace Name Mixin selector official cLeon;c:Leon;intermediary field_44498Lnet/minecraft/class_8490;field_44498:Lnet/minecraft/class_8490;named LOOT_TABLESLnet/minecraft/loot/LootDataType;LOOT_TABLES:Lnet/minecraft/loot/LootDataType;
-
-
Constructor Details
-
LootDataType
public LootDataType(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, String string, LootDataType.Validator<T> validator)
-
-
Method Details
-
validate
- Mappings:
Namespace Name Mixin selector official aLeon;a(Leor;Lakg;Ljava/lang/Object;)Vintermediary method_51209Lnet/minecraft/class_8490;method_51209(Lnet/minecraft/class_58;Lnet/minecraft/class_5321;Ljava/lang/Object;)Vnamed validateLnet/minecraft/loot/LootDataType;validate(Lnet/minecraft/loot/LootTableReporter;Lnet/minecraft/registry/RegistryKey;Ljava/lang/Object;)V
-
parse
- Mappings:
Namespace Name Mixin selector official aLeon;a(Lakh;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;intermediary method_51204Lnet/minecraft/class_8490;method_51204(Lnet/minecraft/class_2960;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;named parseLnet/minecraft/loot/LootDataType;parse(Lnet/minecraft/util/Identifier;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;
-
stream
- Mappings:
Namespace Name Mixin selector official aLeon;a()Ljava/util/stream/Stream;intermediary method_51215Lnet/minecraft/class_8490;method_51215()Ljava/util/stream/Stream;named streamLnet/minecraft/loot/LootDataType;stream()Ljava/util/stream/Stream;
-
simpleValidator
- Mappings:
Namespace Name Mixin selector official fLeon;f()Leon$a;intermediary method_51216Lnet/minecraft/class_8490;method_51216()Lnet/minecraft/class_8490$class_8491;named simpleValidatorLnet/minecraft/loot/LootDataType;simpleValidator()Lnet/minecraft/loot/LootDataType$Validator;
-
tableValidator
- Mappings:
Namespace Name Mixin selector official gLeon;g()Leon$a;intermediary method_51217Lnet/minecraft/class_8490;method_51217()Lnet/minecraft/class_8490$class_8491;named tableValidatorLnet/minecraft/loot/LootDataType;tableValidator()Lnet/minecraft/loot/LootDataType$Validator;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
registryKey
Returns the value of theregistryKeyrecord component.- Returns:
- the value of the
registryKeyrecord component
-
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
directory
Returns the value of thedirectoryrecord component.- Returns:
- the value of the
directoryrecord component
-
validator
Returns the value of thevalidatorrecord component.- Returns:
- the value of the
validatorrecord component
-