Class ApplyBonusCount
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ApplyBonusCount
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) static interface
(package private) static final record
(package private) static final record
(package private) static final record
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.Builder<T extends LootItemConditionalFunction.Builder<T>>, LootItemConditionalFunction.DummyBuilder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ApplyBonusCount>
private final Holder<Enchantment>
private final ApplyBonusCount.Formula
private static final com.mojang.serialization.MapCodec<ApplyBonusCount.Formula>
private static final com.mojang.serialization.Codec<ApplyBonusCount.FormulaType>
private static final Map<ResourceLocation,
ApplyBonusCount.FormulaType> Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ModifierConstructorDescriptionprivate
ApplyBonusCount
(List<LootItemCondition> p_298095_, Holder<Enchantment> p_298508_, ApplyBonusCount.Formula p_79905_) -
Method Summary
Modifier and TypeMethodDescriptionstatic LootItemConditionalFunction.Builder<?>
addBonusBinomialDistributionCount
(Enchantment p_79918_, float p_79919_, int p_79920_) static LootItemConditionalFunction.Builder<?>
addOreBonusCount
(Enchantment p_79916_) static LootItemConditionalFunction.Builder<?>
addUniformBonusCount
(Enchantment p_79940_) static LootItemConditionalFunction.Builder<?>
addUniformBonusCount
(Enchantment p_79922_, int p_79923_) Set<LootContextParam<?>>
getType()
run
(ItemStack p_79913_, LootContext p_79914_) Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, 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
-
FORMULA_TYPE_CODEC
-
FORMULA_CODEC
-
CODEC
-
enchantment
-
formula
-
-
Constructor Details
-
ApplyBonusCount
private ApplyBonusCount(List<LootItemCondition> p_298095_, Holder<Enchantment> p_298508_, ApplyBonusCount.Formula p_79905_)
-
-
Method Details
-
getType
-
getReferencedContextParams
-
run
- Specified by:
run
in classLootItemConditionalFunction
-
addBonusBinomialDistributionCount
public static LootItemConditionalFunction.Builder<?> addBonusBinomialDistributionCount(Enchantment p_79918_, float p_79919_, int p_79920_) -
addOreBonusCount
-
addUniformBonusCount
-
addUniformBonusCount
public static LootItemConditionalFunction.Builder<?> addUniformBonusCount(Enchantment p_79922_, int p_79923_)
-