Package net.minecraft.loot.functions
Class ApplyBonus
java.lang.Object
net.minecraft.loot.LootFunction
net.minecraft.loot.functions.ApplyBonus
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> ILootFunction
,IParameterized
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final class
(package private) static interface
(package private) static interface
(package private) static final class
static class
(package private) static final class
Nested classes/interfaces inherited from class net.minecraft.loot.LootFunction
LootFunction.Builder<T extends LootFunction.Builder<T>>
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Enchantment
private final ApplyBonus.IFormula
private static final Map<ResourceLocation,
ApplyBonus.IFormulaDeserializer> Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
Constructor Summary
ModifierConstructorDescriptionprivate
ApplyBonus
(ILootCondition[] p_i51246_1_, Enchantment p_i51246_2_, ApplyBonus.IFormula p_i51246_3_) -
Method Summary
Modifier and TypeMethodDescriptionstatic LootFunction.Builder<?>
addBonusBinomialDistributionCount
(Enchantment p_215870_0_, float p_215870_1_, int p_215870_2_) static LootFunction.Builder<?>
addOreBonusCount
(Enchantment p_215869_0_) static LootFunction.Builder<?>
addUniformBonusCount
(Enchantment p_215871_0_) static LootFunction.Builder<?>
addUniformBonusCount
(Enchantment p_215865_0_, int p_215865_1_) Set<LootParameter<?>>
getType()
run
(ItemStack p_215859_1_, LootContext p_215859_2_) Methods inherited from class net.minecraft.loot.LootFunction
apply, simpleBuilder, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
FORMULAS
-
enchantment
-
formula
-
-
Constructor Details
-
ApplyBonus
private ApplyBonus(ILootCondition[] p_i51246_1_, Enchantment p_i51246_2_, ApplyBonus.IFormula p_i51246_3_)
-
-
Method Details
-
getType
-
getReferencedContextParams
-
run
- Specified by:
run
in classLootFunction
-
addBonusBinomialDistributionCount
public static LootFunction.Builder<?> addBonusBinomialDistributionCount(Enchantment p_215870_0_, float p_215870_1_, int p_215870_2_) -
addOreBonusCount
-
addUniformBonusCount
-
addUniformBonusCount
public static LootFunction.Builder<?> addUniformBonusCount(Enchantment p_215865_0_, int p_215865_1_)
-