Skip to content

Commit

Permalink
* Change item to icon property in toasts
Browse files Browse the repository at this point in the history
* Automatically prefix `minecraft:` to toast icon
  • Loading branch information
ixnoahlive committed Jun 17, 2024
1 parent 254eeb7 commit 409e1ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/kotlin/live/ixnoah/tapactions/actions/HudActions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ object HudActions {
guiAchievementAcc.tapactions_displayToast(
params["title"]?.replace(Regex("&(?=[0-9a-fk-o])"), "§") ?: "",
params["desc"]?.replace(Regex("&(?=[0-9a-fk-o])"), "§") ?: "",
ItemStack(Item.getByNameOrId(params["item"] ?: "minecraft:spruce_door"))
ItemStack(
Item.getByNameOrId(
"minecraft:${params["icon"]?.
replace(Regex("minecraft:(?=(.*))"), "")
?: "spruce_door"}"
)
)
)
}

Expand Down

0 comments on commit 409e1ac

Please sign in to comment.