Skip to content

Commit fcde0c8

Browse files
Add item to same item group as glass
Would make sense to have different colours like glass and possibly also panes. If so moving to a custom item group is probably a good idea.
1 parent 21c4a0b commit fcde0c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/kotlin/au/com/programmingclub/hardenedglass/HardenedGlass.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package au.com.programmingclub.hardenedglass
22

33
import net.fabricmc.api.ModInitializer
4+
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents
45
import net.minecraft.item.Item
6+
import net.minecraft.item.ItemGroups
57
import net.minecraft.util.Identifier
68
import net.minecraft.registry.Registries
79
import net.minecraft.registry.Registry
@@ -19,5 +21,9 @@ object HardenedGlass : ModInitializer {
1921
// However, some things (like resources) may still be uninitialized.
2022
// Proceed with mild caution.
2123
Registry.register(Registries.ITEM, Identifier(namespace, "hardened_glass"), HardenedGlassItem)
24+
25+
ItemGroupEvents.modifyEntriesEvent(ItemGroups.COLORED_BLOCKS).register({content ->
26+
content.add(HardenedGlassItem)
27+
})
2228
}
2329
}

0 commit comments

Comments
 (0)