Skip to content

Commit ff7f356

Browse files
committed
fix: CreativeItem not working correctly
1 parent 799d3d0 commit ff7f356

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
This project does NOT adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.14.2] - 2025-10-11
9+
10+
### Changed
11+
- Switch away from itemMeta for ItemTheme, use an item model named `minecraft:empty` for invisible item instead of paper with CustomModelData 1
12+
813
## [0.14.1] - 2025-10-11
914

1015
### Changed

src/main/kotlin/com/mineinabyss/guiy/components/items/ItemTheme.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ package com.mineinabyss.guiy.components.items
22

33
import androidx.compose.runtime.Immutable
44
import androidx.compose.runtime.staticCompositionLocalOf
5-
import com.mineinabyss.idofront.items.editItemMeta
5+
import io.papermc.paper.datacomponent.DataComponentTypes
6+
import io.papermc.paper.datacomponent.item.TooltipDisplay
7+
import net.kyori.adventure.key.Key
68
import org.bukkit.Material
79
import org.bukkit.inventory.ItemStack
810

911
@Immutable
1012
class ItemTheme(
11-
val invisible: ItemStack = ItemStack.of(Material.PAPER).editItemMeta { setCustomModelData(1) },
12-
val hiddenTooltip: ItemStack = invisible.clone().editItemMeta { isHideTooltip = true },
13+
val invisible: ItemStack = ItemStack.of(Material.PAPER).apply {
14+
setData(DataComponentTypes.ITEM_MODEL, Key.key("minecraft:empty"))
15+
},
16+
val hiddenTooltip: ItemStack = invisible.clone().apply {
17+
setData(DataComponentTypes.TOOLTIP_DISPLAY, TooltipDisplay.tooltipDisplay().hideTooltip(true))
18+
},
1319
)
1420

1521
internal val DefaultItemTheme = ItemTheme()

0 commit comments

Comments
 (0)