Compare commits
5 Commits
626f25c3c8
...
86c32221fb
Author | SHA1 | Date |
---|---|---|
|
86c32221fb | |
|
f689bafd31 | |
|
16dfe8c706 | |
|
2ce30b8e90 | |
|
c260b92c45 |
|
@ -1,3 +1,4 @@
|
|||
integration
|
||||
logs
|
||||
tiles
|
||||
mapblocks
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
The application drwas its configuration from the `tileserver.properties` file.
|
||||
Key and values should be separated by a `=` (see **Example config**)
|
||||
|
||||
## Example config
|
||||
|
||||
Example for a setup with server-name **myhost**:
|
||||
```
|
||||
#tileserver.properties
|
||||
minetest.db.url=jdbc:postgresql://myhost:5432/postgres
|
||||
minetest.db.username=postgres
|
||||
minetest.db.password=1234
|
||||
```
|
||||
|
||||
## Configuration parameters
|
||||
|
||||
### http.port
|
||||
Port to expose http server on
|
||||
* Default: **8080**
|
||||
|
||||
### tilerenderer.updateinterval
|
||||
Update interval to check for new tiles (in seconds)
|
||||
* Default: **20**
|
||||
|
||||
### tilerenderer.initialrendering.enable
|
||||
Enable initial rendering, renders/caches all tiles on startup and disables the realtime tile-update until restarted with false again.
|
||||
Leaving this to default (false) renders all tiles on-demand
|
||||
* Default: **false**
|
||||
|
||||
### player.updateinterval
|
||||
Update interval to check for Player movements (in seconds)
|
||||
* Default: **2**
|
||||
|
||||
### minetest.db.url
|
||||
Url for DB Connection (jdbc connection string)
|
||||
* Default: **jdbc:postgresql://127.0.0.1:5432/minetest**
|
||||
|
||||
### minetest.db.username
|
||||
Username for DB Connection
|
||||
* Default: **sa**
|
||||
|
||||
### minetest.db.password
|
||||
Username for DB Connection
|
||||
* Default:
|
||||
|
||||
### minetest.db.driver
|
||||
Driver for DB Connection (only psql supported for now)
|
||||
* Default: **org.postgresql.Driver**
|
||||
|
||||
### block.parser.poi.enable
|
||||
Enable parsing of POI blocks, provided with the mod in this repository
|
||||
* Default: **true**
|
||||
|
||||
### block.parser.travelnet.enable
|
||||
Enable parsing of Travelnet boxes
|
||||
* Default: **true**
|
||||
|
||||
### colors.file
|
||||
Supply an external colors file supplementary to the builtin tables
|
||||
Should be a valid filename or empty (no external colors)
|
||||
* Default: **none**
|
61
readme.md
61
readme.md
|
@ -43,66 +43,7 @@ Please create an issue with minetest-version and MapBlock info in the bug-tracke
|
|||
|
||||
# Configuring
|
||||
|
||||
The application drwas its configuration from the `tileserver.properties` file.
|
||||
Key and values should be separated by a `=` (see **Example config**)
|
||||
|
||||
## Example config
|
||||
|
||||
Example for a setup with server-name **myhost**:
|
||||
```
|
||||
#tileserver.properties
|
||||
minetest.db.url=jdbc:postgresql://myhost:5432/postgres
|
||||
minetest.db.username=postgres
|
||||
minetest.db.password=1234
|
||||
```
|
||||
|
||||
## Configuration parameters
|
||||
|
||||
### http.port
|
||||
Port to expose http server on
|
||||
* Default: **8080**
|
||||
|
||||
### tilerenderer.updateinterval
|
||||
Update interval to check for new tiles (in seconds)
|
||||
* Default: **20**
|
||||
|
||||
### tilerenderer.initialrendering.enable
|
||||
Enable initial rendering, renders/caches all tiles on startup and disables the realtime tile-update until restarted with false again.
|
||||
Leaving this to default (false) renders all tiles on-demand
|
||||
* Default: **false**
|
||||
|
||||
### player.updateinterval
|
||||
Update interval to check for Player movements (in seconds)
|
||||
* Default: **2**
|
||||
|
||||
### minetest.db.url
|
||||
Url for DB Connection (jdbc connection string)
|
||||
* Default: **jdbc:postgresql://127.0.0.1:5432/minetest**
|
||||
|
||||
### minetest.db.username
|
||||
Username for DB Connection
|
||||
* Default: **sa**
|
||||
|
||||
### minetest.db.password
|
||||
Username for DB Connection
|
||||
* Default:
|
||||
|
||||
### minetest.db.driver
|
||||
Driver for DB Connection (only psql supported for now)
|
||||
* Default: **org.postgresql.Driver**
|
||||
|
||||
### block.parser.poi.enable
|
||||
Enable parsing of POI blocks, provided with the mod in this repository
|
||||
* Default: **true**
|
||||
|
||||
### block.parser.travelnet.enable
|
||||
Enable parsing of Travelnet boxes
|
||||
* Default: **true**
|
||||
|
||||
### colors.file
|
||||
Supply an external colors file supplementary to the builtin tables
|
||||
Should be a valid filename or empty (no external colors)
|
||||
* Default: **none**
|
||||
See [config](docs/config.md)
|
||||
|
||||
# How it works
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class MapBlockParser {
|
|||
block.version = data[0];
|
||||
|
||||
|
||||
if (block.version != 28) {
|
||||
if (block.version < 25 || block.version > 28) {
|
||||
logger.error("block version not supported: {}", block.version);
|
||||
throw new IllegalArgumentException("block version not supported: " + block.version);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class MapBlockParser {
|
|||
//data[4] = content_width (2)
|
||||
|
||||
//data[5] = params_width (2)
|
||||
int dataOffset = 6;
|
||||
int dataOffset = block.version >= 27 ? 6 : 4;
|
||||
|
||||
Inflater inflater = new Inflater();
|
||||
inflater.setInput(data, dataOffset, data.length - dataOffset);
|
||||
|
|
|
@ -35,6 +35,7 @@ public class UpdateChangedTilesTest extends TileServerTest {
|
|||
|
||||
MapBlockCoordinate mapBlockCoordinate = new MapBlockCoordinate(0, 0);
|
||||
TileCoordinate tileCoordinate = CoordinateFactory.getTileCoordinateFromMapBlock(mapBlockCoordinate);
|
||||
tileCoordinate = CoordinateFactory.getZoomedOutTile(tileCoordinate);
|
||||
|
||||
logger.debug("Mapblock X={} Z={} / Tile X={} Y={} Zoom={}",
|
||||
mapBlockCoordinate.x, mapBlockCoordinate.z,
|
||||
|
|
Loading…
Reference in New Issue