Cannot use com.mojang and net.minecraft or gensources

I get tons of errors like

public class ChannelingRecipe extends ProcessingRecipe<ChannelingRecipe.ChannelingWrapper> {
       ^
  class file for net.minecraft.world.item.crafting.Recipe not found

public static class ChannelingWrapper extends ItemStackHandlerContainer {
                  ^
  class file for net.minecraft.world.Container not found

import net.minecraft.world.level.Level;
Cannot resolve symbol 'Level'

import net.minecraft.core.registries.BuiltInRegistries;
Cannot resolve symbol 'BuiltInRegistries'

Some stuff in my build.gradle

id "fabric-loom" version "1.7-SNAPSHOT"


minecraft("com.mojang:minecraft:${minecraft_version}")
mappings( loom.layered() {
    mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
    parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
    officialMojangMappings() { nameSyntheticMembers = false }
})

And when generating sources

Unable to simplify switch on enum: const(1) not found, available: {} in method fzc$a a

Execution failed for task ':genClientOnlySourcesWithVineflower'.
> Failed to decompile, java.lang.IllegalStateException: Unexpected output: /ffq$a$a.java

(1.20.1 java 17 gradle 8.10.1)
(newest fabric loader and api)

Actually, nothing you said lets me think your question is anyhow related to Gradle and thus off-topic here.
Well, not more than that you use Gradle to run the build.