35
35
import com .mojang .datafixers .DataFixerBuilder ;
36
36
import com .mojang .datafixers .schemas .Schema ;
37
37
import com .mojang .serialization .Dynamic ;
38
- import com .sk89q .jnbt .CompoundTag ;
39
38
import com .sk89q .worldedit .fabric .internal .NBTConverter ;
39
+ import com .sk89q .worldedit .util .nbt .CompoundBinaryTag ;
40
40
import net .minecraft .datafixer .Schemas ;
41
41
import net .minecraft .datafixer .TypeReferences ;
42
42
import net .minecraft .nbt .FloatTag ;
@@ -92,11 +92,11 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
92
92
@ Override
93
93
public <T > T fixUp (FixType <T > type , T original , int srcVer ) {
94
94
if (type == FixTypes .CHUNK ) {
95
- return (T ) fixChunk ((CompoundTag ) original , srcVer );
95
+ return (T ) fixChunk ((CompoundBinaryTag ) original , srcVer );
96
96
} else if (type == FixTypes .BLOCK_ENTITY ) {
97
- return (T ) fixBlockEntity ((CompoundTag ) original , srcVer );
97
+ return (T ) fixBlockEntity ((CompoundBinaryTag ) original , srcVer );
98
98
} else if (type == FixTypes .ENTITY ) {
99
- return (T ) fixEntity ((CompoundTag ) original , srcVer );
99
+ return (T ) fixEntity ((CompoundBinaryTag ) original , srcVer );
100
100
} else if (type == FixTypes .BLOCK_STATE ) {
101
101
return (T ) fixBlockState ((String ) original , srcVer );
102
102
} else if (type == FixTypes .ITEM_TYPE ) {
@@ -107,19 +107,19 @@ public <T> T fixUp(FixType<T> type, T original, int srcVer) {
107
107
return original ;
108
108
}
109
109
110
- private CompoundTag fixChunk (CompoundTag originalChunk , int srcVer ) {
110
+ private CompoundBinaryTag fixChunk (CompoundBinaryTag originalChunk , int srcVer ) {
111
111
net .minecraft .nbt .CompoundTag tag = NBTConverter .toNative (originalChunk );
112
112
net .minecraft .nbt .CompoundTag fixed = convert (LegacyType .CHUNK , tag , srcVer );
113
113
return NBTConverter .fromNative (fixed );
114
114
}
115
115
116
- private CompoundTag fixBlockEntity (CompoundTag origTileEnt , int srcVer ) {
116
+ private CompoundBinaryTag fixBlockEntity (CompoundBinaryTag origTileEnt , int srcVer ) {
117
117
net .minecraft .nbt .CompoundTag tag = NBTConverter .toNative (origTileEnt );
118
118
net .minecraft .nbt .CompoundTag fixed = convert (LegacyType .BLOCK_ENTITY , tag , srcVer );
119
119
return NBTConverter .fromNative (fixed );
120
120
}
121
121
122
- private CompoundTag fixEntity (CompoundTag origEnt , int srcVer ) {
122
+ private CompoundBinaryTag fixEntity (CompoundBinaryTag origEnt , int srcVer ) {
123
123
net .minecraft .nbt .CompoundTag tag = NBTConverter .toNative (origEnt );
124
124
net .minecraft .nbt .CompoundTag fixed = convert (LegacyType .ENTITY , tag , srcVer );
125
125
return NBTConverter .fromNative (fixed );
0 commit comments