Record Class ScoreLootNumberProvider
java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.ScoreLootNumberProvider
- Record Components:
target-score-scale-
- All Implemented Interfaces:
LootContextAware,LootNumberProvider
public record ScoreLootNumberProvider(LootScoreProvider target, String score, float scale)
extends Record
implements LootNumberProvider
- Mappings:
Namespace Name named net/minecraft/loot/provider/number/ScoreLootNumberProviderintermediary net/minecraft/class_5660official ewanamed targetintermediary comp_1897official bnamed scoreintermediary comp_1898official cnamed scaleintermediary comp_1899official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ScoreLootNumberProvider> private final floatThe field for thescalerecord component.private final StringThe field for thescorerecord component.private final LootScoreProviderThe field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionScoreLootNumberProvider(LootScoreProvider target, String score, float scale) Creates an instance of aScoreLootNumberProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScoreLootNumberProvidercreate(LootContext.EntityTarget target, String score) static ScoreLootNumberProvidercreate(LootContext.EntityTarget target, String score, float scale) final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.floatnextFloat(LootContext context) floatscale()Returns the value of thescalerecord component.score()Returns the value of thescorerecord component.target()Returns the value of thetargetrecord 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
validateMethods inherited from interface net.minecraft.loot.provider.number.LootNumberProvider
nextInt
-
Field Details
-
target
The field for thetargetrecord component. -
score
The field for thescorerecord component. -
scale
private final float scaleThe field for thescalerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/loot/provider/number/ScoreLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_45890Lnet/minecraft/class_5660;field_45890:Lcom/mojang/serialization/MapCodec;official aLewa;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
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;
-
getRequiredParameters
- Specified by:
getRequiredParametersin interfaceLootContextAware- Mappings:
Namespace Name Mixin selector named getRequiredParametersLnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;intermediary method_293Lnet/minecraft/class_46;method_293()Ljava/util/Set;official aLers;a()Ljava/util/Set;
-
create
- Mappings:
Namespace Name Mixin selector named createLnet/minecraft/loot/provider/number/ScoreLootNumberProvider;create(Lnet/minecraft/loot/context/LootContext$EntityTarget;Ljava/lang/String;)Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;intermediary method_35569Lnet/minecraft/class_5660;method_35569(Lnet/minecraft/class_47$class_50;Ljava/lang/String;)Lnet/minecraft/class_5660;official aLewa;a(Lerr$b;Ljava/lang/String;)Lewa;
-
create
public static ScoreLootNumberProvider create(LootContext.EntityTarget target, String score, float scale) - Mappings:
Namespace Name Mixin selector named createLnet/minecraft/loot/provider/number/ScoreLootNumberProvider;create(Lnet/minecraft/loot/context/LootContext$EntityTarget;Ljava/lang/String;F)Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;intermediary method_35570Lnet/minecraft/class_5660;method_35570(Lnet/minecraft/class_47$class_50;Ljava/lang/String;F)Lnet/minecraft/class_5660;official aLewa;a(Lerr$b;Ljava/lang/String;F)Lewa;
-
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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-