From cc7fe1ea2fa11285455bf1d24ac86830c616c40b Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Sat, 5 Apr 2025 00:43:44 +0300 Subject: [PATCH] matter dust in creative tab --- .../ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt | 7 +++++++ .../ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt index d28d2caf3..92cc40e3a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt @@ -163,6 +163,13 @@ class MatterDustItem : Item(Properties().stacksTo(64)), IMatterItem { return matter(stack) >= ItemsConfig.MATTER_DUST_CAPACITY } + fun makeStack(matterValue: Decimal = Decimal.ONE, count: Int = 1): ItemStack { + val stack = ItemStack(this, count) + matter(stack, matterValue) + + return stack + } + override fun overrideStackedOnOther( pStack: ItemStack, pSlot: Slot, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt index 3f1c0a6a9..f4ddc6df5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt @@ -223,7 +223,7 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) { accept(MItems.GRILL.values) - // accept(MItems.MATTER_DUST) + accept(MItems.MATTER_DUST.makeStack()) accept(MItems.TRITANIUM_ORE) accept(MItems.DEEPSLATE_TRITANIUM_ORE)