BlockContainerSingleItem

Link to blockcontainersingleitem

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.world.BlockContainerSingleItem;

Implemented Interfaces

Link to implemented-interfaces

BlockContainerSingleItem implements the following interfaces. That means all methods defined in these interfaces are also available in BlockContainerSingleItem

Link to getContainerBlockEntity

Name: getContainerBlockEntity

Gets the BlockEntity that holds the container.

Returns: The BlockEntity that holds the container.
Return Type: BlockEntity

ZenScript
Copy
// BlockContainerSingleItem.getContainerBlockEntity() as BlockEntity

myBlockContainerSingleItem.getContainerBlockEntity();

Name: stillValid

Checks if the player container is still valid for a player to interact with.

Returns: Whether the player can still access the container.
Return Type: boolean

ZenScript
Copy
BlockContainerSingleItem.stillValid(player as Player) as boolean
ParameterTypeDescription
Parameter
player
Type
Player
Description
The player interacting with the container.