Package net.minecraft.loot.function
Class ApplyBonusLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.ApplyBonusLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>
,LootContextAware
,LootFunction
public class ApplyBonusLootFunction extends ConditionalLootFunction
- Mappings:
Namespace Name official dfh
intermediary net/minecraft/class_94
named net/minecraft/loot/function/ApplyBonusLootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class 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
Nested classes/interfaces inherited from class net.minecraft.loot.function.ConditionalLootFunction
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>, ConditionalLootFunction.Joiner
-
Field Summary
Fields Modifier and Type Field Description private Enchantment
enchantment
private static Map<Identifier,ApplyBonusLootFunction.FormulaFactory>
FACTORIES
private ApplyBonusLootFunction.Formula
formula
Fields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions
-
Constructor Summary
Constructors Modifier Constructor Description private
ApplyBonusLootFunction(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula)
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class net.minecraft.loot.function.ConditionalLootFunction
apply, builder, 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
-
FACTORIES
- Mappings:
Namespace Name Mixin selector official a
Ldfh;a:Ljava/util/Map;
intermediary field_1010
Lnet/minecraft/class_94;field_1010:Ljava/util/Map;
named FACTORIES
Lnet/minecraft/loot/function/ApplyBonusLootFunction;FACTORIES:Ljava/util/Map;
-
enchantment
- Mappings:
Namespace Name Mixin selector official b
Ldfh;b:Lbrp;
intermediary field_1011
Lnet/minecraft/class_94;field_1011:Lnet/minecraft/class_1887;
named enchantment
Lnet/minecraft/loot/function/ApplyBonusLootFunction;enchantment:Lnet/minecraft/enchantment/Enchantment;
-
formula
- Mappings:
Namespace Name Mixin selector official d
Ldfh;d:Ldfh$b;
intermediary field_1009
Lnet/minecraft/class_94;field_1009:Lnet/minecraft/class_94$class_96;
named formula
Lnet/minecraft/loot/function/ApplyBonusLootFunction;formula:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;
-
-
Constructor Details
-
ApplyBonusLootFunction
private ApplyBonusLootFunction(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula)- Mappings:
Namespace Name Mixin selector official <init>
Ldfh;<init>([Ldha;Lbrp;Ldfh$b;)V
intermediary <init>
Lnet/minecraft/class_94;<init>([Lnet/minecraft/class_5341;Lnet/minecraft/class_1887;Lnet/minecraft/class_94$class_96;)V
named <init>
Lnet/minecraft/loot/function/ApplyBonusLootFunction;<init>([Lnet/minecraft/loot/condition/LootCondition;Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;)V
-
-
Method Details
-
getType
- Mappings:
Namespace Name Mixin selector official a
Ldft;a()Ldfu;
intermediary method_29321
Lnet/minecraft/class_117;method_29321()Lnet/minecraft/class_5339;
named getType
Lnet/minecraft/loot/function/LootFunction;getType()Lnet/minecraft/loot/function/LootFunctionType;
-
getRequiredParameters
- Mappings:
Namespace Name Mixin selector official b
Ldej;b()Ljava/util/Set;
intermediary method_293
Lnet/minecraft/class_46;method_293()Ljava/util/Set;
named getRequiredParameters
Lnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;
-
process
- Specified by:
process
in classConditionalLootFunction
- Mappings:
Namespace Name Mixin selector official a
Ldfs;a(Lbnv;Ldei;)Lbnv;
intermediary method_522
Lnet/minecraft/class_120;method_522(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
named process
Lnet/minecraft/loot/function/ConditionalLootFunction;process(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
-
binomialWithBonusCount
public static ConditionalLootFunction.Builder<?> binomialWithBonusCount(Enchantment enchantment, float probability, int extra)- Mappings:
Namespace Name Mixin selector official a
Ldfh;a(Lbrp;FI)Ldfs$a;
intermediary method_463
Lnet/minecraft/class_94;method_463(Lnet/minecraft/class_1887;FI)Lnet/minecraft/class_120$class_121;
named binomialWithBonusCount
Lnet/minecraft/loot/function/ApplyBonusLootFunction;binomialWithBonusCount(Lnet/minecraft/enchantment/Enchantment;FI)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-
oreDrops
- Mappings:
Namespace Name Mixin selector official a
Ldfh;a(Lbrp;)Ldfs$a;
intermediary method_455
Lnet/minecraft/class_94;method_455(Lnet/minecraft/class_1887;)Lnet/minecraft/class_120$class_121;
named oreDrops
Lnet/minecraft/loot/function/ApplyBonusLootFunction;oreDrops(Lnet/minecraft/enchantment/Enchantment;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-
uniformBonusCount
- Mappings:
Namespace Name Mixin selector official b
Ldfh;b(Lbrp;)Ldfs$a;
intermediary method_456
Lnet/minecraft/class_94;method_456(Lnet/minecraft/class_1887;)Lnet/minecraft/class_120$class_121;
named uniformBonusCount
Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/enchantment/Enchantment;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-
uniformBonusCount
public static ConditionalLootFunction.Builder<?> uniformBonusCount(Enchantment enchantment, int bonusMultiplier)- Mappings:
Namespace Name Mixin selector official a
Ldfh;a(Lbrp;I)Ldfs$a;
intermediary method_461
Lnet/minecraft/class_94;method_461(Lnet/minecraft/class_1887;I)Lnet/minecraft/class_120$class_121;
named uniformBonusCount
Lnet/minecraft/loot/function/ApplyBonusLootFunction;uniformBonusCount(Lnet/minecraft/enchantment/Enchantment;I)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
-