BlockState
, Container
, InventoryHolder
, Lockable
, Lootable
, LootableInventory
, Metadatable
, Nameable
public interface Dispenser extends Container, Nameable, LootableInventory
Modifier and Type | Method | Description |
---|---|---|
boolean |
dispense() |
Attempts to dispense the contents of the dispenser.
|
BlockProjectileSource |
getBlockProjectileSource() |
Gets the BlockProjectileSource object for the dispenser.
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
getInventory, getSnapshotInventory
clearLootTable, getLootTableName, getLootTableSeed, hasLootTable, setLootTable, setLootTable, setLootTableSeed
getLastFilled, getLastLooted, getLastLooted, getNextRefill, hasBeenFilled, hasPendingRefill, hasPlayerLooted, hasPlayerLooted, isRefillEnabled, setHasPlayerLooted, setHasPlayerLooted, setNextRefill
getMetadata, hasMetadata, removeMetadata, setMetadata
getCustomName, setCustomName
BlockProjectileSource getBlockProjectileSource()
If the block represented by this state is no longer a dispenser, this will return null.
IllegalStateException
- if this block state is not placedboolean dispense()
If the block represented by this state is no longer a dispenser, this will return false.
IllegalStateException
- if this block state is not placedCopyright © 2019. All rights reserved.