Package net.minecraft.loot
Record Class LootDataType<T>
java.lang.Object
java.lang.Record
net.minecraft.loot.LootDataType<T>
- Record Components:
- registryKey-
- codec-
- validator-
public record LootDataType<T>(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, LootDataType.Validator<T> validator)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/loot/LootDataType- intermediary - net/minecraft/class_8490- official - evu- named - registryKey- intermediary - comp_2519- official - d- named - codec- intermediary - comp_2520- official - e- named - validator- intermediary - comp_2522- official - f
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<T> The field for thecodecrecord component.static final LootDataType<LootFunction> static 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 SummaryConstructorsConstructorDescriptionLootDataType(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, LootDataType.Validator<T> validator) Creates an instance of aLootDataTyperecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.serialization.Codec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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- 
registryKeyThe field for theregistryKeyrecord component.
- 
codecThe field for thecodecrecord component.
- 
validatorThe field for thevalidatorrecord component.
- 
PREDICATES- Mappings:
- Namespace - Name - Mixin selector - named - PREDICATES- Lnet/minecraft/loot/LootDataType;PREDICATES:Lnet/minecraft/loot/LootDataType;- intermediary - field_44496- Lnet/minecraft/class_8490;field_44496:Lnet/minecraft/class_8490;- official - a- Levu;a:Levu;
 
- 
ITEM_MODIFIERS- Mappings:
- Namespace - Name - Mixin selector - named - ITEM_MODIFIERS- Lnet/minecraft/loot/LootDataType;ITEM_MODIFIERS:Lnet/minecraft/loot/LootDataType;- intermediary - field_44497- Lnet/minecraft/class_8490;field_44497:Lnet/minecraft/class_8490;- official - b- Levu;b:Levu;
 
- 
LOOT_TABLES- Mappings:
- Namespace - Name - Mixin selector - named - LOOT_TABLES- Lnet/minecraft/loot/LootDataType;LOOT_TABLES:Lnet/minecraft/loot/LootDataType;- intermediary - field_44498- Lnet/minecraft/class_8490;field_44498:Lnet/minecraft/class_8490;- official - c- Levu;c:Levu;
 
 
- 
- 
Constructor Details- 
LootDataTypepublic LootDataType(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, LootDataType.Validator<T> validator) Creates an instance of aLootDataTyperecord class.- Parameters:
- registryKey- the value for the- registryKeyrecord component
- codec- the value for the- codecrecord component
- validator- the value for the- validatorrecord component
 
 
- 
- 
Method Details- 
validate- Mappings:
- Namespace - Name - Mixin selector - named - validate- Lnet/minecraft/loot/LootDataType;validate(Lnet/minecraft/loot/LootTableReporter;Lnet/minecraft/registry/RegistryKey;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- official - a- Levu;a(Levy;Laku;Ljava/lang/Object;)V
 
- 
stream- Mappings:
- Namespace - Name - Mixin selector - named - stream- Lnet/minecraft/loot/LootDataType;stream()Ljava/util/stream/Stream;- intermediary - method_51215- Lnet/minecraft/class_8490;method_51215()Ljava/util/stream/Stream;- official - a- Levu;a()Ljava/util/stream/Stream;
 
- 
simpleValidator- Mappings:
- Namespace - Name - Mixin selector - named - simpleValidator- Lnet/minecraft/loot/LootDataType;simpleValidator()Lnet/minecraft/loot/LootDataType$Validator;- intermediary - method_51216- Lnet/minecraft/class_8490;method_51216()Lnet/minecraft/class_8490$class_8491;- official - e- Levu;e()Levu$a;
 
- 
tableValidator- Mappings:
- Namespace - Name - Mixin selector - named - tableValidator- Lnet/minecraft/loot/LootDataType;tableValidator()Lnet/minecraft/loot/LootDataType$Validator;- intermediary - method_51217- Lnet/minecraft/class_8490;method_51217()Lnet/minecraft/class_8490$class_8491;- official - f- Levu;f()Levu$a;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
registryKeyReturns the value of theregistryKeyrecord component.- Returns:
- the value of the registryKeyrecord component
 
- 
codecReturns the value of thecodecrecord component.- Returns:
- the value of the codecrecord component
 
- 
validatorReturns the value of thevalidatorrecord component.- Returns:
- the value of the validatorrecord component
 
 
-