public abstract class BlockBag
extends java.lang.Object
Constructor and Description |
---|
BlockBag() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addSingleSourcePosition(Location pos)
Adds a position to be used a source.
|
abstract void |
addSourcePosition(Location pos)
Adds a position to be used a source.
|
abstract void |
fetchBlock(BlockState blockState)
Get a block.
|
void |
fetchPlacedBlock(BlockState blockState)
Sets a block as if it was placed by hand.
|
abstract void |
flushChanges()
Flush any changes.
|
boolean |
peekBlock(BlockState blockState)
Checks to see if a block exists without removing it.
|
void |
storeBlock(BlockState blockState)
Store a block.
|
abstract void |
storeBlock(BlockState blockState,
int amount)
Store a block.
|
void |
storeDroppedBlock(BlockState blockState)
Stores a block as if it was mined.
|
public void storeDroppedBlock(BlockState blockState) throws BlockBagException
blockState
- the block stateBlockBagException
- on errorpublic void fetchPlacedBlock(BlockState blockState) throws BlockBagException
blockState
- The block stateBlockBagException
- on errorpublic abstract void fetchBlock(BlockState blockState) throws BlockBagException
blockState
- the block stateBlockBagException
- on errorpublic void storeBlock(BlockState blockState) throws BlockBagException
blockState
- The block stateBlockBagException
- on errorpublic abstract void storeBlock(BlockState blockState, int amount) throws BlockBagException
blockState
- The block stateamount
- The amountBlockBagException
- on errorpublic boolean peekBlock(BlockState blockState)
blockState
- the block statepublic abstract void flushChanges()
public abstract void addSourcePosition(Location pos)
pos
- the positionpublic abstract void addSingleSourcePosition(Location pos)
pos
- the position