Package net.minecraft.loot.function
Record Class ApplyBonusLootFunction.BinomialWithBonusCount
java.lang.Object
java.lang.Record
net.minecraft.loot.function.ApplyBonusLootFunction.BinomialWithBonusCount
- Record Components:
extra
-probability
-
- All Implemented Interfaces:
ApplyBonusLootFunction.Formula
- Enclosing class:
ApplyBonusLootFunction
private static record ApplyBonusLootFunction.BinomialWithBonusCount(int extra, float probability)
extends Record
implements ApplyBonusLootFunction.Formula
- Mappings:
Namespace Name official ehw$a
intermediary net/minecraft/class_94$class_95
named net/minecraft/loot/function/ApplyBonusLootFunction$BinomialWithBonusCount
official b
intermediary comp_1848
named extra
official c
intermediary comp_1849
named probability
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec<ApplyBonusLootFunction.BinomialWithBonusCount>
private final int
The field for theextra
record component.private final float
The field for theprobability
record component.static final ApplyBonusLootFunction.Type
-
Constructor Summary
ConstructorDescriptionBinomialWithBonusCount
(int extra, float probability) Creates an instance of aBinomialWithBonusCount
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
extra()
Returns the value of theextra
record component.getType()
int
final int
hashCode()
Returns a hash code value for this object.float
Returns the value of theprobability
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
extra
private final int extraThe field for theextra
record component. -
probability
private final float probabilityThe field for theprobability
record component. -
CODEC
private static final com.mojang.serialization.Codec<ApplyBonusLootFunction.BinomialWithBonusCount> CODEC- Mappings:
Namespace Name Mixin selector official d
Lehw$a;d:Lcom/mojang/serialization/Codec;
intermediary field_45811
Lnet/minecraft/class_94$class_95;field_45811:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/loot/function/ApplyBonusLootFunction$BinomialWithBonusCount;CODEC:Lcom/mojang/serialization/Codec;
-
TYPE
- Mappings:
Namespace Name Mixin selector official a
Lehw$a;a:Lehw$c;
intermediary field_1013
Lnet/minecraft/class_94$class_95;field_1013:Lnet/minecraft/class_94$class_8752;
named TYPE
Lnet/minecraft/loot/function/ApplyBonusLootFunction$BinomialWithBonusCount;TYPE:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;
-
-
Constructor Details
-
BinomialWithBonusCount
BinomialWithBonusCount(int extra, float probability) Creates an instance of aBinomialWithBonusCount
record class.- Parameters:
extra
- the value for theextra
record componentprobability
- the value for theprobability
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 '=='. -
extra
public int extra()Returns the value of theextra
record component.- Returns:
- the value of the
extra
record component
-
probability
public float probability()Returns the value of theprobability
record component.- Returns:
- the value of the
probability
record component
-