Skip to content

Commit

Permalink
Data Gen Main Lang File
Browse files Browse the repository at this point in the history
  • Loading branch information
manmaed committed Oct 14, 2024
1 parent 3fc5ee7 commit cded553
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// 1.21 2024-10-14T20:36:16.5211718 Languages: en_us for mod: petrock
9c289b0f11d4876c1dfd1ea5f541a9a66860a7d2 assets/petrock/lang/en_us.json
47 changes: 47 additions & 0 deletions src/generated/resources/assets/petrock/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"a.lang.author.name": "manmaed",
"a.lang.file.name": "English US",
"advancements.petrock.cook_raw_stoneium.description": "Cook Raw Stoneium to Stoneium so you can also tame a PetRock",
"advancements.petrock.cook_raw_stoneium.title": "Cook Raw Stoneium",
"advancements.petrock.get_petrock.description": "You got a PetRock delivered",
"advancements.petrock.get_petrock.title": "You Got Mail!",
"advancements.petrock.get_petrock_with_legs.description": "Get a petrock with legs!",
"advancements.petrock.get_petrock_with_legs.title": "It Has Legs",
"advancements.petrock.heal_a_petrock.description": "Heal the PetRock! You monster!",
"advancements.petrock.heal_a_petrock.title": "Petrock Healing!",
"advancements.petrock.mine_stoneium.description": "Mine Stoneium Ore get Raw Stoneium",
"advancements.petrock.mine_stoneium.title": "Mine Stoneium Ore",
"advancements.petrock.order_form.description": "Craft an Order Form so you can get a PetRock",
"advancements.petrock.order_form.title": "Order a PetRock",
"advancements.petrock.root.description": "Install PetRock",
"advancements.petrock.root.title": "PetRock Advancements",
"advancements.petrock.warranty_void.description": "You somehow damaged your PetRock this voids its warranty!",
"advancements.petrock.warranty_void.title": "Void the Warranty!",
"block.petrock.deepslate_stoneium_ore": "Deepslate Stoneium Ore",
"block.petrock.stoneium_block": "Stoneium Block",
"block.petrock.stoneium_ore": "Stoneium Ore",
"entity.petrock.petrock": "PetRock",
"entity.petrock.petrockwithlegs": "PetRock with Legs",
"item.petrock.kibble": "Rock Kibble",
"item.petrock.kibble.tooltip": "For PetRock consumption only!",
"item.petrock.orderform": "Order Form",
"item.petrock.petrockbox": "PetRock",
"item.petrock.petrockwithlegsbox": "PetRock With Legs",
"item.petrock.raw_stoneium": "Raw Stoneium",
"item.petrock.stone_legs": "Stone Legs",
"item.petrock.stone_legs.tooltip": "Used only for crafting",
"item.petrock.stoneium": "Stoneium",
"item.petrock.stoneium.tooltip": "Used to tame a PetRock and for crafting Rock kibble",
"itemGroup.petrock": "PetRock",
"petrock.command.iamslowpoke101.feedback": "Slowpoke101 Hat Enabled!",
"petrock.command.sethat.actuallybear.success": "Happy Birthday ActuallyBear!",
"petrock.command.sethat.birthday.feedback": "Birthday mode enabled!",
"petrock.command.sethat.christmas.feedback": "Happy Christmas %1$s!",
"petrock.command.sethat.easter.feedback": "Happy Easter %1$s!",
"petrock.command.sethat.halloween.feedback": "Happy Halloween %1$s!",
"petrock.command.sethat.loneztar.success": "Happy Birthday Loneztar!",
"petrock.command.sethat.none.feedback": "Hats cleared!",
"petrock.command.sethat.noslow.failure": "No custom hat set with Slowpoke mode enabled",
"petrock.command.sethat.reload.feedback": "Hats Reloaded!",
"petrock.command.sethat.tnt.feedback": "TNT mode enabled!"
}
86 changes: 85 additions & 1 deletion src/main/java/net/manmaed/petrock/datagen/lang/PetRockENUS.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,95 @@ public PetRockENUS(PackOutput output) {
super(output, PetRock.MOD_ID, "en_us");
}

String b = "block";
String i = "item";
String e = "entity";
String a = "advancements";
String c = "command";

String mod = "petrock";

