Skip to content

Commit

Permalink
fix: use fuzzy match on tree acc (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Jan 14, 2025
1 parent 4e13baf commit adb144f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedParticle;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper;
import javax.annotation.Nonnull;
Expand Down Expand Up @@ -133,6 +132,9 @@ private boolean updateSaplingData(Block machine, Block block, BlockMenu inv, Sap
}

protected boolean isFertilizer(@Nullable ItemStack item) {
return SlimefunUtils.isItemSimilar(item, organicFertilizer, false, false);
var id = Slimefun.getItemDataService().getItemData(item);

return id.map(s -> s.startsWith("FERTILIZER") && SlimefunItems.FERTILIZER.getType() == item.getType())
.orElse(false);
}
}

0 comments on commit adb144f

Please sign in to comment.