Add RGB colored potions

This commit is contained in:
Daniel Saukel
2019-03-05 20:55:52 +01:00
parent 13d13dcf72
commit edea97f9a2
4 changed files with 54 additions and 21 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ public class BRecipe {
return false;
}
try {
Brew.PotionColor.valueOf(getColor());
Brew.PotionColor.fromString(getColor());
} catch (IllegalArgumentException e) {
P.p.errorLog("Invalid Color '" + color + "' in Recipe: " + getName(5));
return false;
@@ -263,7 +263,7 @@ public class BRecipe {
Brew brew = new Brew(uid, bIngredients, quality, distillruns, getAge(), wood, getName(5), false, false, true, 0);
Brew.PotionColor.valueOf(getColor()).colorBrew(potionMeta, potion, false);
Brew.PotionColor.fromString(getColor()).colorBrew(potionMeta, potion, false);
potionMeta.setDisplayName(P.p.color("&f" + getName(quality)));
// This effect stores the UID in its Duration
potionMeta.addCustomEffect((PotionEffectType.REGENERATION).createEffect((uid * 4), 0), true);