public class CompleteMap extends AbstractMap
Constructor and Description |
---|
CompleteMap(java.io.File name,
Generator generator,
int saveSlot) |
CompleteMap(java.io.File name,
int saveSlot) |
Modifier and Type | Method and Description |
---|---|
AbstractMap |
clone()
Clones the map.
|
CoreData |
getBlock(Coordinate coord) |
CoreData |
getBlock(int x,
int y,
int z)
Returns a block without checking the parameters first.
|
int |
getBlocksX()
Returns the amount of Blocks inside the map in x-direction.
|
int |
getBlocksY()
Returns the amount of Blocks inside the map in y-direction.
|
int |
getBlocksZ()
Returns the amount of Blocks inside the map in z-direction.
|
CoreData[][][] |
getData()
Get the data of the map
|
void |
postUpdate(float dt)
Called after the view update to catch changes caused by the view
|
void |
print()
prints the map to console
|
boolean |
save(int saveSlot)
saves every chunk on the map
|
void |
setBlock(Coordinate coord,
CoreData block)
Replace a block.
|
void |
setBlock(RenderBlock block)
Replace a block.
|
addLinkedObject, createSaveSlot, createSaveSlot, dispose, getCenter, getCenter, getCurrentSaveSlot, getCVars, getDefaultGenerator, getEntitys, getEntitys, getEntitysOnCoord, getEntitysOnCoord, getGameDepth, getGameHeight, getGameSpeed, getGameWidth, getGenerator, getGroundBlock, getIterator, getLinkedObjects, getPath, getSaveCVars, getSavesCount, getSavesCount, getWorldSpinDirection, hasSaveSlot, isModified, modificationCheck, modified, newSaveSlot, newSaveSlot, newSaveSlot, onModified, setCustomMapCVarRegistration, setCVarSystem, setDefaultGenerator, setGameSpeed, setGenerator, update, useSaveSlot
public CompleteMap(java.io.File name, int saveSlot) throws java.io.IOException
java.io.IOException
public CompleteMap(java.io.File name, Generator generator, int saveSlot) throws java.io.IOException
java.io.IOException
public CoreData getBlock(Coordinate coord)
getBlock
in class AbstractMap
public CoreData getBlock(int x, int y, int z)
AbstractMap
getBlock
in class AbstractMap
x
- coordinatey
- coordinatez
- coordinatepublic boolean save(int saveSlot)
AbstractMap
save
in class AbstractMap
public void setBlock(RenderBlock block)
AbstractMap
setBlock
in class AbstractMap
block
- no null pointerAbstractMap.setBlock(com.BombingGames.WurfelEngine.Core.Gameobjects.RenderBlock)
public void setBlock(Coordinate coord, CoreData block)
AbstractMap
setBlock
in class AbstractMap
AbstractMap.setBlock(com.BombingGames.WurfelEngine.Core.Gameobjects.RenderBlock)
public CoreData[][][] getData()
public int getBlocksX()
getBlocksX
in class AbstractMap
public int getBlocksY()
getBlocksY
in class AbstractMap
public int getBlocksZ()
getBlocksZ
in class AbstractMap
public void print()
AbstractMap
print
in class AbstractMap
public void postUpdate(float dt)
AbstractMap
postUpdate
in class AbstractMap
public AbstractMap clone() throws java.lang.CloneNotSupportedException
AbstractMap
clone
in class AbstractMap
java.lang.CloneNotSupportedException