Skip to content

Commit

Permalink
Merge pull request #130 from Darkhax-Forked/1.20.x-enchantment-descri…
Browse files Browse the repository at this point in the history
…ptions

Add support for enchantment descriptions and similar mods.
  • Loading branch information
Edivad99 committed Oct 5, 2023
2 parents 1558354 + 4ae1cc6 commit a465c08
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2023-09-27T09:49:31.834652 Languages: en_us
4380836cabe6eaacc8a7721d52743012ed2e8b28 assets/railcraft/lang/en_us.json
// 1.20.1 2023-10-05T02:13:07.8895505 Languages: en_us
ea9ffc187f490e8653e0b7f7843a69f78a50cb3f assets/railcraft/lang/en_us.json
4 changes: 4 additions & 0 deletions src/generated/resources/assets/railcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,13 @@
"death.railcraft.train.6": "%s should have worn their Overalls",
"effect.railcraft.creosote": "Creosote",
"enchantment.railcraft.destruction": "Destruction",
"enchantment.railcraft.destruction.desc": "Deconstructs blocks in a wider area.",
"enchantment.railcraft.implosion": "Implosion",
"enchantment.railcraft.implosion.desc": "Increases damage against creepers.",
"enchantment.railcraft.smack": "Smack",
"enchantment.railcraft.smack.desc": "Increases the boost applied to trains.",
"enchantment.railcraft.wrecking": "Wrecking",
"enchantment.railcraft.wrecking.desc": "Increases attack damage.",
"entity.minecraft.villager.railcraft.cartman": "Cartman",
"entity.minecraft.villager.railcraft.trackman": "Trackman",
"entity.railcraft.creative_locomotive": "Creative Locomotive",
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/mods/railcraft/Translations.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,13 @@ public static class KeyBinding {
public static final String CHANGE_AURA = makeKey("key", "change_aura");
}

public static class EnchantmentDescriptions {
public static final String DESTRUCTION = makeKey("enchantment", "destruction.desc");
public static final String IMPLOSION = makeKey("enchantment", "implosion.desc");
public static final String SMACK = makeKey("enchantment", "smack.desc");
public static final String WRECKING = makeKey("enchantment", "wrecking.desc");
}

public static String makeKey(String type, String name) {
return type + "." + RailcraftConstants.ID + "." + name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,11 @@ private void enchantmentTranslations() {
this.addEnchantment(RailcraftEnchantments.DESTRUCTION, "Destruction");
this.addEnchantment(RailcraftEnchantments.IMPLOSION, "Implosion");
this.addEnchantment(RailcraftEnchantments.SMACK, "Smack");

this.add(Translations.EnchantmentDescriptions.WRECKING, "Increases attack damage.");
this.add(Translations.EnchantmentDescriptions.DESTRUCTION, "Deconstructs blocks in a wider area.");
this.add(Translations.EnchantmentDescriptions.IMPLOSION, "Increases damage against creepers.");
this.add(Translations.EnchantmentDescriptions.SMACK, "Increases the boost applied to trains.");
}

private void advancementTranslations() {
Expand Down

0 comments on commit a465c08

Please sign in to comment.