Unhardcode geodata file format.

This commit is contained in:
MobiusDevelopment
2021-04-02 08:51:23 +00:00
parent a04a0f244b
commit 180b096997
23 changed files with 23 additions and 69 deletions

View File

@ -52,8 +52,6 @@ public class GeoEngine
{
protected static final Logger LOGGER = Logger.getLogger(GeoEngine.class.getName());
private static final String FILE_NAME_FORMAT = "%d_%d.l2j";
private final ABlock[][] _blocks;
private final BlockNull _nullBlock;
@ -81,7 +79,7 @@ public class GeoEngine
{
for (int regionY = World.TILE_Y_MIN; regionY <= World.TILE_Y_MAX; regionY++)
{
final Path geoFilePath = Config.GEODATA_PATH.resolve(String.format(FILE_NAME_FORMAT, regionX, regionY));
final Path geoFilePath = Config.GEODATA_PATH.resolve(String.format(Config.GEODATA_TYPE.getFilename(), regionX, regionY));
if (Files.exists(geoFilePath))
{
// Region file is load-able, try to load it.