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;
|
this.currentTickTime = -1;
|
||||||
setIsActive();
|
setIsActive();
|
||||||
} else {
|
} else {
|
||||||
this.currentTickTime = -0;
|
this.currentTickTime = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (inventory.hasChanged && !hasAllInputs()) {//If it doesn't have all the inputs reset
|
if (inventory.hasChanged && !hasAllInputs()) {//If it doesn't have all the inputs reset
|
||||||
currentRecipe = null;
|
currentRecipe = null;
|
||||||
currentTickTime = 0;
|
currentTickTime = -1;
|
||||||
setIsActive();
|
setIsActive();
|
||||||
}
|
}
|
||||||
if (currentRecipe != null && currentTickTime >= currentNeededTicks) {//If it has reached the recipe tick time
|
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
|
useAllInputs();//this uses all the inputs
|
||||||
currentRecipe = null;//resets
|
currentRecipe = null;//resets
|
||||||
currentTickTime = 0;
|
currentTickTime = -1;
|
||||||
setIsActive();
|
setIsActive();
|
||||||
}
|
}
|
||||||
} else if (currentRecipe != null && currentTickTime < currentNeededTicks) {
|
} else if (currentRecipe != null && currentTickTime < currentNeededTicks) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public abstract class ContainerCrafting extends RebornContainer {
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
for (int i = 0; i < this.crafters.size(); i++) {
|
for (int i = 0; i < this.crafters.size(); i++) {
|
||||||
ICrafting icrafting = (ICrafting) this.crafters.get(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);
|
icrafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
|
||||||
}
|
}
|
||||||
if (this.currentNeededTicks != crafter.currentNeededTicks) {
|
if (this.currentNeededTicks != crafter.currentNeededTicks) {
|
||||||
|
@ -48,6 +48,9 @@ public abstract class ContainerCrafting extends RebornContainer {
|
||||||
public void updateProgressBar(int id, int value) {
|
public void updateProgressBar(int id, int value) {
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
this.currentTickTime = value;
|
this.currentTickTime = value;
|
||||||
|
if(this.currentTickTime == -1){
|
||||||
|
this.currentTickTime = 0;
|
||||||
|
}
|
||||||
} else if (id == 1) {
|
} else if (id == 1) {
|
||||||
this.currentNeededTicks = value;
|
this.currentNeededTicks = value;
|
||||||
} else if (id == 2) {
|
} else if (id == 2) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue