public interface Dispenser extends Container, Nameable, Lootable
限定符和类型 | 方法和说明 |
---|---|
boolean |
dispense()
尝试发射发射器内的物品.
|
BlockProjectileSource |
getBlockProjectileSource()
获取此发射器的BlockProjectileSource对象.
|
getInventory, getSnapshotInventory
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
getCustomName, setCustomName
getLootTable, getSeed, setLootTable, setSeed
BlockProjectileSource 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
- 如果方块状态未应用(译注:仅仅是一种表示而未应用到实际的方块上)