public class ApplyBonusLootFunction extends ConditionalLootFunction
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ApplyBonusLootFunction.BinomialWithBonusCount |
(package private) static interface |
ApplyBonusLootFunction.Formula |
(package private) static interface |
ApplyBonusLootFunction.FormulaFactory |
(package private) static class |
ApplyBonusLootFunction.OreDrops |
static class |
ApplyBonusLootFunction.Serializer |
(package private) static class |
ApplyBonusLootFunction.UniformBonusCount |
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>, ConditionalLootFunction.Joiner
Modifier and Type | Field and Description |
---|---|
private Enchantment |
enchantment |
private static Map<Identifier,ApplyBonusLootFunction.FormulaFactory> |
FACTORIES |
private ApplyBonusLootFunction.Formula |
formula |
conditions
Modifier | Constructor and Description |
---|---|
private |
ApplyBonusLootFunction(LootCondition[] conditions,
Enchantment enchantment,
ApplyBonusLootFunction.Formula formula) |
Modifier and Type | Method and Description |
---|---|
static ConditionalLootFunction.Builder<?> |
binomialWithBonusCount(Enchantment enchantment,
float probability,
int extra) |
Set<LootContextParameter<?>> |
getRequiredParameters() |
LootFunctionType |
getType() |
static ConditionalLootFunction.Builder<?> |
oreDrops(Enchantment enchantment) |
ItemStack |
process(ItemStack stack,
LootContext context) |
static ConditionalLootFunction.Builder<?> |
uniformBonusCount(Enchantment enchantment) |
static ConditionalLootFunction.Builder<?> |
uniformBonusCount(Enchantment enchantment,
int bonusMultiplier) |
apply, builder, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
andThen
private static final Map<Identifier,ApplyBonusLootFunction.FormulaFactory> FACTORIES
private final Enchantment enchantment
private final ApplyBonusLootFunction.Formula formula
private ApplyBonusLootFunction(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula)
public LootFunctionType getType()
public Set<LootContextParameter<?>> getRequiredParameters()
public ItemStack process(ItemStack stack, LootContext context)
process
in class ConditionalLootFunction
public static ConditionalLootFunction.Builder<?> binomialWithBonusCount(Enchantment enchantment, float probability, int extra)
public static ConditionalLootFunction.Builder<?> oreDrops(Enchantment enchantment)
public static ConditionalLootFunction.Builder<?> uniformBonusCount(Enchantment enchantment)
public static ConditionalLootFunction.Builder<?> uniformBonusCount(Enchantment enchantment, int bonusMultiplier)