类 Enchantment.Builder
java.lang.Object
net.minecraft.world.item.enchantment.Enchantment.Builder
- 封闭类:
Enchantment
-
字段概要
字段修饰符和类型字段说明private final Enchantment.EnchantmentDefinition
private final Map
<DataComponentType<?>, List<?>> private final DataComponentMap.Builder
private HolderSet
<Enchantment> protected UnaryOperator
<MutableComponent> Neo: Allow customizing or changing theComponent
created by the enchantment builder. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build
(ResourceLocation p_344988_) exclusiveWith
(HolderSet<Enchantment> p_346264_) private <E> List
<E> getEffectsList
(DataComponentType<List<E>> p_344770_) withCustomName
(UnaryOperator<MutableComponent> nameFactory) Allows specifying an operator that can customize the defaultComponent
created bybuild(ResourceLocation)
.withEffect
(DataComponentType<List<ConditionalEffect<E>>> p_345254_, E p_346178_) withEffect
(DataComponentType<List<ConditionalEffect<E>>> p_345261_, E p_346342_, LootItemCondition.Builder p_344864_) withEffect
(DataComponentType<List<EnchantmentAttributeEffect>> p_345372_, EnchantmentAttributeEffect p_345754_) withEffect
(DataComponentType<List<TargetedConditionalEffect<E>>> p_346304_, EnchantmentTarget p_346333_, EnchantmentTarget p_345829_, E p_345094_) withEffect
(DataComponentType<List<TargetedConditionalEffect<E>>> p_345227_, EnchantmentTarget p_346076_, EnchantmentTarget p_345283_, E p_346194_, LootItemCondition.Builder p_345933_) withEffect
(DataComponentType<Unit> p_345500_) withSpecialEffect
(DataComponentType<E> p_346431_, E p_344725_)
-
字段详细资料
-
definition
-
exclusiveSet
-
effectLists
-
effectMapBuilder
-
nameFactory
Neo: Allow customizing or changing theComponent
created by the enchantment builder.
-
-
构造器详细资料
-
Builder
-
-
方法详细资料
-
exclusiveWith
-
withEffect
public <E> Enchantment.Builder withEffect(DataComponentType<List<ConditionalEffect<E>>> p_345261_, E p_346342_, LootItemCondition.Builder p_344864_) -
withEffect
public <E> Enchantment.Builder withEffect(DataComponentType<List<ConditionalEffect<E>>> p_345254_, E p_346178_) -
withEffect
public <E> Enchantment.Builder withEffect(DataComponentType<List<TargetedConditionalEffect<E>>> p_345227_, EnchantmentTarget p_346076_, EnchantmentTarget p_345283_, E p_346194_, LootItemCondition.Builder p_345933_) -
withEffect
public <E> Enchantment.Builder withEffect(DataComponentType<List<TargetedConditionalEffect<E>>> p_346304_, EnchantmentTarget p_346333_, EnchantmentTarget p_345829_, E p_345094_) -
withEffect
public Enchantment.Builder withEffect(DataComponentType<List<EnchantmentAttributeEffect>> p_345372_, EnchantmentAttributeEffect p_345754_) -
withSpecialEffect
-
withEffect
-
withCustomName
Allows specifying an operator that can customize the defaultComponent
created bybuild(ResourceLocation)
.- 返回:
- this
-
getEffectsList
-
build
-