diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesCreativeTab.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesCreativeTab.kt new file mode 100644 index 0000000..5b23f46 --- /dev/null +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesCreativeTab.kt @@ -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, + ) + }, + ) +} diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt index 8be4a71..db658a8 100644 --- a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt @@ -25,5 +25,6 @@ class roses_mod : ModInitializer { * */ RosesBlocks + RosesCreativeTab } }