private String getName(Integer integer, String name) {
switch (integer) {
case 1:
return b + "." + mod + "." + name;
case 2:
return i + "." + mod + "." + name;
case 3:
return e + "." + mod + "." + name;
case 4:
return mod + "." + c + "." + name;
}
return name;
}

private String getAName(Boolean discription, String name) {
if (discription) {
return a + "." + mod + "." + name + ".description";
}
return a + "." + mod + "." + name + ".title";
}

@Override
protected void addTranslations() {
add("a.lang.file.name", "English US");
add("a.lang.author.name", "manmaed");
add("itemGroup." + PetRock.MOD_ID, "PetRock");
//TODO: Make this

//Blocks 1
add(getName(1, "stoneium_ore"), "Stoneium Ore");
add(getName(1, "deepslate_stoneium_ore"), "Deepslate Stoneium Ore");
add(getName(1,"stoneium_block"), "Stoneium Block");

//Items 2
add(getName(2,"stoneium"), "Stoneium");
add(getName(2,"kibble"), "Rock Kibble");
add(getName(2,"orderform"), "Order Form");
add(getName(2, "petrockbox"), "PetRock");
add(getName(2, "petrockwithlegsbox"), "PetRock With Legs");
add(getName(2, "stone_legs"), "Stone Legs");
add(getName(2, "raw_stoneium"), "Raw Stoneium");

//Item Tooltips 2
add(getName(2, "stoneium.tooltip"), "Used to tame a PetRock and for crafting Rock kibble");
add(getName(2, "kibble.tooltip"), "For PetRock consumption only!");
add(getName(2, "stone_legs.tooltip"), "Used only for crafting");

//Entity 3
add(getName(3, "petrock"), "PetRock");
add(getName(3, "petrockwithlegs"), "PetRock with Legs");

//Command Feedback 4
add(getName(4, "iamslowpoke101.feedback"), "Slowpoke101 Hat Enabled!");
add(getName(4, "sethat.none.feedback"), "Hats cleared!");
add(getName(4, "sethat.birthday.feedback"), "Birthday mode enabled!");
add(getName(4, "sethat.christmas.feedback"), "Happy Christmas %1$s!");
add(getName(4, "sethat.halloween.feedback"), "Happy Halloween %1$s!");
add(getName(4, "sethat.tnt.feedback"), "TNT mode enabled!");
add(getName(4, "sethat.easter.feedback"), "Happy Easter %1$s!");
add(getName(4, "sethat.noslow.failure"), "No custom hat set with Slowpoke mode enabled");
add(getName(4, "sethat.actuallybear.success"), "Happy Birthday ActuallyBear!");
add(getName(4, "sethat.loneztar.success"), "Happy Birthday Loneztar!");
add(getName(4, "sethat.reload.feedback"), "Hats Reloaded!");

//Advancements getAName(true for descption false for title)
add(getAName(false, "root"), "PetRock Advancements");
add(getAName(true, "root"), "Install PetRock");
add(getAName(false, "mine_stoneium"), "Mine Stoneium Ore");
add(getAName(true, "mine_stoneium"), "Mine Stoneium Ore get Raw Stoneium");
add(getAName(false, "cook_raw_stoneium"), "Cook Raw Stoneium");
add(getAName(true, "cook_raw_stoneium"), "Cook Raw Stoneium to Stoneium so you can also tame a PetRock");


add(getAName(false, "order_form"), "Order a PetRock");
add(getAName(true, "order_form"), "Craft an Order Form so you can get a PetRock");
add(getAName(false, "get_petrock"), "You Got Mail!");
add(getAName(true, "get_petrock"), "You got a PetRock delivered");
add(getAName(false, "warranty_void"), "Void the Warranty!");
add(getAName(true, "warranty_void"), "You somehow damaged your PetRock this voids its warranty!");
add(getAName(false, "heal_a_petrock"), "Petrock Healing!");
add(getAName(true, "heal_a_petrock"), "Heal the PetRock! You monster!");
add(getAName(false, "get_petrock_with_legs"), "It Has Legs");
add(getAName(true, "get_petrock_with_legs"), "Get a petrock with legs!");
}
}
60 changes: 0 additions & 60 deletions src/main/resources/assets/petrock/lang/en_us.json

This file was deleted.

0 comments on commit cded553

Please sign in to comment.