Skip to content

Commit

Permalink
Replace use of deprecated NbtType class
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipseisoffline committed Jun 10, 2024
1 parent f18231d commit d577f15
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import net.fabricmc.fabric.api.util.NbtType;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement;
import net.minecraft.nbt.NbtHelper;
Expand All @@ -22,13 +21,13 @@ public GlobalTrustState() {
public static GlobalTrustState fromNbt(NbtCompound tag,
RegistryWrapper.WrapperLookup registryLookup) {
GlobalTrustState trustState = new GlobalTrustState();
NbtList trustList = tag.getList("GlobalTrusts", NbtType.COMPOUND);
NbtList trustList = tag.getList("GlobalTrusts", NbtElement.COMPOUND_TYPE);

trustList.forEach(tag1 -> {
NbtCompound compoundTag = (NbtCompound) tag1;
UUID truster = compoundTag.getUuid("Truster");

NbtList trustedTag = compoundTag.getList("Trusted", NbtType.INT_ARRAY);
NbtList trustedTag = compoundTag.getList("Trusted", NbtElement.INT_ARRAY_TYPE);

for (NbtElement value : trustedTag) {
trustState.globalTrust.put(truster, NbtHelper.toUuid(value));
Expand Down

0 comments on commit d577f15

Please sign in to comment.