public void onInteractBy(Entity entity, Block block, Action type, BlockFace clickedFace) {
super.onInteractBy(entity, block, type, clickedFace);
if (type != Action.RIGHT_CLICK) {
return;
}
Slot inv = PlayerUtil.getHeldSlot(entity);
if (inv != null && inv.get() != null && inv.get().isMaterial(Dye.BONE_MEAL) && type.equals(Action.RIGHT_CLICK)) {
if (!PlayerUtil.isCostSuppressed(entity)) {
inv.addAmount(-1);
}
if (GenericMath.getRandom().nextDouble() < 0.4D) {
final BlockMaterial mushroomType = block.getMaterial();
final VariableHeightObject mushroom;
if (mushroomType == VanillaMaterials.RED_MUSHROOM) {