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 official ehw$e
intermediary net/minecraft/class_94$class_100
named net/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount
official c
intermediary comp_1852
named bonusMultiplier
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thebonusMultiplier
record component.static final com.mojang.serialization.Codec<ApplyBonusLootFunction.UniformBonusCount>
static final ApplyBonusLootFunction.Type
-
Constructor Summary
ConstructorDescriptionUniformBonusCount
(int bonusMultiplier) Creates an instance of aUniformBonusCount
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thebonusMultiplier
record component.final boolean
Indicates whether some other object is "equal to" this one.getType()
int
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
bonusMultiplier
private final int bonusMultiplierThe field for thebonusMultiplier
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lehw$e;a:Lcom/mojang/serialization/Codec;
intermediary field_45813
Lnet/minecraft/class_94$class_100;field_45813:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;CODEC:Lcom/mojang/serialization/Codec;
-
TYPE
- Mappings:
Namespace Name Mixin selector official b
Lehw$e;b:Lehw$c;
intermediary field_45814
Lnet/minecraft/class_94$class_100;field_45814:Lnet/minecraft/class_94$class_8752;
named TYPE
Lnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;TYPE:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;
-
-
Constructor Details
-
UniformBonusCount
UniformBonusCount(int bonusMultiplier) Creates an instance of aUniformBonusCount
record class.- Parameters:
bonusMultiplier
- the value for thebonusMultiplier
record component
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfaceApplyBonusLootFunction.Formula
- Mappings:
Namespace Name Mixin selector official a
Lehw$b;a(Lauv;II)I
intermediary method_467
Lnet/minecraft/class_94$class_96;method_467(Lnet/minecraft/class_5819;II)I
named getValue
Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getValue(Lnet/minecraft/util/math/random/Random;II)I
-
getType
- Specified by:
getType
in interfaceApplyBonusLootFunction.Formula
- Mappings:
Namespace Name Mixin selector official a
Lehw$b;a()Lehw$c;
intermediary method_466
Lnet/minecraft/class_94$class_96;method_466()Lnet/minecraft/class_94$class_8752;
named getType
Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getType()Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;
-
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 thebonusMultiplier
record component.- Returns:
- the value of the
bonusMultiplier
record component
-