public interface EntityEquipment
限定符和类型 | 方法和说明 |
---|---|
void |
clear()
清除实体所有的盔甲和手持的物品
原文: Clears the entity of all armor and held items
|
ItemStack[] |
getArmorContents()
获得实体当前所有穿着盔甲的拷贝
译注: 其顺序为 鞋子、护腿、胸甲、头盔
原文: Gets a copy of all worn armor
|
ItemStack |
getBoots()
获取该实体当前正在穿戴的鞋子的拷贝
原文: Gets a copy of the boots currently being worn by the entity
|
float |
getBootsDropChance()
获得该生物在死亡时掉落其鞋子的几率
原文: Gets the chance of the boots being dropped upon this creature's death.
|
ItemStack |
getChestplate()
获取该实体当前正在穿戴的胸甲的拷贝
原文: Gets a copy of the chest plate currently being worn by the entity
|
float |
getChestplateDropChance()
获得该生物在死亡时掉落其胸甲的几率
原文: Gets the chance of the chest plate being dropped upon this creature's
death.
|
ItemStack |
getHelmet()
获取该实体当前正在佩戴的头盔的拷贝
原文: Gets a copy of the helmet currently being worn by the entity
|
float |
getHelmetDropChance()
获得该生物在死亡时掉落其头盔的几率
原文: Gets the chance of the helmet being dropped upon this creature's death.
|
Entity |
getHolder()
获取此EntityEquipment所属的实体
原文: Get the entity this EntityEquipment belongs to
|
ItemStack |
getItemInHand()
已过时。
现在实体可以双持, 所以需要特定的方法来获取指定的手
|
float |
getItemInHandDropChance()
已过时。
现在实体可以双持, 所以需要特定的方法来设置指定的手
|
ItemStack |
getItemInMainHand()
获取实体当前主手中手持的物品的拷贝
原文: Gets a copy of the item the entity is currently holding
in their main hand.
|
float |
getItemInMainHandDropChance()
获得该生物在死亡时掉落其主手的物品的几率
原文: Gets the chance of the main hand item being dropped upon this creature's
death.
|
ItemStack |
getItemInOffHand()
获取实体当前副手中手持的物品的拷贝
原文: Gets a copy of the item the entity is currently holding
in their off hand.
|
float |
getItemInOffHandDropChance()
获得该生物在死亡时掉落其副手的物品的几率
原文: Gets the chance of the off hand item being dropped upon this creature's
death.
|
ItemStack |
getLeggings()
获取该实体当前正在穿戴的护腿的拷贝
原文: Gets a copy of the leggings currently being worn by the entity
|
float |
getLeggingsDropChance()
获得该生物在死亡时掉落其护腿的几率
原文: Gets the chance of the leggings being dropped upon this creature's
death.
|
void |
setArmorContents(ItemStack[] items)
将实体所穿戴的盔甲设置为提供的ItemStacks数组
译注:
该ItemStack数组的顺序应为 鞋子、护腿、胸甲、头盔
当数组长度不够4个时, 将会把剩下的设置为null, 如为2时,胸甲和头盔将会自动设置为null
原文: Sets the entities armor to the provided array of ItemStacks
|
void |
setBoots(ItemStack boots)
设置该实体当前正在穿戴的鞋子
原文: Sets the boots worn by the entity
|
void |
setBootsDropChance(float chance)
设置该生物在死亡时掉落其鞋子的几率
原文: Sets the chance of the boots being dropped upon this creature's death.
|
void |
setChestplate(ItemStack chestplate)
设置该实体当前正在穿戴的胸甲
原文: Sets the chest plate worn by the entity
|
void |
setChestplateDropChance(float chance)
设置该生物在死亡时掉落其胸甲的几率
原文: Sets the chance of the chest plate being dropped upon this creature's
death.
|
void |
setHelmet(ItemStack helmet)
设置该实体当前正在佩戴的头盔
原文: Sets the helmet worn by the entity
|
void |
setHelmetDropChance(float chance)
设置该生物在死亡时掉落其头盔的几率
原文: Sets the chance of the helmet being dropped upon this creature's death.
|
void |
setItemInHand(ItemStack stack)
已过时。
现在实体可以双持, 所以需要特定的方法来获取指定的手
|
void |
setItemInHandDropChance(float chance)
已过时。
现在实体可以双持, 所以需要特定的方法来设置指定的手
|
void |
setItemInMainHand(ItemStack item)
设置实体在主手中手持的物品
原文: Sets the item the entity is holding in their main hand.
|
void |
setItemInMainHandDropChance(float chance)
设置该生物在死亡时掉落其主手的物品的几率
原文: Sets the chance of the item this creature is currently holding in their
main hand being dropped upon this creature's death.
|
void |
setItemInOffHand(ItemStack item)
设置实体在副手中手持的物品
原文: Sets the item the entity is holding in their off hand.
|
void |
setItemInOffHandDropChance(float chance)
设置该生物在死亡时掉落其副手的物品的几率
原文: Sets the chance of the off hand item being dropped upon this creature's
death.
|
void |
setLeggings(ItemStack leggings)
设置该实体当前正在穿戴的护腿
原文: Sets the leggings worn by the entity
|
void |
setLeggingsDropChance(float chance)
设置该生物在死亡时掉落其护腿的几率
原文: Sets the chance of the leggings being dropped upon this creature's
death.
|
ItemStack getItemInMainHand()
原文: Gets a copy of the item the entity is currently holding in their main hand.
void setItemInMainHand(ItemStack item)
原文: Sets the item the entity is holding in their main hand.
item
- 需要设置的物品ItemStack getItemInOffHand()
原文: Gets a copy of the item the entity is currently holding in their off hand.
void setItemInOffHand(ItemStack item)
原文: Sets the item the entity is holding in their off hand.
item
- 需要设置的物品@Deprecated ItemStack getItemInHand()
译注: 反编译其实现, 发现其也是获取主手的物品
原文: Gets a copy of the item the entity is currently holding
getItemInMainHand()
,
getItemInOffHand()
@Deprecated void setItemInHand(ItemStack stack)
译注: 反编译其实现, 发现其也是设置主手的物品
原文: Sets the item the entity is holding
stack
- 需要设置的物品setItemInMainHand(ItemStack)
,
setItemInOffHand(ItemStack)
ItemStack getHelmet()
原文: Gets a copy of the helmet currently being worn by the entity
void setHelmet(ItemStack helmet)
原文: Sets the helmet worn by the entity
helmet
- 给定的头盔ItemStack getChestplate()
原文: Gets a copy of the chest plate currently being worn by the entity
void setChestplate(ItemStack chestplate)
原文: Sets the chest plate worn by the entity
chestplate
- 给定的胸甲ItemStack getLeggings()
原文: Gets a copy of the leggings currently being worn by the entity
void setLeggings(ItemStack leggings)
原文: Sets the leggings worn by the entity
leggings
- 给定的护腿ItemStack getBoots()
原文: Gets a copy of the boots currently being worn by the entity
void setBoots(ItemStack boots)
原文: Sets the boots worn by the entity
boots
- 给定的鞋子ItemStack[] getArmorContents()
译注: 其顺序为 鞋子、护腿、胸甲、头盔
原文: Gets a copy of all worn armor
void setArmorContents(ItemStack[] items)
译注:
原文: Sets the entities armor to the provided array of ItemStacks
items
- 给定的盔甲数组void clear()
原文: Clears the entity of all armor and held items
@Deprecated float getItemInHandDropChance()
getItemInMainHandDropChance()
,
getItemInOffHandDropChance()
@Deprecated void setItemInHandDropChance(float chance)
chance
- 给定的掉落几率setItemInMainHandDropChance(float)
,
setItemInOffHandDropChance(float)
float getItemInMainHandDropChance()
原文: Gets the chance of the main hand item being dropped upon this creature's death.
void setItemInMainHandDropChance(float chance)
原文: Sets the chance of the item this creature is currently holding in their main hand being dropped upon this creature's death.
chance
- 主手掉落物品的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常float getItemInOffHandDropChance()
原文: Gets the chance of the off hand item being dropped upon this creature's death.
void setItemInOffHandDropChance(float chance)
原文: Sets the chance of the off hand item being dropped upon this creature's death.
chance
- 副手掉落物品的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常float getHelmetDropChance()
原文: Gets the chance of the helmet being dropped upon this creature's death.
void setHelmetDropChance(float chance)
原文: Sets the chance of the helmet being dropped upon this creature's death.
chance
- 掉落头盔的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常float getChestplateDropChance()
原文: Gets the chance of the chest plate being dropped upon this creature's death.
void setChestplateDropChance(float chance)
原文: Sets the chance of the chest plate being dropped upon this creature's death.
chance
- 掉落胸甲的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常float getLeggingsDropChance()
原文: Gets the chance of the leggings being dropped upon this creature's death.
void setLeggingsDropChance(float chance)
原文: Sets the chance of the leggings being dropped upon this creature's death.
chance
- 掉落护腿的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常float getBootsDropChance()
原文: Gets the chance of the boots being dropped upon this creature's death.
void setBootsDropChance(float chance)
原文: Sets the chance of the boots being dropped upon this creature's death.
chance
- 掉落鞋子的几率java.lang.UnsupportedOperationException
- 当这一操作作用在玩家时抛出此异常Entity getHolder()
原文: Get the entity this EntityEquipment belongs to