diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-27 13:19:09 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-27 13:19:09 +0200 |
commit | 33235af9cb859e2f52672d6b5f2ac5104a6046d5 (patch) | |
tree | 9936c269bef0380173072ffb00367714bf63dd41 /src/main/java/at/hannibal2/skyhanni/test | |
parent | a44214f2d62ef45b44f6da057be37a276ccdce76 (diff) | |
download | skyhanni-33235af9cb859e2f52672d6b5f2ac5104a6046d5.tar.gz skyhanni-33235af9cb859e2f52672d6b5f2ac5104a6046d5.tar.bz2 skyhanni-33235af9cb859e2f52672d6b5f2ac5104a6046d5.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt index cb7031f4b..06496036d 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt @@ -5,13 +5,12 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils -import net.minecraft.item.Item +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getMinecraftId import net.minecraft.nbt.NBTTagCompound -import net.minecraft.util.ResourceLocation object CopyItemCommand { - fun command(args: Array<String>) { + fun command() { try { val resultList = mutableListOf<String>() val itemStack = InventoryUtils.getItemInHand() ?: return @@ -19,10 +18,10 @@ object CopyItemCommand { resultList.add("display name: '" + itemStack.displayName.toString() + "'") val itemID = itemStack.getInternalName_old() resultList.add("internalName: '$itemID'") - resultList.add("minecraft id: '" + (Item.itemRegistry.getNameForObject(itemStack.item) as ResourceLocation) + "'") - resultList.add("") + resultList.add("minecraft id: '" + itemStack.getMinecraftId() + "'") + resultList.add("lore:") for (line in itemStack.getLore()) { - resultList.add("'$line'") + resultList.add(" '$line'") } resultList.add("") resultList.add("getTagCompound") @@ -41,6 +40,7 @@ object CopyItemCommand { private fun recurseTag(compound: NBTTagCompound, text: String, list: MutableList<String>) { for (s in compound.keySet) { + if (s == "Lore") continue val tag = compound.getTag(s) if (tag !is NBTTagCompound) { |