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
|
* @return int Scale of progress
|
||||||
*/
|
*/
|
||||||
public int getProgressScaled(int scale) {
|
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 crafter.currentTickTime * scale / crafter.currentNeededTicks;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue