ContainerTrait
This trait implements most methods in the {@link Container} interface. It should only be used by Tiles.
Table of Contents
- $lock : string|null
- canOpenWith() : bool
- getRealInventory() : Inventory
- getPosition() : Position
- loadItems() : void
- onBlockDestroyedHook() : void
- saveItems() : void
Properties
$lock
private
string|null
$lock
= null
Methods
canOpenWith()
public
canOpenWith(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —getRealInventory()
public
abstract getRealInventory() : Inventory
Return values
Inventory —getPosition()
protected
abstract getPosition() : Position
Tags
Return values
Position —loadItems()
protected
loadItems(CompoundTag $tag) : void
Parameters
- $tag : CompoundTag
Return values
void —onBlockDestroyedHook()
protected
onBlockDestroyedHook() : void
Tags
Return values
void —saveItems()
protected
saveItems(CompoundTag $tag) : void
Parameters
- $tag : CompoundTag