From 777ed9215a33baf40949aa7b0f85790dad8c0429 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 8 Feb 2026 17:25:27 -0600 Subject: [PATCH] datasource v1 mapping decode cleanup --- .../dataObjects/fullData/sources/FullDataSourceV1.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/FullDataSourceV1.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/FullDataSourceV1.java index 36bde4d8e..ff63b7d24 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/FullDataSourceV1.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/FullDataSourceV1.java @@ -166,8 +166,7 @@ public class FullDataSourceV1 this.setDataPoints(dataPoints); - FullDataPointIdMap mapping = this.readIdMappings(inputStream, level.getLevelWrapper()); - this.setIdMapping(mapping); + this.readIdMappings(this.mapping, inputStream, level.getLevelWrapper()); } @@ -347,7 +346,7 @@ public class FullDataSourceV1 outputStream.writeInt(DATA_GUARD_BYTE); this.mapping.serialize(outputStream); } - public FullDataPointIdMap readIdMappings(DhDataInputStream inputStream, ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException + public void readIdMappings(FullDataPointIdMap map, DhDataInputStream inputStream, ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException { int guardByte = inputStream.readInt(); if (guardByte != DATA_GUARD_BYTE) @@ -355,11 +354,8 @@ public class FullDataSourceV1 throw new IOException("Invalid data content end guard for ID mapping"); } - FullDataPointIdMap newMap = new FullDataPointIdMap(this.pos); - FullDataPointIdMap.deserialize(newMap, inputStream, this.pos, levelWrapper); - return newMap; + FullDataPointIdMap.deserialize(map, inputStream, this.pos, levelWrapper); } - public void setIdMapping(FullDataPointIdMap mappings) { this.mapping.mergeAndReturnRemappedEntityIds(mappings); }