Fix structure loading

This commit is contained in:
Jake Potrebic 2023-03-15 18:57:29 -07:00
parent a2918a5fea
commit 4f933b2405
No known key found for this signature in database
GPG Key ID: 27CC63F7CBC866C7

View File

@ -23190,7 +23190,7 @@ index 15a9736a870055d639d03063c7cf67fd769fff36..1ca00340aaa201dd34e5c350d23ef53e
LOGGER.warn("Failed to partially datafix chunk {}", pos, var12); LOGGER.warn("Failed to partially datafix chunk {}", pos, var12);
return StructureCheckResult.CHUNK_LOAD_NEEDED; return StructureCheckResult.CHUNK_LOAD_NEEDED;
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java
index 6ffca6d4ad2dbd26651760d2a8a5208689d5baf8..44b30217e549cda0b881e2799ffe8fbe06af2ce4 100644 index 6ffca6d4ad2dbd26651760d2a8a5208689d5baf8..88dbbef7fc0a217d821a63a55b0b03b45d78c36f 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java
@@ -235,7 +235,7 @@ public class StructureTemplateManager { @@ -235,7 +235,7 @@ public class StructureTemplateManager {
@ -23198,7 +23198,7 @@ index 6ffca6d4ad2dbd26651760d2a8a5208689d5baf8..44b30217e549cda0b881e2799ffe8fbe
StructureTemplate structureTemplate = new StructureTemplate(); StructureTemplate structureTemplate = new StructureTemplate();
int i = NbtUtils.getDataVersion(nbt, 500); int i = NbtUtils.getDataVersion(nbt, 500);
- structureTemplate.load(this.blockLookup, DataFixTypes.STRUCTURE.updateToCurrentVersion(this.fixerUpper, nbt, i)); - structureTemplate.load(this.blockLookup, DataFixTypes.STRUCTURE.updateToCurrentVersion(this.fixerUpper, nbt, i));
+ ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.STRUCTURE, nbt, i, SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper + structureTemplate.load(this.blockLookup, ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.STRUCTURE, nbt, i, SharedConstants.getCurrentVersion().getDataVersion().getVersion())); // Paper
return structureTemplate; return structureTemplate;
} }