mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-05 18:39:49 +01:00
Better compatibility with bone meal.
This commit is contained in:
parent
26634f7e1c
commit
42f3b5aaa4
@ -81,9 +81,9 @@ public class FarmTask extends BukkitRunnable {
|
||||
|
||||
private boolean useBoneMeal(Farm farm) {
|
||||
for (ItemStack item : farm.getItems()) {
|
||||
if (item.getType() != Material.BONE_MEAL) continue;
|
||||
if (item.getType() != CompatibleMaterial.BONE_MEAL.getMaterial()) continue;
|
||||
|
||||
farm.removeMaterial(Material.BONE_MEAL, 1);
|
||||
farm.removeMaterial(CompatibleMaterial.BONE_MEAL.getMaterial(), 1);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.songoda.epicfarming.tasks;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.epicfarming.EpicFarming;
|
||||
import com.songoda.epicfarming.farming.Farm;
|
||||
import com.songoda.epicfarming.farming.FarmManager;
|
||||
@ -55,7 +56,7 @@ public class HopperTask extends BukkitRunnable {
|
||||
Inventory hopperInventory = ((Hopper) block.getState()).getInventory();
|
||||
|
||||
for (ItemStack item : farm.getItems()) {
|
||||
if (item.getType() == Material.BONE_MEAL) continue;
|
||||
if (item.getType() == CompatibleMaterial.BONE_MEAL.getMaterial()) continue;
|
||||
|
||||
ItemStack toMove = item.clone();
|
||||
toMove.setAmount(1);
|
||||
|
Loading…
Reference in New Issue
Block a user