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
-
Method Summary
Modifier and TypeMethodDescriptionint
Get length of world side, in chunksGet server connection.Get texture atlas used for terrain.int
Get size in pixels of each sub-texture tile in the texture atlas.int
Get height of chunks in blocks.int
Get chunk size in blocks.Get texture used for water.boolean
Get if default minecraft texture tinting should be done.boolean
isUseVBO()
Get if the world should use VBO (vertex buffer objects) for rendering.void
setDoDefaultTint
(boolean doDefaultTint) Set if default minecraft texture tinting should be done.void
setGridSize
(int gridSize) Set length of world side, in chunksvoid
setServerConnection
(IServerConnection serverConnection) Set server connection.void
setTerrainTexture
(ResourceSource terrainTexture) Set texture atlas used for terrain.void
setTerrainTextureTileSize
(int terrainTextureTileSize) Set size in pixels of each sub-texture tile in the texture atlas.void
setTileHeight
(int tileHeight) Set height of chunks in blocks.void
setTileSize
(int tileSize) Set size of chunks in blocks.void
setUseVBO
(boolean useVBO) Set if the world should use VBO (vertex buffer objects) for rendering.void
setWaterTexture
(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
-true
if the default minecraft texture tinting should be done
-