Make Cauldron Cooking start at minute 0

Fixes #256
This commit is contained in:
Sn0wStorm 2020-04-02 16:23:19 +02:00
parent 11c7fa1378
commit 86f82f0a14
3 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ public class BCauldron {
private BIngredients ingredients = new BIngredients();
private final Block block;
private int state = 1;
private int state = 0;
private boolean changed = false;
public BCauldron(Block block) {
@ -69,7 +69,7 @@ public class BCauldron {
ingredients.add(ingredient, rItem);
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
if (state > 1) {
if (state > 0) {
state--;
}
}
@ -330,7 +330,7 @@ public class BCauldron {
}
config.set(prefix + ".block", cauldron.block.getX() + "/" + cauldron.block.getY() + "/" + cauldron.block.getZ());
if (cauldron.state != 1) {
if (cauldron.state != 0) {
config.set(prefix + ".state", cauldron.state);
}
config.set(prefix + ".ingredients", cauldron.ingredients.serializeIngredients());

View File

@ -135,7 +135,7 @@ public class BIngredients {
// new base potion
brew = new Brew(this);
if (state <= 1) {
if (state <= 0) {
cookedName = P.p.languageReader.get("Brew_ThickBrew");
PotionColor.BLUE.colorBrew(potionMeta, potion, false);
} else {
@ -357,7 +357,7 @@ public class BIngredients {
int quality = 10 - (int) Math.round(((float) Math.abs(cookedTime - recipe.getCookingTime()) / recipe.allowedTimeDiff(recipe.getCookingTime())) * 10.0);
if (quality >= 0) {
if (cookedTime <= 1) {
if (cookedTime < 1) {
return 0;
}
return quality;

View File

@ -289,7 +289,7 @@ public class BData {
Block worldBlock = world.getBlockAt(P.p.parseInt(splitted[0]), P.p.parseInt(splitted[1]), P.p.parseInt(splitted[2]));
BIngredients ingredients = loadCauldronIng(section, cauldron + ".ingredients");
int state = section.getInt(cauldron + ".state", 1);
int state = section.getInt(cauldron + ".state", 0);
new BCauldron(worldBlock, ingredients, state);
} else {