Skip to content

Commit

Permalink
fix ModItemGroups.java
Browse files Browse the repository at this point in the history
added localization
fix UkrainianDelight.java
  • Loading branch information
MEGATREX4 committed Jun 8, 2024
1 parent b93a366 commit 753f34f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class UkrainianDelight implements ModInitializer {
@Override
public void onInitialize() {
ModItems.registerModItems();
ModItemGroups.registerItemGroups();

LOGGER.info("Hello Fabric world it`s " + MOD_ID + "!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@
import net.minecraft.util.Identifier;

public class ModItemGroups {
public static final ItemGroup UKRANIAN_DELIGHT_GROUP = Registry.register(Registries.ITEM_GROUP,
new Identifier(UkrainianDelight.MOD_ID, "Ukrainian Delight"),
FabricItemGroup.builder().displayName(Text.translatable("itemgroup.ruby"))
.icon(() -> new ItemStack(Items.CARROT)).entries((displayContext, entries) -> {

entries.add(Items.CARROT);

public static final ItemGroup UKRAINIAN_DELIGHT_GROUP = Registry.register(Registries.ITEM_GROUP,
new Identifier(UkrainianDelight.MOD_ID, "ukrainian_delight"),
FabricItemGroup.builder()
.displayName(Text.translatable("itemgroup.ukrainian_delight"))
.icon(() -> new ItemStack(Items.CARROT))
.entries((displayContext, entries) -> {
entries.add(ModItems.VARENYK);


}).build());


public static void registerItemGroups() {
UkrainianDelight.LOGGER.info("Registering Item Groups for " + UkrainianDelight.MOD_ID);
}
}
}
5 changes: 5 additions & 0 deletions src/main/resources/assets/ukrainian-delight/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"item.ukrainian_delight.varenyk": "Varenyk",

"itemgroup.ukrainian_delight": "Ukrainian Delight"
}
5 changes: 5 additions & 0 deletions src/main/resources/assets/ukrainian-delight/lang/uk_ua.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"item.ukrainian_delight.varenyk": "Вареник",

"itemgroup.ukrainian_delight": "Українська насолода"
}

0 comments on commit 753f34f

Please sign in to comment.