类 SimpleContainer
java.lang.Object
net.minecraft.world.SimpleContainer
- 所有已实现的接口:
Clearable
,Container
,StackedContentsCompatible
- 直接已知子类:
ComposterBlock.EmptyContainer
,ComposterBlock.InputContainer
,ComposterBlock.OutputContainer
,PlayerEnderChestContainer
-
字段概要
字段从接口继承的字段 net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addListener
(ContainerListener pListener) boolean
canAddItem
(ItemStack pStack) void
void
fillStackedContents
(StackedContents pHelper) void
int
getItem
(int pIndex) boolean
isEmpty()
private void
moveItemsBetweenStacks
(ItemStack pStack, ItemStack pOther) private void
moveItemToEmptySlots
(ItemStack pStack) private void
removeItem
(int pIndex, int pCount) removeItemNoUpdate
(int pIndex) removeItemType
(Item pItem, int pAmount) void
removeListener
(ContainerListener pListener) void
void
boolean
stillValid
(Player pPlayer) toString()
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
-
字段详细资料
-
size
private final int size -
items
-
listeners
-
-
构造器详细资料
-
SimpleContainer
public SimpleContainer(int pSize) -
SimpleContainer
-
-
方法详细资料
-
addListener
-
removeListener
-
getItem
-
removeAllItems
-
removeItem
- 指定者:
removeItem
在接口中Container
-
removeItemType
-
addItem
-
canAddItem
-
removeItemNoUpdate
- 指定者:
removeItemNoUpdate
在接口中Container
-
setItem
-
getContainerSize
public int getContainerSize()- 指定者:
getContainerSize
在接口中Container
-
isEmpty
public boolean isEmpty() -
setChanged
public void setChanged()- 指定者:
setChanged
在接口中Container
-
stillValid
- 指定者:
stillValid
在接口中Container
-
clearContent
public void clearContent()- 指定者:
clearContent
在接口中Clearable
-
fillStackedContents
- 指定者:
fillStackedContents
在接口中StackedContentsCompatible
-
toString
-
moveItemToEmptySlots
-
moveItemToOccupiedSlotsWithSameType
-
moveItemsBetweenStacks
-
fromTag
-
createTag
-