类 Enchantment
- 直接已知子类:
EnchantmentWrapper
-
字段概要
字段修饰符和类型字段说明static final Enchantment附魔:力量 (弓)static final Enchantment附魔:火焰附加 (弓)static final Enchantment附魔:无限 (弓)static final Enchantment附魔:击退 (弓)static final EnchantmentItem cannot be removedstatic final Enchantment附魔:锋利static final Enchantment附魔:节肢杀手static final Enchantment附魔:亡灵杀手static final Enchantment附魔:海底漫步static final Enchantment附魔:效率static final Enchantment附魔:耐久static final Enchantment附魔:火焰附加static final Enchantment附魔:冰霜行者static final Enchantment附魔:击退static final Enchantment附魔:时运static final Enchantment附魔:抢夺static final Enchantment附魔:海之眷顾 (钓鱼杆)static final Enchantment附魔:诱饵 (钓鱼杆)static final Enchantment附魔:经验修补static final Enchantment附魔:水肺static final Enchantment附魔:保护static final Enchantment附魔:爆炸保护static final Enchantment附魔:摔落保护static final Enchantment附魔:火焰保护static final Enchantment附魔:抛射物保护static final Enchantment附魔:精准采集static final EnchantmentIncreases damage against targets when using a sweep attackstatic final Enchantment附魔:荆棘static final EnchantmentItem disappears instead of droppingstatic final Enchantment附魔:水下速掘 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract booleancanEnchantItem(ItemStack item) 检查该附魔支不支持某物品.abstract booleanconflictsWith(Enchantment other) 检查这个附魔是否与另外的附魔冲突.booleanstatic EnchantmentgetById(int id) 已过时。魔法值static Enchantment获取附魔的指定名称.intgetId()已过时。不安全的参数abstract EnchantmentTarget得到这个附魔所支持的 物品ItemStack.abstract int得到这个附魔所支持的最大等级.abstract StringgetName()得到这个附魔的名称.abstract int得到这个附魔的最小等级.inthashCode()static boolean检查是否接受附魔注册 .abstract booleanisCursed()Checks if this enchantment is a cursed enchantment
Cursed enchantments are found the same way treasure enchantments areabstract booleanChecks if this enchantment is a treasure enchantment.static voidregisterEnchantment(Enchantment enchantment) 注册一个附魔的ID和对象.static void停止接受任何附魔注册.toString()static Enchantment[]values()得到所有已经注册了的附魔(Enchantments).
-
字段详细资料
-
PROTECTION_ENVIRONMENTAL
附魔:保护原文: Provides protection against environmental damage
-
PROTECTION_FIRE
附魔:火焰保护原文: Provides protection against fire damage
-
PROTECTION_FALL
附魔:摔落保护原文: Provides protection against fall damage
-
PROTECTION_EXPLOSIONS
附魔:爆炸保护原文: Provides protection against explosive damage
-
PROTECTION_PROJECTILE
附魔:抛射物保护原文: Provides protection against projectile damage
-
OXYGEN
附魔:水肺原文: Decreases the rate of air loss whilst underwater
-
WATER_WORKER
附魔:水下速掘原文: Increases the speed at which a player may mine underwater
-
THORNS
附魔:荆棘原文: Damages the attacker
-
DEPTH_STRIDER
附魔:海底漫步原文: Increases walking speed while in water
-
FROST_WALKER
附魔:冰霜行者原文:Freezes any still water adjacent to ice / frost which player is walking on
-
BINDING_CURSE
Item cannot be removed -
DAMAGE_ALL
附魔:锋利原文: Increases damage against all targets
-
DAMAGE_UNDEAD
附魔:亡灵杀手原文: Increases damage against undead targets
-
DAMAGE_ARTHROPODS
附魔:节肢杀手原文: Increases damage against arthropod targets
-
KNOCKBACK
附魔:击退原文: All damage to other targets will knock them back when hit
-
FIRE_ASPECT
附魔:火焰附加原文: When attacking a target, has a chance to set them on fire
-
LOOT_BONUS_MOBS
附魔:抢夺原文: Provides a chance of gaining extra loot when killing monsters
-
SWEEPING_EDGE
Increases damage against targets when using a sweep attack -
DIG_SPEED
附魔:效率原文: Increases the rate at which you mine/dig
-
SILK_TOUCH
附魔:精准采集原文: Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
-
DURABILITY
附魔:耐久原文: Decreases the rate at which a tool looses durability
-
LOOT_BONUS_BLOCKS
附魔:时运原文: Provides a chance of gaining extra loot when destroying blocks
-
ARROW_DAMAGE
附魔:力量 (弓)原文: Provides extra damage when shooting arrows from bows
-
ARROW_KNOCKBACK
附魔:击退 (弓)原文: Provides a knockback when an entity is hit by an arrow from a bow
-
ARROW_FIRE
附魔:火焰附加 (弓)原文: Sets entities on fire when hit by arrows shot from a bow
-
ARROW_INFINITE
附魔:无限 (弓)原文: Provides infinite arrows when shooting a bow
-
LUCK
附魔:海之眷顾 (钓鱼杆)原文: Decreases odds of catching worthless junk
-
LURE
附魔:诱饵 (钓鱼杆)原文: Increases rate of fish biting your hook
-
MENDING
附魔:经验修补原文:Allows mending the item using experience orbs
-
VANISHING_CURSE
Item disappears instead of dropping
-
-
构造器详细资料
-
Enchantment
public Enchantment(int id)
-
-
方法详细资料
-
getId
已过时。不安全的参数得到这个附魔独一无二的ID.原文: Gets the unique ID of this enchantment
- 返回:
- 独一无二的ID
-
getName
得到这个附魔的名称.原文: Gets the unique name of this enchantment
- 返回:
- 独一无二的名称
-
getMaxLevel
public abstract int getMaxLevel()得到这个附魔所支持的最大等级.原文: Gets the maximum level that this Enchantment may become.
- 返回:
- 这个附魔的最大等级
-
getStartLevel
public abstract int getStartLevel()得到这个附魔的最小等级.原文: Gets the level that this Enchantment should start at
- 返回:
- 这个附魔最小等级
-
getItemTarget
- 返回:
- 这个附魔的目标物品.
-
isTreasure
public abstract boolean isTreasure()Checks if this enchantment is a treasure enchantment.
Treasure enchantments can only be received via looting, trading, or fishing.- 返回:
- true if the enchantment is a treasure enchantment
-
isCursed
public abstract boolean isCursed()Checks if this enchantment is a cursed enchantment
Cursed enchantments are found the same way treasure enchantments are- 返回:
- true if the enchantment is cursed
-
conflictsWith
检查这个附魔是否与另外的附魔冲突.原文: Check if this enchantment conflicts with another enchantment.
- 参数:
other- 另外一个附魔- 返回:
- 如果这两个附魔是冲突的则返回true
-
canEnchantItem
检查该附魔支不支持某物品.这并不检查任何物品上与它冲突的附魔。
原文:Checks if this Enchantment may be applied to the given
ItemStack.This does not check if it conflicts with any enchantments already applied to the item.
- 参数:
item- 物品- 返回:
- True 如果该附魔适用该物品,则返回true。
-
equals
-
hashCode
public int hashCode() -
toString
-
registerEnchantment
注册一个附魔的ID和对象.一般不在插件中使用.
原文: Registers an enchantment with the given ID and object.
Generally not to be used from within a plugin.
- 参数:
enchantment- 用于注册的附魔
-
isAcceptingRegistrations
public static boolean isAcceptingRegistrations()检查是否接受附魔注册 .原文: Checks if this is accepting Enchantment registrations.
- 返回:
- 如果服务器可能实现添加附魔则返回True
-
stopAcceptingRegistrations
public static void stopAcceptingRegistrations()停止接受任何附魔注册.原文: Stops accepting any enchantment registrations
-
getById
已过时。魔法值获取附魔的指定id.原文: Gets the Enchantment at the specified ID
- 参数:
id- ID- 返回:
- 返回该ID所对应的附魔,要是没有所对应的的附魔则返回null.
-
getByName
获取附魔的指定名称.原文: Gets the Enchantment at the specified name
- 参数:
name- 名称- 返回:
- 返回该名称所对应的附魔,要是没有所对应的的附魔则返回null.
-
values
得到所有已经注册了的附魔(Enchantments).原文: Gets an array of all the registered
Enchantments- 返回:
- 一个数组
-