mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:28:35 +00:00
Regress to upstream for (Binary)Tags in data fixers
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
|
||||
/**
|
||||
@ -40,9 +41,9 @@ public interface DataFixer {
|
||||
private FixTypes() {
|
||||
}
|
||||
|
||||
public static FixType<CompoundBinaryTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> ENTITY = new FixType<>();
|
||||
public static FixType<CompoundTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundTag> ENTITY = new FixType<>();
|
||||
public static FixType<String> BLOCK_STATE = new FixType<>();
|
||||
public static FixType<String> BIOME = new FixType<>();
|
||||
public static FixType<String> ITEM_TYPE = new FixType<>();
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
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;
|
||||
@ -120,13 +119,7 @@ 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) {
|
||||
//FAWE start - use Adventure
|
||||
tag = (CompoundTag) ((CompoundTag) AdventureNBTConverter.fromAdventure(dataFixer.fixUp(
|
||||
DataFixer.FixTypes.CHUNK,
|
||||
rootTag.asBinaryTag(),
|
||||
dataVersion
|
||||
))).getValue().get("Level");
|
||||
//FAWE end
|
||||
tag = (CompoundTag) dataFixer.fixUp(DataFixer.FixTypes.CHUNK, rootTag, dataVersion).getValue().get("Level");
|
||||
dataVersion = currentDataVersion;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user