Package cn.nukkit.blockentity
Interface BlockEntityContainer
- All Known Implementing Classes:
BlockEntityBarrel
,BlockEntityBlastFurnace
,BlockEntityBrewingStand
,BlockEntityCampfire
,BlockEntityChest
,BlockEntityDispenser
,BlockEntityDropper
,BlockEntityEjectable
,BlockEntityFurnace
,BlockEntityHopper
,BlockEntityShulkerBox
,BlockEntitySmoker
,BlockEntitySpawnableContainer
@Deprecated(since="1.19.50-r3",
forRemoval=true)
@DeprecationDetails(since="1.19.50-r3",
reason="No usage at all & Confuse devs.",
replaceWith="cn.nukkit.inventory.InventoryHolder")
public interface BlockEntityContainer
Deprecated, for removal: This API element is subject to removal in a future version.
表达一个容器的接口。
An interface describes a container.
An interface describes a container.
BlockEntityContainer
容器必须包含物品的Item
对象。
A BlockEntityContainer
must contain items as Item
objects.
- Since:
- Nukkit 1.0 | Nukkit API 1.0.0
- Author:
- MagicDroidX(code) @ Nukkit Project, 粉鞋大妈(javadoc) @ Nukkit Project
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetItem
(int index) Deprecated, for removal: This API element is subject to removal in a future version.返回一个存储在容器里的物品的Item
对象。
Returns an item that stores in this container, as anItem
object.int
getSize()
Deprecated, for removal: This API element is subject to removal in a future version.返回这个容器最多能包含的物品数量。
Returns the max number of items that this container can contain.void
Deprecated, for removal: This API element is subject to removal in a future version.把一个物品存储进容器。
Sets or stores this item into this container.
-
Method Details
-
getItem
Deprecated, for removal: This API element is subject to removal in a future version.返回一个存储在容器里的物品的Item
对象。
Returns an item that stores in this container, as anItem
object.- Parameters:
index
- 这个物品的索引序号。
The index number of this item.- Returns:
- 这个物品的
Item
对象。
AnItem
object for this item. - Since:
- Nukkit 1.0 | Nukkit API 1.0.0
-
setItem
Deprecated, for removal: This API element is subject to removal in a future version.把一个物品存储进容器。
Sets or stores this item into this container.注意:如果这个容器相应的索引序号已经有了物品,那么新存储的物品将会替换原有的物品。
Notice: If there is already an item for this index number, the new item being stored will REPLACE the old one.- Parameters:
index
- 这个物品的索引序号。
The index number of this item.item
- 描述这个物品的Item
对象。
TheItem
object that describes this item.- Since:
- Nukkit 1.0 | Nukkit API 1.0.0
-
getSize
int getSize()Deprecated, for removal: This API element is subject to removal in a future version.返回这个容器最多能包含的物品数量。
Returns the max number of items that this container can contain.- Returns:
- 最多能包含的物品数量。
The max number. - Since:
- Nukkit 1.0 | Nukkit API 1.0.0
-