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