Package com.ardorcraft.world
Class WorldSettings
java.lang.Object
com.ardorcraft.world.WorldSettings
Settings class for setting up the BlockWorld object.
terrainTexture, terrainTextureTileSize, waterTexture and serverConnection has to be setup.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet length of world side, in chunksGet server connection.Get texture atlas used for terrain.intGet size in pixels of each sub-texture tile in the texture atlas.intGet height of chunks in blocks.intGet chunk size in blocks.Get texture used for water.booleanGet if default minecraft texture tinting should be done.booleanisUseVBO()Get if the world should use VBO (vertex buffer objects) for rendering.voidsetDoDefaultTint(boolean doDefaultTint) Set if default minecraft texture tinting should be done.voidsetGridSize(int gridSize) Set length of world side, in chunksvoidsetServerConnection(IServerConnection serverConnection) Set server connection.voidsetTerrainTexture(ResourceSource terrainTexture) Set texture atlas used for terrain.voidsetTerrainTextureTileSize(int terrainTextureTileSize) Set size in pixels of each sub-texture tile in the texture atlas.voidsetTileHeight(int tileHeight) Set height of chunks in blocks.voidsetTileSize(int tileSize) Set size of chunks in blocks.voidsetUseVBO(boolean useVBO) Set if the world should use VBO (vertex buffer objects) for rendering.voidsetWaterTexture(ResourceSource waterTexture) Set texture used for water.
-
Constructor Details
-
WorldSettings
public WorldSettings() -
WorldSettings
Copy constructor for WorldSettings.- Parameters:
settings- WorldSettings to copy
-
-
Method Details
-
getTileSize
public int getTileSize()Get chunk size in blocks.- Returns:
- int
-
setTileSize
public void setTileSize(int tileSize) Set size of chunks in blocks.- Parameters:
tileSize- int
-
getTileHeight
public int getTileHeight()Get height of chunks in blocks.- Returns:
- int
-
setTileHeight
public void setTileHeight(int tileHeight) Set height of chunks in blocks.- Parameters:
tileHeight- int
-
getGridSize
public int getGridSize()Get length of world side, in chunks- Returns:
- int
-
setGridSize
public void setGridSize(int gridSize) Set length of world side, in chunks- Parameters:
gridSize- int
-
getTerrainTexture
Get texture atlas used for terrain.- Returns:
- ResourceSource
-
setTerrainTexture
Set texture atlas used for terrain.- Parameters:
terrainTexture- ResourceSource
-
getTerrainTextureTileSize
public int getTerrainTextureTileSize()Get size in pixels of each sub-texture tile in the texture atlas.- Returns:
- int
-
setTerrainTextureTileSize
public void setTerrainTextureTileSize(int terrainTextureTileSize) Set size in pixels of each sub-texture tile in the texture atlas. (typically 16x16, 32x32 etc)- Parameters:
terrainTextureTileSize- int
-
getWaterTexture
Get texture used for water.- Returns:
- ResourceSource
-
setWaterTexture
Set texture used for water. (current not used)- Parameters:
waterTexture- ResourceSource
-
getServerConnection
Get server connection.- Returns:
- IServerConnection
-
setServerConnection
Set server connection.- Parameters:
serverConnection- IServerConnection
-
isUseVBO
public boolean isUseVBO()Get if the world should use VBO (vertex buffer objects) for rendering.- Returns:
- boolean
-
setUseVBO
public void setUseVBO(boolean useVBO) Set if the world should use VBO (vertex buffer objects) for rendering. Default is true.- Parameters:
useVBO- boolean
-
isDoDefaultTint
public boolean isDoDefaultTint()Get if default minecraft texture tinting should be done. This will be turned into something completely configurable later on.- Returns:
- boolean
-
setDoDefaultTint
public void setDoDefaultTint(boolean doDefaultTint) Set if default minecraft texture tinting should be done. This will be turned into something completely configurable later on.- Parameters:
doDefaultTint-trueif the default minecraft texture tinting should be done
-