I found out that run/resourcepacks and src/main/resources/ serve different purposes.
Resourcepacks
In run/resourcepacks/ you can add assets for existing parts of the game. E.g. to overwrite the texture of the vanilla creepers:
run/resourcepacks/
└── myresources
    ├── assets
    │   └── minecraft
    │       └── textures
    │           └── entity
    │               └── creeper
    │                   └── creeper.png
    ├── pack.mcmeta
    └── pack.png
7 directories, 3 files
The content of pack.mcmeta:
{
  "pack": {
    "description": "My resources",
    "pack_format": 64
  }
}
For the pack_format for your version of MC see:
https://minecraft.wiki/w/Tutorial:Creating_a_resource_pack#Pack_format
pack.png is optional.
You do not have to zip the contents.
Resources
In src/main/resources you put the resources, i.e. client side assets, server side data, for your mod. E.g.:
src/main/resources/
├── META-INF
│   └── mods.toml
├── assets
│   └── myfirstmod
│       ├── items
│       │   └── banana.json
│       ├── lang
│       │   ├── de_de.json
│       │   └── en_us.json
│       ├── models
│       │   └── item
│       │       └── banana.json
│       └── textures
│           └── item
│               └── banana.png
├── data
│   └── myfirstmod
│       └── recipe
│           ├── my_first_shaped.json
│           └── my_first_shapeless.json
├── pack.mcmeta
└── pack.png
13 directories, 10 files
								By 
lmoellendorf ·