mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Update nbt lib usage
This commit is contained in:
parent
e27930b1d7
commit
9e883faa78
@ -18,9 +18,9 @@
|
||||
package com.viaversion.viabackwards.protocol.protocol1_18_2to1_19.data;
|
||||
|
||||
import com.viaversion.viabackwards.api.data.VBMappingDataLoader;
|
||||
import com.viaversion.viaversion.api.minecraft.nbt.BinaryTagIO;
|
||||
import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectMap;
|
||||
import com.viaversion.viaversion.libs.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import com.viaversion.viaversion.libs.opennbt.NBTIO;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.NumberTag;
|
||||
@ -42,7 +42,7 @@ public final class BackwardsMappings extends com.viaversion.viabackwards.api.dat
|
||||
super.loadExtras(data);
|
||||
|
||||
try {
|
||||
final ListTag chatTypes = BinaryTagIO.readInputStream(VBMappingDataLoader.getResource("chat-types-1.19.1.nbt")).get("values");
|
||||
final ListTag chatTypes = NBTIO.readTag(VBMappingDataLoader.getResource("chat-types-1.19.1.nbt")).get("values");
|
||||
for (final Tag chatType : chatTypes) {
|
||||
final CompoundTag chatTypeCompound = (CompoundTag) chatType;
|
||||
final NumberTag idTag = chatTypeCompound.get("id");
|
||||
|
@ -18,10 +18,9 @@
|
||||
package com.viaversion.viabackwards.protocol.protocol1_19_4to1_20.data;
|
||||
|
||||
import com.viaversion.viabackwards.api.data.VBMappingDataLoader;
|
||||
import com.viaversion.viaversion.api.minecraft.nbt.BinaryTagIO;
|
||||
import com.viaversion.viaversion.libs.opennbt.NBTIO;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20to1_19_4.Protocol1_20To1_19_4;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BackwardsMappings extends com.viaversion.viabackwards.api.data.BackwardsMappings {
|
||||
@ -37,7 +36,7 @@ public class BackwardsMappings extends com.viaversion.viabackwards.api.data.Back
|
||||
super.loadExtras(data);
|
||||
|
||||
try {
|
||||
trimPatternRegistry = BinaryTagIO.readInputStream(VBMappingDataLoader.getResource("trim_pattern-1.19.4.nbt"));
|
||||
trimPatternRegistry = NBTIO.readTag(VBMappingDataLoader.getResource("trim_pattern-1.19.4.nbt"));
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user