<BUG>IAgriFertilizer fert = FertilizerRegistry.getInstance().getValue(heldItem);return fert == null ? false : fert.applyFertilizer(player, world, pos, crop, heldItem, RANDOM);</BUG><CONTEXT>} else if (player.isSneaking() || heldItem == null || heldItem.getItem() == null) {this.harvest(world, pos, state, player, crop);} else if (TypeHelper.isAnyType(heldItem.getItem(), ITEM_EXCLUDES)) {return false;} else if (FertilizerRegistry.getInstance().hasAdapter(heldItem)) {<extra_id_0>} else if (plantSeed(heldItem, world, pos)) {</CONTEXT>
Optional<IAgriFertilizer> fert = FertilizerRegistry.getInstance().valueOf(heldItem);return fert.isPresent() && fert.get().applyFertilizer(player, world, pos, crop, heldItem, RANDOM);