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 ern
named registryKey
intermediary comp_2519
official d
named codec
intermediary comp_2520
official e
named validator
intermediary comp_2522
official f
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec
<T> The field for thecodec
record component.static final LootDataType
<LootCondition> static final LootDataType
<LootFunction> static final LootDataType
<LootTable> private static final Logger
private final RegistryKey
<Registry<T>> The field for theregistryKey
record component.private final LootDataType.Validator
<T> The field for thevalidator
record component. -
Constructor Summary
ConstructorDescriptionLootDataType
(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, LootDataType.Validator<T> validator) Creates an instance of aLootDataType
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec
<T> codec()
Returns the value of thecodec
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.parse
(Identifier id, com.mojang.serialization.DynamicOps<V> ops, V json) Returns the value of theregistryKey
record component.private static <T extends LootContextAware>
LootDataType.Validator<T> static Stream
<LootDataType<?>> stream()
private static LootDataType.Validator
<LootTable> final String
toString()
Returns a string representation of this record class.void
validate
(LootTableReporter reporter, RegistryKey<T> key, T value) Returns the value of thevalidator
record component.
-
Field Details
-
registryKey
The field for theregistryKey
record component. -
codec
The field for thecodec
record component. -
validator
The field for thevalidator
record component. -
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/loot/LootDataType;LOGGER:Lorg/slf4j/Logger;
intermediary field_44499
Lnet/minecraft/class_8490;field_44499:Lorg/slf4j/Logger;
official g
Lern;g:Lorg/slf4j/Logger;
-
field_44496
- Mappings:
Namespace Name Mixin selector named field_44496
Lnet/minecraft/loot/LootDataType;field_44496:Lnet/minecraft/loot/LootDataType;
intermediary field_44496
Lnet/minecraft/class_8490;field_44496:Lnet/minecraft/class_8490;
official a
Lern;a:Lern;
-
field_44497
- Mappings:
Namespace Name Mixin selector named field_44497
Lnet/minecraft/loot/LootDataType;field_44497:Lnet/minecraft/loot/LootDataType;
intermediary field_44497
Lnet/minecraft/class_8490;field_44497:Lnet/minecraft/class_8490;
official b
Lern;b:Lern;
-
field_44498
- Mappings:
Namespace Name Mixin selector named field_44498
Lnet/minecraft/loot/LootDataType;field_44498:Lnet/minecraft/loot/LootDataType;
intermediary field_44498
Lnet/minecraft/class_8490;field_44498:Lnet/minecraft/class_8490;
official c
Lern;c:Lern;
-
-
Constructor Details
-
LootDataType
public LootDataType(RegistryKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, LootDataType.Validator<T> validator) Creates an instance of aLootDataType
record class.- Parameters:
registryKey
- the value for theregistryKey
record componentcodec
- the value for thecodec
record componentvalidator
- the value for thevalidator
record 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
Lern;a(Lerr;Lakp;Ljava/lang/Object;)V
-
parse
- Mappings:
Namespace Name Mixin selector named parse
Lnet/minecraft/loot/LootDataType;parse(Lnet/minecraft/util/Identifier;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;
official a
Lern;a(Lakq;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Ljava/util/Optional;
-
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
Lern;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
Lern;e()Lern$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
Lern;f()Lern$a;
-
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 theregistryKey
record component.- Returns:
- the value of the
registryKey
record component
-
codec
Returns the value of thecodec
record component.- Returns:
- the value of the
codec
record component
-
validator
Returns the value of thevalidator
record component.- Returns:
- the value of the
validator
record component
-