mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-22 10:15:43 +01:00
Bonemeal isn't a material in 1.8.
This commit is contained in:
parent
dd2e4a4bb0
commit
0c40b5b71a
@ -1,5 +1,6 @@
|
||||
package com.songoda.epichoppers.tasks;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.epichoppers.EpicHoppers;
|
||||
import com.songoda.epichoppers.boost.BoostData;
|
||||
import com.songoda.epichoppers.hopper.HopperManager;
|
||||
@ -521,11 +522,12 @@ public class HopTask extends BukkitRunnable {
|
||||
* @return true if the block is a farm item, otherwise false
|
||||
*/
|
||||
private boolean isFarmItem(Block block) {
|
||||
return EpicHoppers.getInstance().isEpicFarming() && com.songoda.epicfarming.EpicFarming.getInstance().getFarmManager().getFarm(block) != null;
|
||||
return plugin.isEpicFarming() && com.songoda.epicfarming.EpicFarming.getInstance().getFarmManager().getFarm(block) != null;
|
||||
}
|
||||
|
||||
private ItemStack[] getFarmContents(Block block) {
|
||||
return com.songoda.epicfarming.EpicFarming.getInstance().getFarmManager()
|
||||
.getFarm(block).getItems().stream().filter(i -> i.getType() != Material.BONE_MEAL).collect(Collectors.toList()).toArray(new ItemStack[0]);
|
||||
return com.songoda.epicfarming.EpicFarming.getInstance().getFarmManager().getFarm(block).getItems()
|
||||
.stream().filter(i -> CompatibleMaterial.getMaterial(i) != CompatibleMaterial.BONE_MEAL)
|
||||
.toArray(ItemStack[]::new);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user