mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-01-07 18:58:15 +01:00
parent
11c7fa1378
commit
86f82f0a14
@ -31,7 +31,7 @@ public class BCauldron {
|
|||||||
|
|
||||||
private BIngredients ingredients = new BIngredients();
|
private BIngredients ingredients = new BIngredients();
|
||||||
private final Block block;
|
private final Block block;
|
||||||
private int state = 1;
|
private int state = 0;
|
||||||
private boolean changed = false;
|
private boolean changed = false;
|
||||||
|
|
||||||
public BCauldron(Block block) {
|
public BCauldron(Block block) {
|
||||||
@ -69,7 +69,7 @@ public class BCauldron {
|
|||||||
|
|
||||||
ingredients.add(ingredient, rItem);
|
ingredients.add(ingredient, rItem);
|
||||||
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
|
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
|
||||||
if (state > 1) {
|
if (state > 0) {
|
||||||
state--;
|
state--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,7 +330,7 @@ public class BCauldron {
|
|||||||
}
|
}
|
||||||
|
|
||||||
config.set(prefix + ".block", cauldron.block.getX() + "/" + cauldron.block.getY() + "/" + cauldron.block.getZ());
|
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 + ".state", cauldron.state);
|
||||||
}
|
}
|
||||||
config.set(prefix + ".ingredients", cauldron.ingredients.serializeIngredients());
|
config.set(prefix + ".ingredients", cauldron.ingredients.serializeIngredients());
|
||||||
|
@ -135,7 +135,7 @@ public class BIngredients {
|
|||||||
// new base potion
|
// new base potion
|
||||||
brew = new Brew(this);
|
brew = new Brew(this);
|
||||||
|
|
||||||
if (state <= 1) {
|
if (state <= 0) {
|
||||||
cookedName = P.p.languageReader.get("Brew_ThickBrew");
|
cookedName = P.p.languageReader.get("Brew_ThickBrew");
|
||||||
PotionColor.BLUE.colorBrew(potionMeta, potion, false);
|
PotionColor.BLUE.colorBrew(potionMeta, potion, false);
|
||||||
} else {
|
} 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);
|
int quality = 10 - (int) Math.round(((float) Math.abs(cookedTime - recipe.getCookingTime()) / recipe.allowedTimeDiff(recipe.getCookingTime())) * 10.0);
|
||||||
|
|
||||||
if (quality >= 0) {
|
if (quality >= 0) {
|
||||||
if (cookedTime <= 1) {
|
if (cookedTime < 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return quality;
|
return quality;
|
||||||
|
@ -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]));
|
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");
|
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);
|
new BCauldron(worldBlock, ingredients, state);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user