程序包 | 说明 |
---|---|
org.bukkit |
Bukkit的常用类.
|
org.bukkit.block |
用于操作在
世界 内的三位像素(方块),包括一些特定的状态. |
org.bukkit.configuration |
专门用于处理插件运行时配置的类.
|
org.bukkit.enchantments | |
org.bukkit.entity |
为在
世界 内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等. |
org.bukkit.event.block | |
org.bukkit.event.enchantment | |
org.bukkit.event.entity | |
org.bukkit.event.inventory | |
org.bukkit.event.player | |
org.bukkit.inventory |
参与操作玩家物品栏和物品交互的类.
|
org.bukkit.material |
代表每种体素(意义可参考维基百科或百度百科相关条目,即物品被抽象为体素)的种类和状态.
|
org.bukkit.potion |
代表每种
药水 属性和操作的类的集合. |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
UnsafeValues.modifyItemStack(ItemStack stack,
java.lang.String arguments)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
Item |
World.dropItem(Location location,
ItemStack item)
在指定的
位置 丢出一个物品. |
Item |
World.dropItemNaturally(Location location,
ItemStack item)
在指定的
位置 丢出一个随机偏移的物品. |
static java.util.List<Recipe> |
Bukkit.getRecipesFor(ItemStack result)
Get a list of all recipes for a given item.
|
java.util.List<Recipe> |
Server.getRecipesFor(ItemStack result)
获取一个合成ItemStack的所有配方,如果副ID为-1将匹配所有的数据值
原文:Get a list of all recipes for a given item.
|
ItemStack |
UnsafeValues.modifyItemStack(ItemStack stack,
java.lang.String arguments)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Collection<ItemStack> |
Block.getDrops()
Returns a list of items which would drop by destroying this block
|
java.util.Collection<ItemStack> |
Block.getDrops(ItemStack tool)
Returns a list of items which would drop by destroying this block with
a specific tool
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
Block.breakNaturally(ItemStack tool)
Breaks the block and spawns items as if a player had digged it with a
specific tool
|
java.util.Collection<ItemStack> |
Block.getDrops(ItemStack tool)
Returns a list of items which would drop by destroying this block with
a specific tool
|
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
MemorySection.getItemStack(java.lang.String path) |
ItemStack |
ConfigurationSection.getItemStack(java.lang.String path)
在指定路径获取一个
ItemStack 类型的值. |
ItemStack |
MemorySection.getItemStack(java.lang.String path,
ItemStack def) |
ItemStack |
ConfigurationSection.getItemStack(java.lang.String path,
ItemStack def)
在指定路径上获取一个
ItemStack , 如果无法获取, 则直接返回默认值. |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
MemorySection.getItemStack(java.lang.String path,
ItemStack def) |
ItemStack |
ConfigurationSection.getItemStack(java.lang.String path,
ItemStack def)
在指定路径上获取一个
ItemStack , 如果无法获取, 则直接返回默认值. |
限定符和类型 | 方法和说明 |
---|---|
boolean |
EnchantmentWrapper.canEnchantItem(ItemStack item) |
abstract boolean |
Enchantment.canEnchantItem(ItemStack item)
检查该附魔支不支持某物品.
|
boolean |
EnchantmentTarget.includes(ItemStack item)
检查是否包含该物品.
|
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
ArmorStand.getBoots()
返回盔甲架当前穿在脚上的物品.
|
ItemStack |
ArmorStand.getChestplate()
返回盔甲架当前穿在胸上的物品.
|
ItemStack |
ArmorStand.getHelmet()
返回盔甲架当前戴在头上的物品.
|
ItemStack |
ThrownPotion.getItem()
Returns a copy of the ItemStack for this thrown potion.
|
ItemStack |
ItemFrame.getItem()
获取在展示框内的物品.
|
ItemStack |
ArmorStand.getItemInHand()
返回盔甲架当前握持的物品.
|
ItemStack |
HumanEntity.getItemInHand()
已过时。
人类现能双持, 请使用
PlayerInventory 中更明确的方法 |
ItemStack |
HumanEntity.getItemOnCursor()
返回你的鼠标正在拖动的物品, 可能为空.
|
ItemStack |
Item.getItemStack()
Gets the item stack associated with this item drop.
|
ItemStack |
ArmorStand.getLeggings()
返回盔甲架当前穿在腿上的物品.
|
限定符和类型 | 方法和说明 |
---|---|
void |
ArmorStand.setBoots(ItemStack item)
设置盔甲架当前穿在脚上的物品.
|
void |
ArmorStand.setChestplate(ItemStack item)
设置盔甲架当前穿在胸上的物品.
|
void |
ArmorStand.setHelmet(ItemStack item)
设置盔甲架当前戴在头上的物品.
|
void |
ThrownPotion.setItem(ItemStack item)
Set the ItemStack for this thrown potion.
|
void |
ItemFrame.setItem(ItemStack item)
设置在展示框内的物品.
|
void |
ArmorStand.setItemInHand(ItemStack item)
设置盔甲架当前握持的物品.
|
void |
HumanEntity.setItemInHand(ItemStack item)
已过时。
人类现能双持, 请使用
PlayerInventory 中更明确的方法 |
void |
HumanEntity.setItemOnCursor(ItemStack item)
设置你正在拖动的物品, 将替换你所拖动的任何物品.
|
void |
Item.setItemStack(ItemStack stack)
Sets the item stack associated with this item drop.
|
void |
ArmorStand.setLeggings(ItemStack item)
设置盔甲架当前穿在腿上的物品.
|
限定符和类型 | 字段和说明 |
---|---|
protected ItemStack |
BlockPlaceEvent.itemInHand |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
BlockDispenseEvent.getItem()
获取被射出的物品.
|
ItemStack |
BlockDamageEvent.getItemInHand()
获取当前玩家手上的物品.
|
ItemStack |
BlockPlaceEvent.getItemInHand()
获取玩家放置的方块的物品形式(在玩家手上).
|
限定符和类型 | 方法和说明 |
---|---|
void |
BlockDispenseEvent.setItem(ItemStack item)
设置被射出的物品.
|
构造器和说明 |
---|
BlockDamageEvent(Player player,
Block block,
ItemStack itemInHand,
boolean instaBreak) |
BlockDispenseEvent(Block block,
ItemStack dispensed,
Vector velocity) |
BlockMultiPlaceEvent(java.util.List<BlockState> states,
Block clicked,
ItemStack itemInHand,
Player thePlayer,
boolean canBuild) |
BlockPlaceEvent(Block placedBlock,
BlockState replacedBlockState,
Block placedAgainst,
ItemStack itemInHand,
Player thePlayer,
boolean canBuild)
已过时。
|
BlockPlaceEvent(Block placedBlock,
BlockState replacedBlockState,
Block placedAgainst,
ItemStack itemInHand,
Player thePlayer,
boolean canBuild,
EquipmentSlot hand) |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
PrepareItemEnchantEvent.getItem()
获取准备附魔的物品(可改动).
|
ItemStack |
EnchantItemEvent.getItem()
获取被附魔的物品(可自定义)。
|
构造器和说明 |
---|
EnchantItemEvent(Player enchanter,
InventoryView view,
Block table,
ItemStack item,
int level,
java.util.Map<Enchantment,java.lang.Integer> enchants,
int i) |
PrepareItemEnchantEvent(Player enchanter,
InventoryView view,
Block table,
ItemStack item,
EnchantmentOffer[] offers,
int bonus) |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
EntityShootBowEvent.getBow()
Gets the bow ItemStack used to fire the arrow.
|
ItemStack |
EntityBreedEvent.getBredWith()
The ItemStack that was used to initiate breeding, if present.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.List<ItemStack> |
EntityDeathEvent.getDrops()
返回这实体死亡掉落物品的集合
Gets all the items which will drop when the entity dies
|
构造器和说明 |
---|
EntityBreedEvent(LivingEntity child,
LivingEntity mother,
LivingEntity father,
LivingEntity breeder,
ItemStack bredWith,
int experience) |
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
Projectile projectile,
float force) |
构造器和说明 |
---|
EntityDeathEvent(LivingEntity entity,
java.util.List<ItemStack> drops) |
EntityDeathEvent(LivingEntity what,
java.util.List<ItemStack> drops,
int droppedExp) |
PlayerDeathEvent(Player player,
java.util.List<ItemStack> drops,
int droppedExp,
int newExp,
int newTotalExp,
int newLevel,
java.lang.String deathMessage) |
PlayerDeathEvent(Player player,
java.util.List<ItemStack> drops,
int droppedExp,
int newExp,
java.lang.String deathMessage) |
PlayerDeathEvent(Player player,
java.util.List<ItemStack> drops,
int droppedExp,
java.lang.String deathMessage) |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
InventoryClickEvent.getCurrentItem()
获取被点击的格子的物品
原文:Gets the ItemStack currently in the clicked slot.
|
ItemStack |
InventoryClickEvent.getCursor()
获取当前光标所指的物品
原文:Gets the current ItemStack on the cursor.
|
ItemStack |
InventoryDragEvent.getCursor()
Gets the result cursor after the drag is done.
|
ItemStack |
InventoryCreativeEvent.getCursor() |
ItemStack |
BrewingStandFuelEvent.getFuel()
Gets the ItemStack of the fuel before the amount was subtracted.
|
ItemStack |
FurnaceBurnEvent.getFuel()
获取这个事件中的燃料.
|
ItemStack |
InventoryMoveItemEvent.getItem()
Gets the ItemStack being moved; if modified, the original item will not
be removed from the source inventory.
|
ItemStack |
InventoryDragEvent.getOldCursor()
Gets an ItemStack representing the cursor prior to any modifications
as a result of this drag.
|
ItemStack |
PrepareAnvilEvent.getResult()
获取预合成时铁砧即将打造出来的物品,可能为空.
|
ItemStack |
FurnaceSmeltEvent.getResult()
获取熔炼产物.
|
ItemStack |
FurnaceSmeltEvent.getSource()
获取被熔炼的物品.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<java.lang.Integer,ItemStack> |
InventoryDragEvent.getNewItems()
Gets all items to be added to the inventory in this drag.
|
限定符和类型 | 方法和说明 |
---|---|
void |
InventoryClickEvent.setCurrentItem(ItemStack stack)
Sets the ItemStack currently in the clicked slot.
|
void |
InventoryClickEvent.setCursor(ItemStack stack)
已过时。
This changes the ItemStack in their hand before any
calculations are applied to the Inventory, which has a
tendency to create inconsistencies between the Player and the
server, and to make unexpected changes in the behavior of the
clicked Inventory.
|
void |
InventoryDragEvent.setCursor(ItemStack newCursor)
Sets the result cursor after the drag is done.
|
void |
InventoryCreativeEvent.setCursor(ItemStack item) |
void |
InventoryMoveItemEvent.setItem(ItemStack itemStack)
Sets the ItemStack being moved; if this is different from the original
ItemStack, the original item will not be removed from the source
inventory.
|
void |
PrepareAnvilEvent.setResult(ItemStack result) |
void |
FurnaceSmeltEvent.setResult(ItemStack result)
设置熔炼产物.
|
构造器和说明 |
---|
BrewingStandFuelEvent(Block brewingStand,
ItemStack fuel,
int fuelPower) |
FurnaceBurnEvent(Block furnace,
ItemStack fuel,
int burnTime) |
FurnaceSmeltEvent(Block furnace,
ItemStack source,
ItemStack result) |
InventoryCreativeEvent(InventoryView what,
InventoryType.SlotType type,
int slot,
ItemStack newItem) |
InventoryDragEvent(InventoryView what,
ItemStack newCursor,
ItemStack oldCursor,
boolean right,
java.util.Map<java.lang.Integer,ItemStack> slots) |
InventoryMoveItemEvent(Inventory sourceInventory,
ItemStack itemStack,
Inventory destinationInventory,
boolean didSourceInitiate) |
PrepareAnvilEvent(InventoryView inventory,
ItemStack result) |
构造器和说明 |
---|
InventoryDragEvent(InventoryView what,
ItemStack newCursor,
ItemStack oldCursor,
boolean right,
java.util.Map<java.lang.Integer,ItemStack> slots) |
限定符和类型 | 字段和说明 |
---|---|
protected ItemStack |
PlayerInteractEvent.item |
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
PlayerArmorStandManipulateEvent.getArmorStandItem()
Returns the item held by the armor stand.
|
ItemStack |
PlayerItemBreakEvent.getBrokenItem()
获得因耐久值不足将要被销毁的物品.
|
ItemStack |
PlayerItemConsumeEvent.getItem()
Gets the item that is being consumed.
|
ItemStack |
PlayerInteractEvent.getItem()
获取本事件玩家手中的物品, 手中物品为空时会返回null
原文:Returns the item in hand represented by this event
|
ItemStack |
PlayerItemMendEvent.getItem()
Get the
ItemStack to be repaired. |
ItemStack |
PlayerBucketEvent.getItemStack()
得到使用桶之后会得到的物品堆叠.
|
ItemStack |
PlayerSwapHandItemsEvent.getMainHandItem()
获取切换到主手的物品.
|
ItemStack |
PlayerSwapHandItemsEvent.getOffHandItem()
获取切换到副手的物品.
|
ItemStack |
PlayerArmorStandManipulateEvent.getPlayerItem()
Returns the item held by the player.
|
限定符和类型 | 方法和说明 |
---|---|
void |
PlayerItemConsumeEvent.setItem(ItemStack item)
Set the item being consumed
|
void |
PlayerBucketEvent.setItemStack(ItemStack itemStack)
设置使用桶之后得到的物品.
|
void |
PlayerSwapHandItemsEvent.setMainHandItem(ItemStack mainHandItem)
设置主手里的物品.
|
void |
PlayerSwapHandItemsEvent.setOffHandItem(ItemStack offHandItem)
设置副手里的物品.
|
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
ItemStack.clone() |
static ItemStack |
ItemStack.deserialize(java.util.Map<java.lang.String,java.lang.Object> args)
实现配置序列化与反序列化需要的方法.
|
ItemStack |
HorseInventory.getArmor()
获取马所装备的盔甲.
|
ItemStack[] |
EntityEquipment.getArmorContents()
获得实体当前所有穿着盔甲的拷贝
译注: 其顺序为 鞋子、护腿、胸甲、头盔
原文: Gets a copy of all worn armor
|
ItemStack[] |
PlayerInventory.getArmorContents()
获取装备槽内的全部物品.
|
ItemStack |
EntityEquipment.getBoots()
获取该实体当前正在穿戴的鞋子的拷贝
原文: Gets a copy of the boots currently being worn by the entity
|
ItemStack |
PlayerInventory.getBoots()
返回靴子槽内的物品.
|
ItemStack |
EntityEquipment.getChestplate()
获取该实体当前正在穿戴的胸甲的拷贝
原文: Gets a copy of the chest plate currently being worn by the entity
|
ItemStack |
PlayerInventory.getChestplate()
返回胸甲槽内的物品.
|
ItemStack[] |
Inventory.getContents()
返回这个物品栏内的所有物品堆.
|
ItemStack |
InventoryView.getCursor()
Get the item on the cursor of one of the viewing players.
|
ItemStack |
LlamaInventory.getDecor()
得到羊驼背包中装饰槽的物品, 通常是毛毯.
|
ItemStack[] |
PlayerInventory.getExtraContents()
获取存储在此背包的所有额外物品.
|
ItemStack |
FurnaceInventory.getFuel()
获取当前熔炉的燃料物品.
|
ItemStack |
BrewerInventory.getFuel()
获取当前用来酿造的燃料.
|
ItemStack |
EntityEquipment.getHelmet()
获取该实体当前正在佩戴的头盔的拷贝
原文: Gets a copy of the helmet currently being worn by the entity
|
ItemStack |
PlayerInventory.getHelmet()
返回头盔槽内的物品.
|
ItemStack |
BrewerInventory.getIngredient()
获取当前酿造台的原料.
|
ItemStack |
FurnaceRecipe.getInput()
获取该冶炼配方的冶炼原料.
|
ItemStack |
EnchantingInventory.getItem()
获取将被附魔的物品.
|
ItemStack |
BeaconInventory.getItem()
返回信标内的物品.
|
ItemStack |
Inventory.getItem(int index)
返回在指定索引的物品堆.
|
ItemStack |
InventoryView.getItem(int slot)
Gets one item in this inventory view by its raw slot ID.
|
ItemStack |
EntityEquipment.getItemInHand()
已过时。
现在实体可以双持, 所以需要特定的方法来获取指定的手
|
ItemStack |
PlayerInventory.getItemInHand()
已过时。
players can duel wield now use the methods for the
specific hand instead
|
ItemStack |
EntityEquipment.getItemInMainHand()
获取实体当前主手中手持的物品的拷贝
原文: Gets a copy of the item the entity is currently holding
in their main hand.
|
ItemStack |
PlayerInventory.getItemInMainHand()
获得玩家握在主手的物品(的副本).
|
ItemStack |
EntityEquipment.getItemInOffHand()
获取实体当前副手中手持的物品的拷贝
原文: Gets a copy of the item the entity is currently holding
in their off hand.
|
ItemStack |
PlayerInventory.getItemInOffHand()
获取玩家握在副手的物品(的副本).
|
ItemStack |
EntityEquipment.getLeggings()
获取该实体当前正在穿戴的护腿的拷贝
原文: Gets a copy of the leggings currently being worn by the entity
|
ItemStack |
PlayerInventory.getLeggings()
返回护腿槽内的物品.
|
ItemStack[] |
CraftingInventory.getMatrix()
获取合成公式.
|
ItemStack |
CraftingInventory.getResult()
获取合成台产生的合成品.
|
ItemStack |
MerchantRecipe.getResult() |
ItemStack |
ShapedRecipe.getResult()
Get the result.
|
ItemStack |
FurnaceRecipe.getResult()
获取该冶炼配方的冶炼生成物.
|
ItemStack |
FurnaceInventory.getResult()
获取当前熔炉生成的的物品.
|
ItemStack |
ShapelessRecipe.getResult()
Get the result of this recipe.
|
ItemStack |
Recipe.getResult()
得到这个配方的结果.
|
ItemStack |
AbstractHorseInventory.getSaddle()
获取马所装备的马鞍.
|
ItemStack |
EnchantingInventory.getSecondary()
获取将被用于附魔的第二物品(如青金石).
|
ItemStack |
FurnaceInventory.getSmelting()
获取当前熔炉的被冶炼的物品.
|
ItemStack[] |
Inventory.getStorageContents()
返回.大部分情况下本方法返回的内容代表整个物品栏,
但某些情况下返回的内容可能不包括盔甲或格子.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.HashMap<java.lang.Integer,ItemStack> |
Inventory.addItem(ItemStack... items)
在物品栏存放所给的物品堆.本方法将尽可能完美地尝试填充已有的但还未达到堆叠上限的物品堆
和空格子.
|
java.util.HashMap<java.lang.Integer,? extends ItemStack> |
Inventory.all(int materialId)
已过时。
Magic value
|
java.util.HashMap<java.lang.Integer,? extends ItemStack> |
Inventory.all(ItemStack item)
查找在物品栏内的包含指定物品堆的所有格子与物品堆.只有
物品堆的数目和种类都相同时才会匹配.
|
java.util.HashMap<java.lang.Integer,? extends ItemStack> |
Inventory.all(Material material)
查找在物品栏内的包含指定物品的所有格子与物品堆.
|
java.util.List<ItemStack> |
ShapelessRecipe.getIngredientList()
Get the list of ingredients used for this recipe.
|
java.util.Map<java.lang.Character,ItemStack> |
ShapedRecipe.getIngredientMap()
Get a copy of the ingredients map.
|
java.util.List<ItemStack> |
MerchantRecipe.getIngredients() |
java.util.ListIterator<ItemStack> |
Inventory.iterator() |
java.util.ListIterator<ItemStack> |
Inventory.iterator(int index)
返回一个从指定索引开始的迭代器.
|
java.util.HashMap<java.lang.Integer,ItemStack> |
Inventory.removeItem(ItemStack... items)
移除在物品栏内的指定物品堆.
|
限定符和类型 | 方法和说明 |
---|---|
void |
MerchantRecipe.addIngredient(ItemStack item) |
java.util.HashMap<java.lang.Integer,ItemStack> |
Inventory.addItem(ItemStack... items)
在物品栏存放所给的物品堆.本方法将尽可能完美地尝试填充已有的但还未达到堆叠上限的物品堆
和空格子.
|
java.util.HashMap<java.lang.Integer,? extends ItemStack> |
Inventory.all(ItemStack item)
查找在物品栏内的包含指定物品堆的所有格子与物品堆.只有
物品堆的数目和种类都相同时才会匹配.
|
ItemMeta |
ItemFactory.asMetaFor(ItemMeta meta,
ItemStack stack)
返回一个适用于给定的ItemStack的ItemMeta
返回的元数据将始终是指定材质的给定ItemStack的有效元数据.
|
boolean |
Inventory.contains(ItemStack item)
检测这个物品栏是否含有与给定的物品堆匹配的物品堆.
|
boolean |
Inventory.contains(ItemStack item,
int amount)
检测物品栏是否含有一定数量的完全匹配的物品堆.
|
boolean |
Inventory.containsAtLeast(ItemStack item,
int amount)
检测物品栏是否含有与所给物品堆匹配的并数量足够的物品堆.
|
int |
Inventory.first(ItemStack item)
查找包含此物品堆的第一个格子。
|
boolean |
ItemFactory.isApplicable(ItemMeta meta,
ItemStack stack)
该方法用于检查元数据是否能够适用于指定的ItemStack上(如果适用则物品不会丢失之前的数据).
|
boolean |
ItemStack.isSimilar(ItemStack stack)
该方法与equals方法相同, 但不考虑堆叠数量.
|
void |
Inventory.remove(ItemStack item)
移除在此物品栏内与给定物品堆匹配的所有物品堆.
|
java.util.HashMap<java.lang.Integer,ItemStack> |
Inventory.removeItem(ItemStack... items)
移除在物品栏内的指定物品堆.
|
void |
HorseInventory.setArmor(ItemStack stack)
为这匹马装备盔甲.
|
void |
EntityEquipment.setArmorContents(ItemStack[] items)
将实体所穿戴的盔甲设置为提供的ItemStacks数组
译注:
该ItemStack数组的顺序应为 鞋子、护腿、胸甲、头盔
当数组长度不够4个时, 将会把剩下的设置为null, 如为2时,胸甲和头盔将会自动设置为null
原文: Sets the entities armor to the provided array of ItemStacks
|
void |
PlayerInventory.setArmorContents(ItemStack[] items)
设置装备槽的全部物品.
|
void |
EntityEquipment.setBoots(ItemStack boots)
设置该实体当前正在穿戴的鞋子
原文: Sets the boots worn by the entity
|
void |
PlayerInventory.setBoots(ItemStack boots)
设置靴子物品栏内的物品.
|
void |
EntityEquipment.setChestplate(ItemStack chestplate)
设置该实体当前正在穿戴的胸甲
原文: Sets the chest plate worn by the entity
|
void |
PlayerInventory.setChestplate(ItemStack chestplate)
设置胸甲物品栏内的物品.
|
void |
Inventory.setContents(ItemStack[] items)
完全地覆盖物品栏的内容.移除所有存在的内容并替换为指定的物品堆.
|
void |
InventoryView.setCursor(ItemStack item)
Sets the item on the cursor of one of the viewing players.
|
void |
LlamaInventory.setDecor(ItemStack stack)
设置羊驼背包中装饰槽的物品.
|
void |
PlayerInventory.setExtraContents(ItemStack[] items)
将给定的物品放在额外物品槽内.
|
void |
FurnaceInventory.setFuel(ItemStack stack)
设置当前熔炉的燃料物品.
|
void |
BrewerInventory.setFuel(ItemStack fuel)
设置当前用来酿造的燃料.一般只有
Material.BLAZE_POWDER 将使用此方法. |
void |
EntityEquipment.setHelmet(ItemStack helmet)
设置该实体当前正在佩戴的头盔
原文: Sets the helmet worn by the entity
|
void |
PlayerInventory.setHelmet(ItemStack helmet)
设置头盔物品栏内的物品.
|
void |
BrewerInventory.setIngredient(ItemStack ingredient)
设置当前酿造台的原料成分.
|
void |
Inventory.setItem(int index,
ItemStack item)
在物品栏指定索引存放物品堆.
|
void |
InventoryView.setItem(int slot,
ItemStack item)
Sets one item in this inventory view by its raw slot ID.
|
void |
PlayerInventory.setItem(int index,
ItemStack item)
把物品放在背包的指定位置.
|
void |
EnchantingInventory.setItem(ItemStack item)
设置将被附魔的物品.
|
void |
BeaconInventory.setItem(ItemStack item)
设置信标内的物品.
|
void |
EntityEquipment.setItemInHand(ItemStack stack)
已过时。
现在实体可以双持, 所以需要特定的方法来获取指定的手
|
void |
PlayerInventory.setItemInHand(ItemStack stack)
已过时。
players can duel wield now use the methods for the
specific hand instead
|
void |
EntityEquipment.setItemInMainHand(ItemStack item)
设置实体在主手中手持的物品
原文: Sets the item the entity is holding in their main hand.
|
void |
PlayerInventory.setItemInMainHand(ItemStack item)
设置玩家握在主手的物品.
|
void |
EntityEquipment.setItemInOffHand(ItemStack item)
设置实体在副手中手持的物品
原文: Sets the item the entity is holding in their off hand.
|
void |
PlayerInventory.setItemInOffHand(ItemStack item)
设置玩家握在副手的物品.
|
void |
EntityEquipment.setLeggings(ItemStack leggings)
设置该实体当前正在穿戴的护腿
原文: Sets the leggings worn by the entity
|
void |
PlayerInventory.setLeggings(ItemStack leggings)
设置护腿物品栏内的物品.
|
void |
CraftingInventory.setMatrix(ItemStack[] contents)
Replace the contents of the crafting matrix
|
void |
CraftingInventory.setResult(ItemStack newResult)
设置最终合成品.
|
void |
FurnaceInventory.setResult(ItemStack stack)
设置当前熔炉的生成物.
|
void |
AbstractHorseInventory.setSaddle(ItemStack stack)
为这匹马装备一个马鞍.
|
void |
EnchantingInventory.setSecondary(ItemStack item)
设置将被用于附魔的第二物品(如青金石).
|
void |
FurnaceInventory.setSmelting(ItemStack stack)
设置当前熔炉的被冶炼物物品.
|
void |
Inventory.setStorageContents(ItemStack[] items)
放置所给的物品堆至物品栏.
|
限定符和类型 | 方法和说明 |
---|---|
void |
MerchantRecipe.setIngredients(java.util.List<ItemStack> ingredients) |
构造器和说明 |
---|
FurnaceRecipe(ItemStack result,
Material source)
创建一个熔炉冶炼配方.
|
FurnaceRecipe(ItemStack result,
MaterialData source)
创建一个熔炉冶炼配方.
|
FurnaceRecipe(ItemStack result,
MaterialData source,
float experience)
创建一个熔炉冶炼配方.
|
FurnaceRecipe(ItemStack result,
Material source,
int data)
已过时。
不安全的参数
|
FurnaceRecipe(ItemStack result,
Material source,
int data,
float experience)
已过时。
不安全的参数
|
ItemStack(ItemStack stack)
构造一个指定物品堆的副本.
|
MerchantRecipe(ItemStack result,
int maxUses) |
MerchantRecipe(ItemStack result,
int uses,
int maxUses,
boolean experienceReward) |
ShapedRecipe(ItemStack result)
已过时。
|
ShapedRecipe(NamespacedKey key,
ItemStack result)
Create a shaped recipe to craft the specified ItemStack.
|
ShapelessRecipe(ItemStack result)
已过时。
|
ShapelessRecipe(NamespacedKey key,
ItemStack result)
Create a shapeless recipe to craft the specified ItemStack.
|
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
MaterialData.toItemStack()
已过时。
这个方法创建一个大小为0的物品堆,通常没有用.
考虑使用
MaterialData.toItemStack(int) . |
ItemStack |
MaterialData.toItemStack(int amount)
基于这个MaterialData创建一个新的ItemStack.
|
限定符和类型 | 方法和说明 |
---|---|
ItemStack |
Potion.toItemStack(int amount)
已过时。
Converts this potion to an
ItemStack with the specified amount
and a correct damage value. |
限定符和类型 | 方法和说明 |
---|---|
void |
Potion.apply(ItemStack to)
已过时。
Applies the effects of this potion to the given
ItemStack . |
static Potion |
Potion.fromItemStack(ItemStack item)
已过时。
|