creative tab entries

This commit is contained in:
nelle 2024-12-19 01:04:01 -07:00
parent 3b822bc85a
commit 34da97c901
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
@file:Suppress(
"ktlint:standard:class-naming",
"ktlint:standard:filename",
"ktlint:standard:no-wildcard-imports",
"ktlint:standard:package-name",
)
package observer.nelle.roses_mod
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents
import net.minecraft.item.ItemGroups
import net.minecraft.item.Items
object RosesCreativeTab {
// CREATIVE TABS
val roseTabEntry =
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL).register(
ItemGroupEvents.ModifyEntries { content: FabricItemGroupEntries ->
content.addAfter(
Items.POPPY,
RosesBlocks.roseFlower,
)
},
)
val cyanTabEntry =
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL).register(
ItemGroupEvents.ModifyEntries { content: FabricItemGroupEntries ->
content.addAfter(
Items.BLUE_ORCHID,
RosesBlocks.cyanRoseFlower,
)
},
)
val cyanBushTabEntry =
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL).register(
ItemGroupEvents.ModifyEntries { content: FabricItemGroupEntries ->
content.addAfter(
Items.ROSE_BUSH,
RosesBlocks.cyanRoseBush,
)
},
)
}

View file

@ -25,5 +25,6 @@ class roses_mod : ModInitializer {
* */ * */
RosesBlocks RosesBlocks
RosesCreativeTab
} }
} }