diff options
author | Roman / Linnea Gräf <roman.graef@gmail.com> | 2023-05-27 19:20:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 19:20:32 +0200 |
commit | 9cb9f7633dd71515eb972028a580c9e60fe22f89 (patch) | |
tree | 195ec60d0aa6f7b2fbe351fd457523c2686f39be /src/main | |
parent | 15a05d39cabf4dd8a7ecc8a4328a2d0dec6d2111 (diff) | |
download | NotEnoughUpdates-9cb9f7633dd71515eb972028a580c9e60fe22f89.tar.gz NotEnoughUpdates-9cb9f7633dd71515eb972028a580c9e60fe22f89.tar.bz2 NotEnoughUpdates-9cb9f7633dd71515eb972028a580c9e60fe22f89.zip |
Allow searching armor colour (#696)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 0281d95b..a5bea05d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -47,6 +47,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.ContainerChest; import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.JsonToNBT; @@ -550,6 +551,9 @@ public class NEUManager { result = result || multiSearchString(stack.getDisplayName(), query); String lore = ""; + if (stack.getItem() instanceof ItemArmor && ((ItemArmor)stack.getItem()).getArmorMaterial() == ItemArmor.ArmorMaterial.LEATHER) { + lore = String.format("#%06x ",((ItemArmor)stack.getItem()).getColor(stack)); + } NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { NBTTagCompound display = tag.getCompoundTag("display"); |