mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2024-11-15 10:25:15 +01:00
lore suffix only with recipe
This commit is contained in:
parent
1665047433
commit
9ccacd5812
4
pom.xml
4
pom.xml
@ -38,8 +38,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.10.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.17</source>
|
<source>17</source>
|
||||||
<target>1.17</target>
|
<target>17</target>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -148,10 +148,12 @@ public class BrewLore {
|
|||||||
public void updateDistillLore(boolean qualityColor) {
|
public void updateDistillLore(boolean qualityColor) {
|
||||||
if (brew.getDistillRuns() <= 0) return;
|
if (brew.getDistillRuns() <= 0) return;
|
||||||
String prefix;
|
String prefix;
|
||||||
|
String suffix = "";
|
||||||
byte distillRuns = brew.getDistillRuns();
|
byte distillRuns = brew.getDistillRuns();
|
||||||
int quality = brew.getIngredients().getDistillQuality(brew.getCurrentRecipe(), distillRuns);
|
|
||||||
if (qualityColor && !brew.isUnlabeled() && brew.hasRecipe()) {
|
if (qualityColor && !brew.isUnlabeled() && brew.hasRecipe()) {
|
||||||
|
int quality = brew.getIngredients().getDistillQuality(brew.getCurrentRecipe(), distillRuns);
|
||||||
prefix = getQualityColor(quality);
|
prefix = getQualityColor(quality);
|
||||||
|
suffix = " " + getQualityIcon(quality);
|
||||||
} else {
|
} else {
|
||||||
prefix = "§7";
|
prefix = "§7";
|
||||||
}
|
}
|
||||||
@ -161,9 +163,9 @@ public class BrewLore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (brew.isUnlabeled() && brew.hasRecipe() && distillRuns < brew.getCurrentRecipe().getDistillRuns()) {
|
if (brew.isUnlabeled() && brew.hasRecipe() && distillRuns < brew.getCurrentRecipe().getDistillRuns()) {
|
||||||
addOrReplaceLore(Type.DISTILL, prefix, P.p.languageReader.get("Brew_LessDistilled"), " " + getQualityIcon(quality));
|
addOrReplaceLore(Type.DISTILL, prefix, P.p.languageReader.get("Brew_LessDistilled"), suffix);
|
||||||
} else {
|
} else {
|
||||||
addOrReplaceLore(Type.DISTILL, prefix, P.p.languageReader.get("Brew_Distilled"), " " + getQualityIcon(quality));
|
addOrReplaceLore(Type.DISTILL, prefix, P.p.languageReader.get("Brew_Distilled"), suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,10 +177,12 @@ public class BrewLore {
|
|||||||
public void updateAgeLore(boolean qualityColor) {
|
public void updateAgeLore(boolean qualityColor) {
|
||||||
if (brew.isStripped()) return;
|
if (brew.isStripped()) return;
|
||||||
String prefix;
|
String prefix;
|
||||||
|
String suffix = "";
|
||||||
float age = brew.getAgeTime();
|
float age = brew.getAgeTime();
|
||||||
int quality = brew.getIngredients().getAgeQuality(brew.getCurrentRecipe(), age);
|
|
||||||
if (qualityColor && !brew.isUnlabeled() && brew.hasRecipe()) {
|
if (qualityColor && !brew.isUnlabeled() && brew.hasRecipe()) {
|
||||||
|
int quality = brew.getIngredients().getAgeQuality(brew.getCurrentRecipe(), age);
|
||||||
prefix = getQualityColor(quality);
|
prefix = getQualityColor(quality);
|
||||||
|
suffix = " " + getQualityIcon(quality);
|
||||||
} else {
|
} else {
|
||||||
prefix = "§7";
|
prefix = "§7";
|
||||||
}
|
}
|
||||||
@ -191,7 +195,7 @@ public class BrewLore {
|
|||||||
prefix = prefix + P.p.languageReader.get("Brew_HundredsOfYears") + " ";
|
prefix = prefix + P.p.languageReader.get("Brew_HundredsOfYears") + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addOrReplaceLore(Type.AGE, prefix, P.p.languageReader.get("Brew_BarrelRiped"), " " + getQualityIcon(quality));
|
addOrReplaceLore(Type.AGE, prefix, P.p.languageReader.get("Brew_BarrelRiped"), suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user