mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Update DataConverter
This commit is contained in:
@@ -5267,7 +5267,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ final CompoundTag sections = new CompoundTag();
|
||||
+ ret.put("Sections", sections);
|
||||
+
|
||||
+ ret.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
|
||||
+ ret.putInt("DataVersion", SharedConstants.getCurrentVersion().getDataVersion().getVersion());
|
||||
+
|
||||
+ final ServerLevel world = this.world;
|
||||
+ final PoiManager poiManager = world.getPoiManager();
|
||||
@@ -7306,7 +7306,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // run converters
|
||||
+ final int dataVersion = !data.contains(SharedConstants.DATA_VERSION_TAG, 99) ? 1945 : data.getInt(SharedConstants.DATA_VERSION_TAG);
|
||||
+ final CompoundTag converted = MCDataConverter.convertTag(
|
||||
+ MCTypeRegistry.POI_CHUNK, data, dataVersion, SharedConstants.getCurrentVersion().getWorldVersion()
|
||||
+ MCTypeRegistry.POI_CHUNK, data, dataVersion, SharedConstants.getCurrentVersion().getDataVersion().getVersion()
|
||||
+ );
|
||||
+
|
||||
+ // now we need to parse it
|
||||
@@ -17341,7 +17341,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- private CompoundTag upgradeChunkTag(CompoundTag chunkNbt) {
|
||||
+ public static CompoundTag upgradeChunkTag(CompoundTag chunkNbt) { // Paper - public and static
|
||||
int i = NbtUtils.getDataVersion(chunkNbt, -1);
|
||||
return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, net.minecraft.SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - route to new converter system
|
||||
return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - route to new converter system
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user