static final class ApplyBonusLootFunction.BinomialWithBonusCount extends Object implements ApplyBonusLootFunction.Formula
Modifier and Type | Field and Description |
---|---|
private int |
extra |
static Identifier |
ID |
private float |
probability |
Constructor and Description |
---|
BinomialWithBonusCount(int extra,
float probability) |
Modifier and Type | Method and Description |
---|---|
static ApplyBonusLootFunction.Formula |
fromJson(JsonObject json,
JsonDeserializationContext context) |
Identifier |
getId() |
int |
getValue(Random random,
int initialCount,
int enchantmentLevel) |
void |
toJson(JsonObject json,
JsonSerializationContext context) |
public static final Identifier ID
private final int extra
private final float probability
public BinomialWithBonusCount(int extra, float probability)
public int getValue(Random random, int initialCount, int enchantmentLevel)
getValue
in interface ApplyBonusLootFunction.Formula
public void toJson(JsonObject json, JsonSerializationContext context)
toJson
in interface ApplyBonusLootFunction.Formula
public static ApplyBonusLootFunction.Formula fromJson(JsonObject json, JsonDeserializationContext context)
public Identifier getId()
getId
in interface ApplyBonusLootFunction.Formula