public interface Dispenser extends Container, Nameable
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
dispense()
尝试发射发射器内的物品.
|
BlockProjectileSource |
getBlockProjectileSource()
获取此发射器的BlockProjectileSource对象.
|
getInventory, getSnapshotInventorygetBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, updategetMetadata, hasMetadata, removeMetadata, setMetadatagetCustomName, setCustomNameBlockProjectileSource getBlockProjectileSource()
如果这个方块不是发射器,将返回null.
原文: Gets the BlockProjectileSource object for the dispenser.
If the block represented by this state is no longer a dispenser, this will return null.
java.lang.IllegalStateException - 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)boolean dispense()
如果这个方块不是发射器,将返回false.
原文: Attempts to dispense the contents of the dispenser.
If the block represented by this state is no longer a dispenser, this will return false.
java.lang.IllegalStateException - 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)