类 EnchantRandomlyFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction
- 所有已实现的接口:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.DummyBuilder
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.MapCodec
<EnchantRandomlyFunction> private static final org.slf4j.Logger
private final boolean
private final Optional
<HolderSet<Enchantment>> 从类继承的字段 net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
构造器概要
构造器构造器说明EnchantRandomlyFunction
(List<LootItemCondition> p_298352_, Optional<HolderSet<Enchantment>> p_297532_, boolean p_344714_) -
方法概要
修饰符和类型方法说明private static ItemStack
enchantItem
(ItemStack p_230980_, Holder<Enchantment> p_343939_, RandomSource p_230982_) getType()
randomApplicableEnchantment
(HolderLookup.Provider p_343847_) run
(ItemStack p_80429_, LootContext p_80430_) 从类继承的方法 net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, simpleBuilder, validate
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.util.function.BiFunction
andThen
从接口继承的方法 net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
options
-
onlyCompatible
private final boolean onlyCompatible
-
-
构造器详细资料
-
EnchantRandomlyFunction
EnchantRandomlyFunction(List<LootItemCondition> p_298352_, Optional<HolderSet<Enchantment>> p_297532_, boolean p_344714_)
-
-
方法详细资料
-
getType
- 指定者:
getType
在接口中LootItemFunction
- 指定者:
getType
在类中LootItemConditionalFunction
-
run
- 指定者:
run
在类中LootItemConditionalFunction
-
enchantItem
private static ItemStack enchantItem(ItemStack p_230980_, Holder<Enchantment> p_343939_, RandomSource p_230982_) -
randomEnchantment
-
randomApplicableEnchantment
public static EnchantRandomlyFunction.Builder randomApplicableEnchantment(HolderLookup.Provider p_343847_)
-