public abstract class BlockBag
extends java.lang.Object
Constructor and Description |
---|
BlockBag() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addSingleSourcePosition(WorldVector pos)
Adds a position to be used a source.
|
abstract void |
addSourcePosition(WorldVector pos)
Adds a position to be used a source.
|
void |
fetchBlock(int id)
Get a block.
|
void |
fetchItem(BaseItem item)
Get a block.
|
void |
fetchPlacedBlock(int id)
Deprecated.
Use
fetchPlacedBlock(int,int) instead |
void |
fetchPlacedBlock(int id,
int data)
Sets a block as if it was placed by hand.
|
abstract void |
flushChanges()
Flush any changes.
|
boolean |
peekBlock(int id)
Checks to see if a block exists without removing it.
|
void |
storeBlock(int id)
Store a block.
|
void |
storeDroppedBlock(int id)
Deprecated.
Use
storeDroppedBlock(int, int) instead |
void |
storeDroppedBlock(int id,
int data)
Stores a block as if it was mined.
|
void |
storeItem(BaseItem item)
Store a block.
|
@Deprecated public void storeDroppedBlock(int id) throws BlockBagException
storeDroppedBlock(int, int)
insteadid
- the type IDBlockBagException
- on errorpublic void storeDroppedBlock(int id, int data) throws BlockBagException
id
- the type IDdata
- the data valueBlockBagException
- on error@Deprecated public void fetchPlacedBlock(int id) throws BlockBagException
fetchPlacedBlock(int,int)
insteadid
- the type IDBlockBagException
- on errorpublic void fetchPlacedBlock(int id, int data) throws BlockBagException
id
- the type IDdata
- the data valueBlockBagException
- on errorpublic void fetchBlock(int id) throws BlockBagException
Either this method or fetchItem needs to be overridden.
id
- the type IDBlockBagException
- on errorpublic void fetchItem(BaseItem item) throws BlockBagException
Either this method or fetchItem needs to be overridden.
item
- the itemBlockBagException
- on errorpublic void storeBlock(int id) throws BlockBagException
Either this method or fetchItem needs to be overridden.
id
- the type IDBlockBagException
- on errorpublic void storeItem(BaseItem item) throws BlockBagException
Either this method or fetchItem needs to be overridden.
item
- the itemBlockBagException
- on errorpublic boolean peekBlock(int id)
id
- the type IDpublic abstract void flushChanges()
public abstract void addSourcePosition(WorldVector pos)
pos
- the positionpublic abstract void addSingleSourcePosition(WorldVector pos)
pos
- the position