mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-12-02 15:33:28 +01:00
performance bump
This commit is contained in:
parent
32b71f0d78
commit
70041fcab0
@ -37,6 +37,7 @@ public class FarmTask extends BukkitRunnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
main:
|
||||||
for (Farm farm : plugin.getFarmManager().getFarms().values()) {
|
for (Farm farm : plugin.getFarmManager().getFarms().values()) {
|
||||||
if (farm.getLocation() == null) continue;
|
if (farm.getLocation() == null) continue;
|
||||||
Location farmLocation = farm.getLocation();
|
Location farmLocation = farm.getLocation();
|
||||||
@ -57,8 +58,9 @@ public class FarmTask extends BukkitRunnable {
|
|||||||
plugin.getGrowthTask().addLiveCrop(block.getLocation(), new Crop(block.getLocation(), farm));
|
plugin.getGrowthTask().addLiveCrop(block.getLocation(), new Crop(block.getLocation(), farm));
|
||||||
|
|
||||||
if (!farm.getLevel().isAutoHarvest()
|
if (!farm.getLevel().isAutoHarvest()
|
||||||
|| !crop.getState().equals(CropState.RIPE)
|
|| !crop.getState().equals(CropState.RIPE)) continue;
|
||||||
|| !doDrop(farm, block.getType())) continue;
|
|
||||||
|
if (!doDrop(farm, block.getType())) continue main;
|
||||||
|
|
||||||
if (farm.getLevel().isAutoReplant()) {
|
if (farm.getLevel().isAutoReplant()) {
|
||||||
BlockState cropState = block.getState();
|
BlockState cropState = block.getState();
|
||||||
|
Loading…
Reference in New Issue
Block a user