Corrects harvesting time for disabled harvester.
This commit is contained in:
parent
9d94eba147
commit
523236d6ce
@ -73,6 +73,17 @@ public abstract class CandidateHarvester
|
||||
this.lastStartHarvestingTime = -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disabless the harvesting timer. Called when the harvest is disabled.
|
||||
*/
|
||||
public void disableHarvesting()
|
||||
{
|
||||
// Remember the last harvesting time.
|
||||
this.lastHarvestingTime = -1;
|
||||
// Stops the current timer.
|
||||
this.lastStartHarvestingTime = -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current harvesting time in ms. If this harvester is not
|
||||
* currently harvesting, then returns the value of the last harvesting time.
|
||||
|
||||
@ -469,6 +469,7 @@ public class CandidateHarvesterSet
|
||||
public void setEnabled(boolean enabled)
|
||||
{
|
||||
logger.info("disabling harvester: " + harvester);
|
||||
harvester.disableHarvesting();
|
||||
this.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user