Record Class StorageLootNumberProvider
java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.StorageLootNumberProvider
- Record Components:
storage
-path
-
- All Implemented Interfaces:
LootContextAware
,LootNumberProvider
public record StorageLootNumberProvider(Identifier storage, NbtPathArgumentType.NbtPath path)
extends Record
implements LootNumberProvider
- Mappings:
Namespace Name official eso
intermediary net/minecraft/class_9432
named net/minecraft/loot/provider/number/StorageLootNumberProvider
official b
intermediary comp_2525
named storage
official c
intermediary comp_2526
named path
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<StorageLootNumberProvider> private final NbtPathArgumentType.NbtPath
The field for thepath
record component.private final Identifier
The field for thestorage
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStorageLootNumberProvider
(Identifier identifier, NbtPathArgumentType.NbtPath nbtPath) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.private Optional
<AbstractNbtNumber> getNumber
(LootContext context) getType()
final int
hashCode()
Returns a hash code value for this object.float
nextFloat
(LootContext context) int
nextInt
(LootContext context) path()
Returns the value of thepath
record component.storage()
Returns the value of thestorage
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters, validate
-
Field Details
-
storage
The field for thestorage
record component. -
path
The field for thepath
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Leso;a:Lcom/mojang/serialization/Codec;
intermediary field_50033
Lnet/minecraft/class_9432;field_50033:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/loot/provider/number/StorageLootNumberProvider;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
StorageLootNumberProvider
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceLootNumberProvider
- Mappings:
Namespace Name Mixin selector official b
Lesl;b()Lesk;
intermediary method_365
Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;
named getType
Lnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;
-
getNumber
- Mappings:
Namespace Name Mixin selector official c
Leso;c(Leol;)Ljava/util/Optional;
intermediary method_58471
Lnet/minecraft/class_9432;method_58471(Lnet/minecraft/class_47;)Ljava/util/Optional;
named getNumber
Lnet/minecraft/loot/provider/number/StorageLootNumberProvider;getNumber(Lnet/minecraft/loot/context/LootContext;)Ljava/util/Optional;
-
nextFloat
- Specified by:
nextFloat
in interfaceLootNumberProvider
- Mappings:
Namespace Name Mixin selector official b
Lesl;b(Leol;)F
intermediary method_32454
Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)F
named nextFloat
Lnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)F
-
nextInt
- Specified by:
nextInt
in interfaceLootNumberProvider
- Mappings:
Namespace Name Mixin selector official a
Lesl;a(Leol;)I
intermediary method_366
Lnet/minecraft/class_5658;method_366(Lnet/minecraft/class_47;)I
named nextInt
Lnet/minecraft/loot/provider/number/LootNumberProvider;nextInt(Lnet/minecraft/loot/context/LootContext;)I
-
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)
. -
storage
Returns the value of thestorage
record component.- Returns:
- the value of the
storage
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-