diff options
author | LifeIsAParadox <LifeIsAParadox@users.noreply.github.com> | 2021-08-24 13:12:35 +0200 |
---|---|---|
committer | LifeIsAParadox <LifeIsAParadox@users.noreply.github.com> | 2021-08-24 13:12:35 +0200 |
commit | ad40e1586da1f3e07bea69374bc2676b090684dc (patch) | |
tree | 8e7a8347f23a48b28200ad6a55aaf285ca3e7c25 /src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java | |
parent | 76edb1383443febce58a62e04113d782494cca67 (diff) | |
download | Skyblocker-ad40e1586da1f3e07bea69374bc2676b090684dc.tar.gz Skyblocker-ad40e1586da1f3e07bea69374bc2676b090684dc.tar.bz2 Skyblocker-ad40e1586da1f3e07bea69374bc2676b090684dc.zip |
Update to 1.17
This release Updates the mod to mc version 1.17.
This is the first time i created/edited a mod.
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java index c4c3fb9c..ff02c675 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java @@ -19,7 +19,7 @@ import java.util.zip.GZIPInputStream; import net.minecraft.client.MinecraftClient; import net.minecraft.client.item.TooltipContext; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtCompound; import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.Formatting; @@ -65,14 +65,14 @@ public class PriceInfoTooltip { } public static String getInternalNameForItem(ItemStack stack) { if(stack == null) return null; - CompoundTag tag = stack.getTag(); + NbtCompound tag = stack.getNbt(); return getInternalnameFromNBT(tag); } - public static String getInternalnameFromNBT(CompoundTag tag) { + public static String getInternalnameFromNBT(NbtCompound tag) { String internalname = null; if(tag != null && tag.contains("ExtraAttributes", 10)) { - CompoundTag ea = tag.getCompound("ExtraAttributes"); + NbtCompound ea = tag.getCompound("ExtraAttributes"); if(ea.contains("id", 8)) { internalname = ea.getString("id").replaceAll(":", "-"); @@ -82,7 +82,7 @@ public class PriceInfoTooltip { if("ENCHANTED_BOOK".equals(internalname)) { - CompoundTag enchants = ea.getCompound("enchantments"); + NbtCompound enchants = ea.getCompound("enchantments"); for(String enchname : enchants.getKeys()) { internalname = enchname.toUpperCase() + ";" + enchants.getInt(enchname); |