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.MapCodec
<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
(Holder<Enchantment> p_345010_, float p_79919_, int p_79920_) static LootItemConditionalFunction.Builder
<?> addOreBonusCount
(Holder<Enchantment> p_344898_) static LootItemConditionalFunction.Builder
<?> addUniformBonusCount
(Holder<Enchantment> p_344489_) static LootItemConditionalFunction.Builder
<?> addUniformBonusCount
(Holder<Enchantment> p_344963_, 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
- Specified by:
getType
in interfaceLootItemFunction
- Specified by:
getType
in classLootItemConditionalFunction
-
getReferencedContextParams
-
run
- Specified by:
run
in classLootItemConditionalFunction
-
addBonusBinomialDistributionCount
public static LootItemConditionalFunction.Builder<?> addBonusBinomialDistributionCount(Holder<Enchantment> p_345010_, float p_79919_, int p_79920_) -
addOreBonusCount
public static LootItemConditionalFunction.Builder<?> addOreBonusCount(Holder<Enchantment> p_344898_) -
addUniformBonusCount
public static LootItemConditionalFunction.Builder<?> addUniformBonusCount(Holder<Enchantment> p_344489_) -
addUniformBonusCount
public static LootItemConditionalFunction.Builder<?> addUniformBonusCount(Holder<Enchantment> p_344963_, int p_79923_)
-