Package net.minecraft.world
Class CompoundContainer
java.lang.Object
net.minecraft.world.CompoundContainer
-
Field Summary
FieldsFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(int pIndex, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.void
boolean
Return whether the given inventory is part of this large chest.int
getItem
(int pIndex) Returns the stack in the given slot.int
boolean
isEmpty()
removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.void
void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
boolean
stillValid
(Player pPlayer) Don't rename this method to canInteractWith due to conflicts with Containervoid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf
-
Field Details
-
container1
-
container2
-
-
Constructor Details
-
CompoundContainer
-
-
Method Details
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
isEmpty
public boolean isEmpty() -
contains
Return whether the given inventory is part of this large chest. -
getItem
Returns the stack in the given slot. -
removeItem
Removes up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItem
in interfaceContainer
-
removeItemNoUpdate
Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdate
in interfaceContainer
-
setItem
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). -
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSize
in interfaceContainer
-
setChanged
public void setChanged()- Specified by:
setChanged
in interfaceContainer
-
stillValid
Don't rename this method to canInteractWith due to conflicts with Container- Specified by:
stillValid
in interfaceContainer
-
startOpen
-
stopOpen
-
canPlaceItem
Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For guis use Slot.isItemValid- Specified by:
canPlaceItem
in interfaceContainer
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceClearable
-