Package de.eimmer.block
Interface Dispenser
- All Superinterfaces:
Ausbeutbar
,BestaendigeDatenInhaber
,BlockInventarInhaber
,BlockState
,Container
,InventarInhaber
,Lockable
,MetadatenInhaber
,Nennbar
,TileState
Represents a captured state of a dispenser.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
dispense()
Attempts to dispense the contents of the dispenser.Gets the BlockProjektilQuelle object for the dispenser.Methods inherited from interface de.eimmer.beute.Ausbeutbar
getLootTable, getSeed, setLootTable, setSeed
Methods inherited from interface de.eimmer.inventar.BlockInventarInhaber
getBlock
Methods inherited from interface de.eimmer.block.BlockState
copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface de.eimmer.block.Container
getInventory, getSnapshotInventory
Methods inherited from interface de.eimmer.metadaten.MetadatenInhaber
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface de.eimmer.Nennbar
getCustomName, setCustomName
Methods inherited from interface de.eimmer.block.TileState
getPersistentDataContainer
-
Method Details
-
getBlockProjectileSource
Gets the BlockProjektilQuelle object for the dispenser.If the block represented by this state is no longer a dispenser, this will return null.
- Returns:
- a BlockProjektilQuelle if valid, otherwise null
- Throws:
IllegalStateException
- if this block state is not placed
-
dispense
boolean dispense()Attempts to dispense the contents of the dispenser.If the block represented by this state is no longer a dispenser, this will return false.
- Returns:
- true if successful, otherwise false
- Throws:
IllegalStateException
- if this block state is not placed
-