aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorSeRaid <77941535+SeRaid743@users.noreply.github.com>2024-05-02 19:22:24 +1200
committerGitHub <noreply@github.com>2024-05-02 09:22:24 +0200
commitc8b8da95926639c6e87945a1fe6106c7498fa515 (patch)
treed4ad9ba5d09644a3d104c6c85f73a12c79c85b03 /src/main/java
parent01a36ec069d6aadae836fd1d6ff55347131e8257 (diff)
downloadskyhanni-c8b8da95926639c6e87945a1fe6106c7498fa515.tar.gz
skyhanni-c8b8da95926639c6e87945a1fe6106c7498fa515.tar.bz2
skyhanni-c8b8da95926639c6e87945a1fe6106c7498fa515.zip
update icon (#1640)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt13
2 files changed, 9 insertions, 15 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
index 7053f521d..842789340 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt
@@ -5,12 +5,10 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.utils.HypixelCommands
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
-import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
-import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -23,10 +21,11 @@ class ChocolateFactoryShortcut {
private var lastClick = SimpleTimeMark.farPast()
private val item by lazy {
- val neuItem = "COOKIE".asInternalName().getItemStack()
- Utils.createItemStack(
- neuItem.item,
+
+ ItemUtils.createSkull(
"§6Open Chocolate Factory",
+ "d7ac85e6-bd40-359e-a2c5-86082959309e",
+ "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWE4MTUzOThlN2RhODliMWJjMDhmNjQ2Y2FmYzhlN2I4MTNkYTBiZTBlZWMwY2NlNmQzZWZmNTIwNzgwMTAyNiJ9fX0=",
"§8(From SkyHanni)",
"",
"§7Click here to run",
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index 0b7b9a5be..c7c70d949 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -140,12 +140,7 @@ object ItemUtils {
}
// Taken from NEU
- fun createSkull(displayName: String, uuid: String, value: String): ItemStack {
- return createSkull(displayName, uuid, value, null)
- }
-
- // Taken from NEU
- fun createSkull(displayName: String, uuid: String, value: String, lore: Array<String>?): ItemStack {
+ fun createSkull(displayName: String, uuid: String, value: String, vararg lore: String): ItemStack {
val render = ItemStack(Items.skull, 1, 3)
val tag = NBTTagCompound()
val skullOwner = NBTTagCompound()
@@ -159,7 +154,7 @@ object ItemUtils {
textures.appendTag(textures0)
- addNameAndLore(tag, displayName, lore)
+ addNameAndLore(tag, displayName, *lore)
properties.setTag("textures", textures)
skullOwner.setTag("Properties", properties)
@@ -169,10 +164,10 @@ object ItemUtils {
}
// Taken from NEU
- private fun addNameAndLore(tag: NBTTagCompound, displayName: String, lore: Array<String>?) {
+ private fun addNameAndLore(tag: NBTTagCompound, displayName: String, vararg lore: String) {
val display = NBTTagCompound()
display.setString("Name", displayName)
- if (lore != null) {
+ if (lore.isNotEmpty()) {
val tagLore = NBTTagList()
for (line in lore) {
tagLore.appendTag(NBTTagString(line))