mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:28:35 +00:00
Move paperweight to BinaryTag
- Upstream put paperweight into master branch, which doesn't have BinaryTags - Fixes #1374
This commit is contained in:
@ -41,9 +41,11 @@ public interface DataFixer {
|
||||
private FixTypes() {
|
||||
}
|
||||
|
||||
public static FixType<CompoundTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundTag> ENTITY = new FixType<>();
|
||||
//FAWE start - BinaryTag
|
||||
public static FixType<CompoundBinaryTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> ENTITY = new FixType<>();
|
||||
//FAWE end
|
||||
public static FixType<String> BLOCK_STATE = new FixType<>();
|
||||
public static FixType<String> BIOME = new FixType<>();
|
||||
public static FixType<String> ITEM_TYPE = new FixType<>();
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.storage;
|
||||
|
||||
import com.sk89q.jnbt.AdventureNBTConverter;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.NBTInputStream;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
@ -119,7 +120,11 @@ public class ChunkStoreHelper {
|
||||
.containsKey("Sections") && dataVersion < currentDataVersion) { // only fix up MCA format, DFU doesn't support MCR chunks
|
||||
final DataFixer dataFixer = platform.getDataFixer();
|
||||
if (dataFixer != null) {
|
||||
tag = (CompoundTag) dataFixer.fixUp(DataFixer.FixTypes.CHUNK, rootTag, dataVersion).getValue().get("Level");
|
||||
//FAWE start - BinaryTag
|
||||
tag = (CompoundTag) AdventureNBTConverter.fromAdventure(dataFixer
|
||||
.fixUp(DataFixer.FixTypes.CHUNK, rootTag.asBinaryTag(), dataVersion)
|
||||
.get("Level"));
|
||||
//FAWE end
|
||||
dataVersion = currentDataVersion;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user