Class WorldSettings

java.lang.Object
com.ardorcraft.world.WorldSettings

public class WorldSettings extends Object
Settings class for setting up the BlockWorld object.

terrainTexture, terrainTextureTileSize, waterTexture and serverConnection has to be setup.

  • Constructor Details

    • WorldSettings

      public WorldSettings()
    • WorldSettings

      public WorldSettings(WorldSettings settings)
      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

      public ResourceSource getTerrainTexture()
      Get texture atlas used for terrain.
      Returns:
      ResourceSource
    • setTerrainTexture

      public void setTerrainTexture(ResourceSource terrainTexture)
      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

      public ResourceSource getWaterTexture()
      Get texture used for water.
      Returns:
      ResourceSource
    • setWaterTexture

      public void setWaterTexture(ResourceSource waterTexture)
      Set texture used for water. (current not used)
      Parameters:
      waterTexture - ResourceSource
    • getServerConnection

      public IServerConnection getServerConnection()
      Get server connection.
      Returns:
      IServerConnection
    • setServerConnection

      public void setServerConnection(IServerConnection serverConnection)
      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