Skip to content

Commit

Permalink
Merge pull request #37 from ThatGravyBoat/1.20
Browse files Browse the repository at this point in the history
Add effect descriptions
  • Loading branch information
Buuz135 authored Oct 14, 2023
2 parents c6d49c9 + ef73a66 commit 433f3b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2023-10-01T17:05:26.6059249 Languages: en_us
55681ad798e8c26d95204b3f431c7fc93a6969f0 assets/sushigocrafting/lang/en_us.json
// 1.20.1 2023-10-08T15:58:15.3249509 Languages: en_us
888a523dc4c6af203da616c40afe4044165914a3 assets/sushigocrafting/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
"block.sushigocrafting.soy_crop": "Soy Seeds",
"block.sushigocrafting.wasabi_crop": "Wasabi Seeds",
"effect.sushigocrafting.acquired_taste": "Acquired Taste",
"effect.sushigocrafting.acquired_taste.description": "Gives extra nutrition and saturation when eating food",
"effect.sushigocrafting.small_bites": "Small Bites",
"effect.sushigocrafting.small_bites.description": "A chance to give you back the food you are eating",
"effect.sushigocrafting.steady_hands": "Steady Hands",
"effect.sushigocrafting.steady_hands.description": "Increases the amount you get from chopping on the cutting board",
"entity.sushigocrafting.shrimp": "Shrimp",
"entity.sushigocrafting.tuna": "Tuna",
"item.sushigocrafting.avocado": "Avocado",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.buuz135.sushigocrafting.proxy.SushiContent;
import net.minecraft.data.DataGenerator;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.item.BlockItem;
import net.minecraftforge.common.data.LanguageProvider;
import net.minecraftforge.registries.ForgeRegistries;
Expand Down Expand Up @@ -29,5 +30,13 @@ protected void addTranslations() {
SushiContent.Effects.REGISTRY.getEntries().stream().map(RegistryObject::get).forEach(effect -> {
add(effect, WordUtils.capitalize(ForgeRegistries.MOB_EFFECTS.getKey(effect).getPath().replaceAll("_", " ")));
});

addDesc(SushiContent.Effects.STEADY_HANDS, "Increases the amount you get from chopping on the cutting board");
addDesc(SushiContent.Effects.ACQUIRED_TASTE, "Gives extra nutrition and saturation when eating food");
addDesc(SushiContent.Effects.SMALL_BITES, "A chance to give you back the food you are eating");
}

private void addDesc(RegistryObject<MobEffect> effect, String description) {
add(effect.get().getDescriptionId() + ".description", description);
}
}

0 comments on commit 433f3b1

Please sign in to comment.