fix #2324 - Add check for currentNeededTicks being zero
This commit is contained in:
parent
b9100fb19b
commit
ea0db38b6a
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ public abstract class GenericMachineBlockEntity extends PowerAcceptorBlockEntity
|
|||
* @return int Scale of progress
|
||||
*/
|
||||
public int getProgressScaled(int scale) {
|
||||
if (crafter != null && crafter.currentTickTime != 0) {
|
||||
if (crafter != null && crafter.currentTickTime != 0 && crafter.currentNeededTicks != 0) {
|
||||
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue