From 0d235b9c93cdf0e98b4c86b46928b14e5bc312f6 Mon Sep 17 00:00:00 2001 From: StellarWind22 Date: Thu, 30 Nov 2023 13:58:57 -0600 Subject: [PATCH] Fixed item group --- .../basicshields/initializers/BasicShields.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/crimsondawn45/basicshields/initializers/BasicShields.java b/src/main/java/com/github/crimsondawn45/basicshields/initializers/BasicShields.java index eabdcfa..0cac731 100644 --- a/src/main/java/com/github/crimsondawn45/basicshields/initializers/BasicShields.java +++ b/src/main/java/com/github/crimsondawn45/basicshields/initializers/BasicShields.java @@ -33,8 +33,11 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.minecraft.item.ItemGroup.Builder; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; import net.minecraft.item.ItemStack; import net.minecraft.text.Text; +import net.minecraft.util.Identifier; public class BasicShields implements ModInitializer { @@ -70,7 +73,7 @@ public class BasicShields implements ModInitializer { //Item Group public static final Builder SHIELDS = FabricItemGroup.builder() .icon(() -> new ItemStack(vanilla.diamond_shield.getItem())) - .displayName(Text.translatable("itemGroup.tutorial.test_group")) + .displayName(Text.translatable("itemGroup.basicshields.shields")) .entries((context, entries) -> { }); @@ -115,7 +118,7 @@ public void onInitialize() { tourmaline = new TourmalineModule( CONFIG.always_load_tourmaline, "more_gems"); //Build item group - SHIELDS.build(); + Registry.register(Registries.ITEM_GROUP, new Identifier(MOD_ID, "shields"), SHIELDS.build()); LOGGER.info("Basic Shields initialized!"); }