mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Fixed ZoneData property names being serialized incorrectly
This commit is contained in:
parent
c120ab5d79
commit
2dead799e3
2 changed files with 12 additions and 3 deletions
|
@ -79,8 +79,15 @@ public class Zone {
|
|||
this(documentId, config.getName(), config.getBiome(), config.getWidth(), config.getHeight());
|
||||
surface = data.getSurface();
|
||||
sunlight = data.getSunlight();
|
||||
pendingSunlight.addAll(data.getPendingSunlight());
|
||||
chunksExplored = data.getChunksExplored();
|
||||
|
||||
// Ha ha silly me!
|
||||
if(data.getPendingSunlight() != null) {
|
||||
pendingSunlight.addAll(data.getPendingSunlight());
|
||||
}
|
||||
|
||||
if(data.getChunksExplored() != null) {
|
||||
chunksExplored = data.getChunksExplored();
|
||||
}
|
||||
}
|
||||
|
||||
public Zone(String documentId, String name, Biome biome, int width, int height) {
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.msgpack.core.MessageUnpacker;
|
|||
import org.msgpack.jackson.dataformat.MessagePackFactory;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
|
||||
import brainwine.gameserver.util.ZipUtils;
|
||||
import brainwine.gameserver.zone.gen.ZoneGenerator;
|
||||
|
@ -28,7 +29,8 @@ import brainwine.shared.JsonHelper;
|
|||
public class ZoneManager {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
private final ObjectMapper mapper = new ObjectMapper(new MessagePackFactory());
|
||||
private final ObjectMapper mapper = new ObjectMapper(new MessagePackFactory())
|
||||
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
|
||||
private final File dataDir = new File("zones");
|
||||
private Map<String, Zone> zones = new HashMap<>();
|
||||
private Map<String, Zone> zonesByName = new HashMap<>();
|
||||
|
|
Loading…
Add table
Reference in a new issue