mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Added recipe option to set Distill Time
This commit is contained in:
@@ -329,16 +329,13 @@ public class Brew {
|
||||
// Distilling section ---------------
|
||||
|
||||
// distill all custom potions in the brewer
|
||||
public static void distillAll(BrewerInventory inv, Boolean[] contents) {
|
||||
int slot = 0;
|
||||
while (slot < 3) {
|
||||
if (contents[slot]) {
|
||||
public static void distillAll(BrewerInventory inv, Brew[] contents) {
|
||||
for (int slot = 0; slot < 3; slot++) {
|
||||
if (contents[slot] != null) {
|
||||
ItemStack slotItem = inv.getItem(slot);
|
||||
PotionMeta potionMeta = (PotionMeta) slotItem.getItemMeta();
|
||||
Brew brew = get(potionMeta);
|
||||
brew.distillSlot(slotItem, potionMeta);
|
||||
contents[slot].distillSlot(slotItem, potionMeta);
|
||||
}
|
||||
slot++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +379,22 @@ public class Brew {
|
||||
slotItem.setItemMeta(potionMeta);
|
||||
}
|
||||
|
||||
public int getDistillTimeNextRun() {
|
||||
if (!canDistill()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (currentRecipe != null) {
|
||||
return currentRecipe.getDistillTime();
|
||||
}
|
||||
|
||||
BRecipe recipe = ingredients.getdistillRecipe(wood, ageTime);
|
||||
if (recipe != null) {
|
||||
return recipe.getDistillTime();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Ageing Section ------------------
|
||||
|
||||
public void age(ItemStack item, float time, byte woodType) {
|
||||
|
||||
Reference in New Issue
Block a user