BlockInventoryHolder
, BlockState
, Container
, InventoryHolder
, Lockable
, Lootable
, LootableBlockInventory
, LootableInventory
, Metadatable
, Nameable
, PersistentDataHolder
, TileState
public interface Dispenser extends Container, Nameable, LootableBlockInventory
Modifier and Type | Method | Description |
---|---|---|
boolean |
dispense() |
Attempts to dispense the contents of the dispenser.
|
@Nullable BlockProjectileSource |
getBlockProjectileSource() |
Gets the BlockProjectileSource object for the dispenser.
|
getBlock
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getInventory, getSnapshotInventory
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
getBlock
getLastFilled, getLastLooted, getLastLooted, getNextRefill, hasBeenFilled, hasPendingRefill, hasPlayerLooted, hasPlayerLooted, isRefillEnabled, setHasPlayerLooted, setHasPlayerLooted, setNextRefill
getMetadata, hasMetadata, removeMetadata, setMetadata
getCustomName, setCustomName
getPersistentDataContainer
@Nullable @Nullable 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 © 2020. All rights reserved.