public class EnchantmentWrapper extends Enchantment
Enchantment
s的一个简单的封装类。
大多数方法于Enchantment
。
ARROW_DAMAGE, ARROW_FIRE, ARROW_INFINITE, ARROW_KNOCKBACK, BINDING_CURSE, DAMAGE_ALL, DAMAGE_ARTHROPODS, DAMAGE_UNDEAD, DEPTH_STRIDER, DIG_SPEED, DURABILITY, FIRE_ASPECT, FROST_WALKER, KNOCKBACK, LOOT_BONUS_BLOCKS, LOOT_BONUS_MOBS, LUCK, LURE, MENDING, OXYGEN, PROTECTION_ENVIRONMENTAL, PROTECTION_EXPLOSIONS, PROTECTION_FALL, PROTECTION_FIRE, PROTECTION_PROJECTILE, SILK_TOUCH, SWEEPING_EDGE, THORNS, VANISHING_CURSE, WATER_WORKER
构造器和说明 |
---|
EnchantmentWrapper(int id) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
canEnchantItem(ItemStack item)
检查该附魔支不支持某物品.
|
boolean |
conflictsWith(Enchantment other)
检查这个附魔是否与另外的附魔冲突.
|
Enchantment |
getEnchantment()
得到这个包装类所对应的的附魔.
|
EnchantmentTarget |
getItemTarget()
得到这个附魔所支持的 物品
ItemStack . |
int |
getMaxLevel()
得到这个附魔所支持的最大等级.
|
java.lang.String |
getName()
得到这个附魔的名称.
|
int |
getStartLevel()
得到这个附魔的最小等级.
|
boolean |
isCursed()
Checks if this enchantment is a cursed enchantment
Cursed enchantments are found the same way treasure enchantments are |
boolean |
isTreasure()
Checks if this enchantment is a treasure enchantment.
|
equals, getById, getByName, getId, hashCode, isAcceptingRegistrations, registerEnchantment, stopAcceptingRegistrations, toString, values
public Enchantment getEnchantment()
原文:Gets the enchantment bound to this wrapper
public int getMaxLevel()
Enchantment
原文: Gets the maximum level that this Enchantment may become.
getMaxLevel
在类中 Enchantment
public int getStartLevel()
Enchantment
原文: Gets the level that this Enchantment should start at
getStartLevel
在类中 Enchantment
public EnchantmentTarget getItemTarget()
Enchantment
getItemTarget
在类中 Enchantment
public boolean canEnchantItem(ItemStack item)
Enchantment
这并不检查任何物品上与它冲突的附魔。
原文: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.
canEnchantItem
在类中 Enchantment
item
- 物品public java.lang.String getName()
Enchantment
原文: Gets the unique name of this enchantment
getName
在类中 Enchantment
public boolean isTreasure()
Enchantment
isTreasure
在类中 Enchantment
public boolean isCursed()
Enchantment
isCursed
在类中 Enchantment
public boolean conflictsWith(Enchantment other)
Enchantment
原文: Check if this enchantment conflicts with another enchantment.
conflictsWith
在类中 Enchantment
other
- 另外一个附魔