diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/FullDataPointIdMap.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/FullDataPointIdMap.java index 7e1bf376c..66190fb09 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/FullDataPointIdMap.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/FullDataPointIdMap.java @@ -165,7 +165,7 @@ public class FullDataPointIdMap } if (dataPointEntryBySerialization.containsValue(entry)) { - LOGGER.error("Duplicate serialized entry found with value: " + entry.serialize()); + LOGGER.error("Duplicate serialized entry found with value: " + entry.serialize(levelWrapper)); } dataPointEntryBySerialization.put(entryString, entry); } @@ -187,7 +187,7 @@ public class FullDataPointIdMap for (int i = 0; i < entityCount; i++) { String entryString = inputStream.readUTF(); - Entry newEntry = Entry.deserialize(entryString); + Entry newEntry = Entry.deserialize(entryString, levelWrapper); newMap.entryList.add(newEntry); if (RUN_SERIALIZATION_DUPLICATE_VALIDATION) @@ -198,7 +198,7 @@ public class FullDataPointIdMap } if (dataPointEntryBySerialization.containsValue(newEntry)) { - LOGGER.error("Duplicate deserialized entry found with value: " + newEntry.serialize()); + LOGGER.error("Duplicate deserialized entry found with value: " + newEntry.serialize(levelWrapper)); } dataPointEntryBySerialization.put(entryString, newEntry); } @@ -278,10 +278,17 @@ public class FullDataPointIdMap } @Override - public String toString() { return this.serialize(); } - + public String toString() { + return this.serialize(); + } - public String serialize(ILevelWrapper levelWrapper) { return this.biome.serialize(levelWrapper) + SEPARATOR_STRING + this.blockState.serialize(levelWrapper); } + public String serialize(ILevelWrapper levelWrapper) { + return this.biome.serialize(levelWrapper) + BLOCK_STATE_SEPARATOR_STRING + this.blockState.serialize(levelWrapper); + } + + public String serialize() { + return this.biome.serialize() + BLOCK_STATE_SEPARATOR_STRING + this.blockState.serialize(); + } public static Entry deserialize(String str, ILevelWrapper levelWrapper) throws IOException, InterruptedException { diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java index 9d15baf02..129e395a1 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/CompleteFullDataSource.java @@ -242,8 +242,7 @@ public class CompleteFullDataSource extends FullDataArrayAccessor implements IFu throw new IOException("Invalid data content end guard for ID mapping"); } - return FullDataPointIdMap.deserialize(inputStream, levelWrapper); - return FullDataPointIdMap.deserialize(inputStream, this.sectionPos); + return FullDataPointIdMap.deserialize(inputStream, this.sectionPos, levelWrapper); } @Override public void setIdMapping(FullDataPointIdMap mappings) { this.mapping.mergeAndReturnRemappedEntityIds(mappings); } diff --git a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/HighDetailIncompleteFullDataSource.java b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/HighDetailIncompleteFullDataSource.java index 176d44fd6..eeff0ce17 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/HighDetailIncompleteFullDataSource.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/dataObjects/fullData/sources/HighDetailIncompleteFullDataSource.java @@ -365,10 +365,10 @@ public class HighDetailIncompleteFullDataSource implements IIncompleteFullDataSo } @Override - public void writeIdMappings(DhDataOutputStream dataOutputStream) throws IOException + public void writeIdMappings(DhDataOutputStream outputStream, ILevelWrapper levelWrapper) throws IOException { - dataOutputStream.writeInt(IFullDataSource.DATA_GUARD_BYTE); - this.mapping.serialize(dataOutputStream); + outputStream.writeInt(IFullDataSource.DATA_GUARD_BYTE); + this.mapping.serialize(outputStream, levelWrapper); } @Override diff --git a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/block/IBlockStateWrapper.java b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/block/IBlockStateWrapper.java index d8ae596d4..d4229b95a 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/block/IBlockStateWrapper.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/wrapperInterfaces/block/IBlockStateWrapper.java @@ -7,13 +7,15 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.world.ILevelWrapper; public interface IBlockStateWrapper extends IDhApiBlockStateWrapper { String serialize(ILevelWrapper levelWrapper); - - /** - * Returning a value of 0 means the block is completely transparent.