Skip to content

Commit

Permalink
Fixed item group
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarWind22 committed Nov 30, 2023
1 parent df87bd3 commit 0d235b9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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) -> {
});

Expand Down Expand Up @@ -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!");
}
Expand Down

0 comments on commit 0d235b9

Please sign in to comment.