fixes #251
This commit is contained in:
parent
25158d872f
commit
9b6383a548
2 changed files with 7 additions and 4 deletions
|
@ -134,14 +134,14 @@ public class RecipeCrafter {
|
|||
this.currentTickTime = -1;
|
||||
setIsActive();
|
||||
} else {
|
||||
this.currentTickTime = -0;
|
||||
this.currentTickTime = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (inventory.hasChanged && !hasAllInputs()) {//If it doesn't have all the inputs reset
|
||||
currentRecipe = null;
|
||||
currentTickTime = 0;
|
||||
currentTickTime = -1;
|
||||
setIsActive();
|
||||
}
|
||||
if (currentRecipe != null && currentTickTime >= currentNeededTicks) {//If it has reached the recipe tick time
|
||||
|
@ -161,7 +161,7 @@ public class RecipeCrafter {
|
|||
}
|
||||
useAllInputs();//this uses all the inputs
|
||||
currentRecipe = null;//resets
|
||||
currentTickTime = 0;
|
||||
currentTickTime = -1;
|
||||
setIsActive();
|
||||
}
|
||||
} else if (currentRecipe != null && currentTickTime < currentNeededTicks) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public abstract class ContainerCrafting extends RebornContainer {
|
|||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.currentTickTime != crafter.currentTickTime) {
|
||||
if (this.currentTickTime != crafter.currentTickTime || crafter.currentTickTime == -1) {
|
||||
icrafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
|
||||
}
|
||||
if (this.currentNeededTicks != crafter.currentNeededTicks) {
|
||||
|
@ -48,6 +48,9 @@ public abstract class ContainerCrafting extends RebornContainer {
|
|||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 0) {
|
||||
this.currentTickTime = value;
|
||||
if(this.currentTickTime == -1){
|
||||
this.currentTickTime = 0;
|
||||
}
|
||||
} else if (id == 1) {
|
||||
this.currentNeededTicks = value;
|
||||
} else if (id == 2) {
|
||||
|
|
Loading…
Reference in a new issue