mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-02-12 00:31:20 +01:00
Added number of recipes Chart
This commit is contained in:
parent
dac29b3849
commit
c063037f89
@ -230,7 +230,7 @@ recipes:
|
||||
10:
|
||||
name: Fader Kaffee/Kaffee/Starker Kaffee
|
||||
ingredients:
|
||||
- Ink_Sac,3/12
|
||||
- Cocoa_Beans/12
|
||||
- Milk_Bucket/2
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
@ -534,4 +534,4 @@ words:
|
||||
- replace: -all
|
||||
to: '*rülps*'
|
||||
percentage: 3
|
||||
alcohol: 60
|
||||
alcohol: 60
|
||||
|
@ -102,7 +102,7 @@ public class P extends JavaPlugin {
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("barrels_built", () -> Barrel.barrels.size()));
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("cauldrons_boiling", () -> BCauldron.bcauldrons.size()));
|
||||
metrics.addCustomChart(new Metrics.AdvancedPie("brew_quality", () -> {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
Map<String, Integer> map = new HashMap<>(5);
|
||||
int exc = 0;
|
||||
int good = 0;
|
||||
int norm = 0;
|
||||
@ -129,6 +129,26 @@ public class P extends JavaPlugin {
|
||||
map.put("terrible", terr);
|
||||
return map;
|
||||
}));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("number_of_recipes", () -> {
|
||||
int recipes = BIngredients.recipes.size();
|
||||
if (recipes < 7) {
|
||||
return "Less than 7";
|
||||
} else if (recipes < 11) {
|
||||
return "7-10";
|
||||
} else if (recipes == 11) {
|
||||
// There are 11 default recipes, so show this as its own slice
|
||||
return "11";
|
||||
} else if (recipes <= 31) {
|
||||
if (recipes % 2 == 0) {
|
||||
return recipes + "-" + (recipes + 1);
|
||||
} else {
|
||||
return (recipes - 1) + "-" + recipes;
|
||||
}
|
||||
} else {
|
||||
return "More than 31";
|
||||
}
|
||||
|
||||
}));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user