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 esointermediary net/minecraft/class_9432named net/minecraft/loot/provider/number/StorageLootNumberProviderofficial bintermediary comp_2525named storageofficial cintermediary comp_2526named path
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StorageLootNumberProvider> private final NbtPathArgumentType.NbtPathThe field for thepathrecord component.private final IdentifierThe field for thestoragerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStorageLootNumberProvider(Identifier identifier, NbtPathArgumentType.NbtPath nbtPath) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.private Optional<AbstractNbtNumber> getNumber(LootContext context) getType()final inthashCode()Returns a hash code value for this object.floatnextFloat(LootContext context) intnextInt(LootContext context) path()Returns the value of thepathrecord component.storage()Returns the value of thestoragerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters, validate
-
Field Details
-
storage
The field for thestoragerecord component. -
path
The field for thepathrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLeso;a:Lcom/mojang/serialization/Codec;intermediary field_50033Lnet/minecraft/class_9432;field_50033:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/loot/provider/number/StorageLootNumberProvider;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
StorageLootNumberProvider
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector official bLesl;b()Lesk;intermediary method_365Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;named getTypeLnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;
-
getNumber
- Mappings:
Namespace Name Mixin selector official cLeso;c(Leol;)Ljava/util/Optional;intermediary method_58471Lnet/minecraft/class_9432;method_58471(Lnet/minecraft/class_47;)Ljava/util/Optional;named getNumberLnet/minecraft/loot/provider/number/StorageLootNumberProvider;getNumber(Lnet/minecraft/loot/context/LootContext;)Ljava/util/Optional;
-
nextFloat
- Specified by:
nextFloatin interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector official bLesl;b(Leol;)Fintermediary method_32454Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)Fnamed nextFloatLnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)F
-
nextInt
- Specified by:
nextIntin interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector official aLesl;a(Leol;)Iintermediary method_366Lnet/minecraft/class_5658;method_366(Lnet/minecraft/class_47;)Inamed nextIntLnet/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 thestoragerecord component.- Returns:
- the value of the
storagerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-