Package net.minecraft.loot.function
Record Class ApplyBonusLootFunction.UniformBonusCount
java.lang.Object
java.lang.Record
net.minecraft.loot.function.ApplyBonusLootFunction.UniformBonusCount
- Record Components:
bonusMultiplier-
- All Implemented Interfaces:
ApplyBonusLootFunction.Formula
- Enclosing class:
ApplyBonusLootFunction
private static record ApplyBonusLootFunction.UniformBonusCount(int bonusMultiplier)
extends Record
implements ApplyBonusLootFunction.Formula
- Mappings:
Namespace Name named net/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCountintermediary net/minecraft/class_94$class_100official eso$enamed bonusMultiplierintermediary comp_1852official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebonusMultiplierrecord component.static final com.mojang.serialization.Codec<ApplyBonusLootFunction.UniformBonusCount> static final ApplyBonusLootFunction.Type -
Constructor Summary
ConstructorsConstructorDescriptionUniformBonusCount(int bonusMultiplier) Creates an instance of aUniformBonusCountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebonusMultiplierrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()intfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
bonusMultiplier
private final int bonusMultiplierThe field for thebonusMultiplierrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;CODEC:Lcom/mojang/serialization/Codec;intermediary field_45813Lnet/minecraft/class_94$class_100;field_45813:Lcom/mojang/serialization/Codec;official aLeso$e;a:Lcom/mojang/serialization/Codec;
-
TYPE
- Mappings:
Namespace Name Mixin selector named TYPELnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;TYPE:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;intermediary field_45814Lnet/minecraft/class_94$class_100;field_45814:Lnet/minecraft/class_94$class_8752;official bLeso$e;b:Leso$c;
-
-
Constructor Details
-
UniformBonusCount
UniformBonusCount(int bonusMultiplier) Creates an instance of aUniformBonusCountrecord class.- Parameters:
bonusMultiplier- the value for thebonusMultiplierrecord component
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceApplyBonusLootFunction.Formula- Mappings:
Namespace Name Mixin selector named getValueLnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getValue(Lnet/minecraft/util/math/random/Random;II)Iintermediary method_467Lnet/minecraft/class_94$class_96;method_467(Lnet/minecraft/class_5819;II)Iofficial aLeso$b;a(Layw;II)I
-
getType
- Specified by:
getTypein interfaceApplyBonusLootFunction.Formula- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getType()Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;intermediary method_466Lnet/minecraft/class_94$class_96;method_466()Lnet/minecraft/class_94$class_8752;official aLeso$b;a()Leso$c;
-
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 with '=='. -
bonusMultiplier
public int bonusMultiplier()Returns the value of thebonusMultiplierrecord component.- Returns:
- the value of the
bonusMultiplierrecord component
-