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 ·