creative tab entries
This commit is contained in:
parent
3b822bc85a
commit
c01a62689f
2 changed files with 45 additions and 1 deletions
|
@ -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,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
|
@ -21,9 +21,9 @@ class roses_mod : ModInitializer {
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* - register worldgen
|
* - register worldgen
|
||||||
* - biome modification
|
* - biome modification
|
||||||
* - creative tabs
|
|
||||||
* */
|
* */
|
||||||
|
|
||||||
RosesBlocks
|
RosesBlocks
|
||||||
|
RosesCreativeTab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue