类的使用
net.minecraft.enchantment.Enchantment
-
-
net.minecraft.command.argument中Enchantment的使用
返回Enchantment的net.minecraft.command.argument中的方法 修饰符和类型 方法 说明 static EnchantmentEnchantmentArgumentType. getEnchantment(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)EnchantmentEnchantmentArgumentType. parse(com.mojang.brigadier.StringReader stringReader) -
net.minecraft.enchantment中Enchantment的使用
net.minecraft.enchantment中Enchantment的子类 修饰符和类型 类 说明 classAquaAffinityEnchantmentclassBindingCurseEnchantmentclassChannelingEnchantmentclassDamageEnchantmentclassDepthStriderEnchantmentclassEfficiencyEnchantmentclassFireAspectEnchantmentclassFlameEnchantmentclassFrostWalkerEnchantmentclassImpalingEnchantmentclassInfinityEnchantmentclassKnockbackEnchantmentclassLoyaltyEnchantmentclassLuckEnchantmentclassLureEnchantmentclassMendingEnchantmentclassMultishotEnchantmentclassPiercingEnchantmentclassPowerEnchantmentclassProtectionEnchantmentclassPunchEnchantmentclassQuickChargeEnchantmentclassRespirationEnchantmentclassRiptideEnchantmentclassSilkTouchEnchantmentclassSoulSpeedEnchantmentclassSweepingEnchantmentclassThornsEnchantmentclassUnbreakingEnchantmentclassVanishingCurseEnchantment声明为Enchantment的net.minecraft.enchantment中的字段 修饰符和类型 字段 说明 static EnchantmentEnchantments. AQUA_AFFINITYstatic EnchantmentEnchantments. BANE_OF_ARTHROPODSstatic EnchantmentEnchantments. BINDING_CURSEstatic EnchantmentEnchantments. BLAST_PROTECTIONstatic EnchantmentEnchantments. CHANNELINGstatic EnchantmentEnchantments. DEPTH_STRIDERstatic EnchantmentEnchantments. EFFICIENCYEnchantmentEnchantmentLevelEntry. enchantmentstatic EnchantmentEnchantments. FEATHER_FALLINGstatic EnchantmentEnchantments. FIRE_ASPECTstatic EnchantmentEnchantments. FIRE_PROTECTIONstatic EnchantmentEnchantments. FLAMEstatic EnchantmentEnchantments. FORTUNEstatic EnchantmentEnchantments. FROST_WALKERstatic EnchantmentEnchantments. IMPALINGstatic EnchantmentEnchantments. INFINITYstatic EnchantmentEnchantments. KNOCKBACKstatic EnchantmentEnchantments. LOOTINGstatic EnchantmentEnchantments. LOYALTYstatic EnchantmentEnchantments. LUCK_OF_THE_SEAstatic EnchantmentEnchantments. LUREstatic EnchantmentEnchantments. MENDINGstatic EnchantmentEnchantments. MULTISHOTstatic EnchantmentEnchantments. PIERCINGstatic EnchantmentEnchantments. POWERstatic EnchantmentEnchantments. PROJECTILE_PROTECTIONstatic EnchantmentEnchantments. PROTECTIONstatic EnchantmentEnchantments. PUNCHstatic EnchantmentEnchantments. QUICK_CHARGEstatic EnchantmentEnchantments. RESPIRATIONstatic EnchantmentEnchantments. RIPTIDEstatic EnchantmentEnchantments. SHARPNESSstatic EnchantmentEnchantments. SILK_TOUCHstatic EnchantmentEnchantments. SMITEstatic EnchantmentEnchantments. SOUL_SPEEDstatic EnchantmentEnchantments. SWEEPINGstatic EnchantmentEnchantments. THORNSstatic EnchantmentEnchantments. UNBREAKINGstatic EnchantmentEnchantments. VANISHING_CURSE返回Enchantment的net.minecraft.enchantment中的方法 修饰符和类型 方法 说明 static @Nullable EnchantmentEnchantment. byRawId(int id)private static EnchantmentEnchantments. register(String name, Enchantment enchantment)返回变量类型为Enchantment的类型的net.minecraft.enchantment中的方法 修饰符和类型 方法 说明 static Map<Enchantment,Integer>EnchantmentHelper. fromNbt(ListTag list)Loads enchantments from an NBT list.static Map<Enchantment,Integer>EnchantmentHelper. get(ItemStack stack)Gets the enchantments on an item stack.参数类型为Enchantment的net.minecraft.enchantment中的方法 修饰符和类型 方法 说明 voidEnchantmentHelper.Consumer. accept(Enchantment enchantment, int level)booleanDamageEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanDepthStriderEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.protected booleanEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanFrostWalkerEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanInfinityEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanLuckEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanMultishotEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanPiercingEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanProtectionEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanRiptideEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanSilkTouchEnchantment. canAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.booleanEnchantment. canCombine(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment and theotherenchantment can exist with this enchantment.static Map.Entry<EquipmentSlot,ItemStack>EnchantmentHelper. chooseEquipmentWith(Enchantment enchantment, LivingEntity entity)Returns a pair of an equipment slot and the item stack in the supplied entity's slot, indicating the item stack has the enchantment supplied.static Map.Entry<EquipmentSlot,ItemStack>EnchantmentHelper. chooseEquipmentWith(Enchantment enchantment, LivingEntity entity, Predicate<ItemStack> condition)Returns a pair of an equipment slot and the item stack in the supplied entity's slot, indicating the item stack has the enchantment supplied and fulfills the extra condition.static intEnchantmentHelper. getEquipmentLevel(Enchantment enchantment, LivingEntity entity)Returns the highest level of the passed enchantment in the enchantment's applicable equipment slots' item stacks.static intEnchantmentHelper. getLevel(Enchantment enchantment, ItemStack stack)Gets the level of an enchantment on an item stack.static booleanEnchantmentHelper. isCompatible(Collection<Enchantment> existing, Enchantment candidate)Returns whether thecandidateenchantment is compatible with theexistingenchantments.private static EnchantmentEnchantments. register(String name, Enchantment enchantment)类型变量类型为Enchantment的net.minecraft.enchantment中的方法参数 修饰符和类型 方法 说明 static booleanEnchantmentHelper. isCompatible(Collection<Enchantment> existing, Enchantment candidate)Returns whether thecandidateenchantment is compatible with theexistingenchantments.static voidEnchantmentHelper. set(Map<Enchantment,Integer> enchantments, ItemStack stack)Sets the enchantments on an item stack.参数类型为Enchantment的net.minecraft.enchantment中的构造器 构造器 说明 EnchantmentLevelEntry(Enchantment enchantment, int level) -
net.minecraft.item中Enchantment的使用
参数类型为Enchantment的net.minecraft.item中的方法 修饰符和类型 方法 说明 voidItemStack. addEnchantment(Enchantment enchantment, int level) -
net.minecraft.loot.condition中Enchantment的使用
声明为Enchantment的net.minecraft.loot.condition中的字段 修饰符和类型 字段 说明 private EnchantmentTableBonusLootCondition. enchantment参数类型为Enchantment的net.minecraft.loot.condition中的方法 修饰符和类型 方法 说明 static LootCondition.BuilderTableBonusLootCondition. builder(Enchantment enchantment, float[] chances)参数类型为Enchantment的net.minecraft.loot.condition中的构造器 构造器 说明 TableBonusLootCondition(Enchantment enchantment, float[] chances) -
net.minecraft.loot.function中Enchantment的使用
声明为Enchantment的net.minecraft.loot.function中的字段 修饰符和类型 字段 说明 private EnchantmentApplyBonusLootFunction. enchantment类型参数类型为Enchantment的net.minecraft.loot.function中的字段 修饰符和类型 字段 说明 private Set<Enchantment>EnchantRandomlyLootFunction.Builder. enchantmentsprivate List<Enchantment>EnchantRandomlyLootFunction. enchantmentsprivate Map<Enchantment,LootNumberProvider>SetEnchantmentsLootFunction.Builder. enchantmentsprivate Map<Enchantment,LootNumberProvider>SetEnchantmentsLootFunction. enchantments参数类型为Enchantment的net.minecraft.loot.function中的方法 修饰符和类型 方法 说明 EnchantRandomlyLootFunction.BuilderEnchantRandomlyLootFunction.Builder. add(Enchantment enchantment)private static voidSetEnchantmentsLootFunction. addEnchantmentToMap(Map<Enchantment,Integer> map, Enchantment enchantment, int level)private static ItemStackEnchantRandomlyLootFunction. addEnchantmentToStack(ItemStack stack, Enchantment enchantment, Random random)static ConditionalLootFunction.Builder<?>ApplyBonusLootFunction. binomialWithBonusCount(Enchantment enchantment, float probability, int extra)SetEnchantmentsLootFunction.BuilderSetEnchantmentsLootFunction.Builder. enchantment(Enchantment enchantment, LootNumberProvider level)static ConditionalLootFunction.Builder<?>ApplyBonusLootFunction. oreDrops(Enchantment enchantment)static ConditionalLootFunction.Builder<?>ApplyBonusLootFunction. uniformBonusCount(Enchantment enchantment)static ConditionalLootFunction.Builder<?>ApplyBonusLootFunction. uniformBonusCount(Enchantment enchantment, int bonusMultiplier)类型变量类型为Enchantment的net.minecraft.loot.function中的方法参数 修饰符和类型 方法 说明 private static voidSetEnchantmentsLootFunction. addEnchantmentToMap(Map<Enchantment,Integer> map, Enchantment enchantment, int level)参数类型为Enchantment的net.minecraft.loot.function中的构造器 构造器 说明 ApplyBonusLootFunction(LootCondition[] conditions, Enchantment enchantment, ApplyBonusLootFunction.Formula formula)类型变量类型为Enchantment的net.minecraft.loot.function中的构造器参数 构造器 说明 EnchantRandomlyLootFunction(LootCondition[] conditions, Collection<Enchantment> enchantments)SetEnchantmentsLootFunction(LootCondition[] conditions, Map<Enchantment,LootNumberProvider> enchantments, boolean add) -
net.minecraft.predicate.item中Enchantment的使用
声明为Enchantment的net.minecraft.predicate.item中的字段 修饰符和类型 字段 说明 private EnchantmentEnchantmentPredicate. enchantment类型变量类型为Enchantment的net.minecraft.predicate.item中的方法参数 修饰符和类型 方法 说明 booleanEnchantmentPredicate. test(Map<Enchantment,Integer> enchantments)参数类型为Enchantment的net.minecraft.predicate.item中的构造器 构造器 说明 EnchantmentPredicate(@Nullable Enchantment enchantment, NumberRange.IntRange levels) -
net.minecraft.server.command中Enchantment的使用
参数类型为Enchantment的net.minecraft.server.command中的方法 修饰符和类型 方法 说明 private static intEnchantCommand. execute(ServerCommandSource source, Collection<? extends Entity> targets, Enchantment enchantment, int level) -
net.minecraft.util.registry中Enchantment的使用
类型参数类型为Enchantment的net.minecraft.util.registry中的字段 修饰符和类型 字段 说明 static Registry<Enchantment>Registry. ENCHANTMENTstatic RegistryKey<Registry<Enchantment>>Registry. ENCHANTMENT_KEY
-