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 named net/minecraft/loot/provider/number/StorageLootNumberProviderintermediary net/minecraft/class_9432official ewbnamed storageintermediary comp_2525official bnamed pathintermediary comp_2526official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<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 named CODECLnet/minecraft/loot/provider/number/StorageLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_50033Lnet/minecraft/class_9432;field_50033:Lcom/mojang/serialization/MapCodec;official aLewb;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
StorageLootNumberProvider
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;intermediary method_365Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;official bLevy;b()Levx;
-
getNumber
- Mappings:
Namespace Name Mixin selector named getNumberLnet/minecraft/loot/provider/number/StorageLootNumberProvider;getNumber(Lnet/minecraft/loot/context/LootContext;)Ljava/util/Optional;intermediary method_58471Lnet/minecraft/class_9432;method_58471(Lnet/minecraft/class_47;)Ljava/util/Optional;official cLewb;c(Lerr;)Ljava/util/Optional;
-
nextFloat
- Specified by:
nextFloatin interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector named nextFloatLnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)Fintermediary method_32454Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)Fofficial bLevy;b(Lerr;)F
-
nextInt
- Specified by:
nextIntin interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector named nextIntLnet/minecraft/loot/provider/number/LootNumberProvider;nextInt(Lnet/minecraft/loot/context/LootContext;)Iintermediary method_366Lnet/minecraft/class_5658;method_366(Lnet/minecraft/class_47;)Iofficial aLevy;a(Lerr;)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
-