summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/command')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt12
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) {