mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Added some more Strings to LanguageReader
This commit is contained in:
@@ -251,10 +251,10 @@ public class Brew {
|
||||
PotionMeta meta = (PotionMeta) item.getItemMeta();
|
||||
if (meta.hasLore()) {
|
||||
if (distillRuns > 0) {
|
||||
addOrReplaceLore(meta, P.p.color("&7"), "Destilliert");
|
||||
addOrReplaceLore(meta, P.p.color("&7"), P.p.languageReader.get("Brew_Distilled"));
|
||||
}
|
||||
if (ageTime >= 1) {
|
||||
addOrReplaceLore(meta, P.p.color("&7"), "Fassgereift");
|
||||
addOrReplaceLore(meta, P.p.color("&7"), P.p.languageReader.get("Brew_BarrelRiped"));
|
||||
}
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class Brew {
|
||||
slotItem.setDurability(PotionColor.valueOf(recipe.getColor()).getColorId(canDistill()));
|
||||
} else {
|
||||
quality = 0;
|
||||
potionMeta.setDisplayName(P.p.color("&f" + "Undefinierbares Destillat"));
|
||||
potionMeta.setDisplayName(P.p.color("&f" + P.p.languageReader.get("Brew_DistillUndefined")));
|
||||
slotItem.setDurability(PotionColor.GREY.getColorId(canDistill()));
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ public class Brew {
|
||||
item.setDurability(PotionColor.valueOf(recipe.getColor()).getColorId(canDistill()));
|
||||
} else {
|
||||
quality = 0;
|
||||
potionMeta.setDisplayName(P.p.color("&f" + "Verdorbenes Getränk"));
|
||||
potionMeta.setDisplayName(P.p.color("&f" + P.p.languageReader.get("Brew_BadPotion")));
|
||||
item.setDurability(PotionColor.GREY.getColorId(canDistill()));
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public class Brew {
|
||||
if (toQuality && !unlabeled) {
|
||||
quality = ingredients.getIngredientQuality(currentRecipe);
|
||||
prefix = getQualityColor(quality);
|
||||
lore = "Zutaten";
|
||||
lore = P.p.languageReader.get("Brew_Ingredients");
|
||||
addOrReplaceLore(meta, prefix, lore);
|
||||
}
|
||||
|
||||
@@ -407,11 +407,11 @@ public class Brew {
|
||||
if (toQuality && !unlabeled) {
|
||||
if (distillRuns > 0 == currentRecipe.needsDistilling()) {
|
||||
quality = ingredients.getCookingQuality(currentRecipe, distillRuns > 0);
|
||||
prefix = getQualityColor(quality) + ingredients.getCookedTime() + " minute";
|
||||
prefix = getQualityColor(quality) + ingredients.getCookedTime() + " " + P.p.languageReader.get("Brew_minute");
|
||||
if (ingredients.getCookedTime() > 1) {
|
||||
prefix = prefix + "n";
|
||||
prefix = prefix + P.p.languageReader.get("Brew_MinutePluralPostfix");
|
||||
}
|
||||
lore = " gegärt";
|
||||
lore = " " + P.p.languageReader.get("Brew_fermented");
|
||||
addOrReplaceLore(meta, prefix, lore);
|
||||
}
|
||||
}
|
||||
@@ -446,35 +446,35 @@ public class Brew {
|
||||
public void updateDistillLore(String prefix, PotionMeta meta) {
|
||||
if (!unlabeled) {
|
||||
if (distillRuns > 1) {
|
||||
prefix = prefix + distillRuns + "-fach ";
|
||||
prefix = prefix + distillRuns + P.p.languageReader.get("Brew_-times") + " ";
|
||||
}
|
||||
}
|
||||
addOrReplaceLore(meta, prefix, "Destilliert");
|
||||
addOrReplaceLore(meta, prefix, P.p.languageReader.get("Brew_Distilled"));
|
||||
}
|
||||
|
||||
// sets the AgeLore. Prefix is the color to be used
|
||||
public void updateAgeLore(String prefix, PotionMeta meta) {
|
||||
if (!unlabeled) {
|
||||
if (ageTime >= 1 && ageTime < 2) {
|
||||
prefix = prefix + "Ein Jahr ";
|
||||
prefix = prefix + P.p.languageReader.get("Brew_OneYear") + " ";
|
||||
} else if (ageTime < 201) {
|
||||
prefix = prefix + (int) Math.floor(ageTime) + " Jahre ";
|
||||
prefix = prefix + (int) Math.floor(ageTime) + " " + P.p.languageReader.get("Brew_Years") + " ";
|
||||
} else {
|
||||
prefix = prefix + "Hunderte Jahre ";
|
||||
prefix = prefix + P.p.languageReader.get("Brew_HundredsOfYears") + " ";
|
||||
}
|
||||
}
|
||||
addOrReplaceLore(meta, prefix, "Fassgereift");
|
||||
addOrReplaceLore(meta, prefix, P.p.languageReader.get("Brew_BarrelRiped"));
|
||||
}
|
||||
|
||||
// updates/sets the color on WoodLore
|
||||
public void updateWoodLore(PotionMeta meta) {
|
||||
if (currentRecipe.getWood() > 0) {
|
||||
int quality = ingredients.getWoodQuality(currentRecipe, wood);
|
||||
addOrReplaceLore(meta, getQualityColor(quality), "Holzart");
|
||||
addOrReplaceLore(meta, getQualityColor(quality), P.p.languageReader.get("Brew_Woodtype"));
|
||||
} else {
|
||||
if (meta.hasLore()) {
|
||||
List<String> existingLore = meta.getLore();
|
||||
int index = indexOfSubstring(existingLore, "Holzart");
|
||||
int index = indexOfSubstring(existingLore, P.p.languageReader.get("Brew_Woodtype"));
|
||||
if (index > -1) {
|
||||
existingLore.remove(index);
|
||||
meta.setLore(existingLore);
|
||||
|
||||
Reference in New Issue
Block a user