Hey,
I'm working on a mod wich should render a vanilla minecraft block.
I'm trying to use an TESR but I don't know how I can get the block texture I have to bind to.
I'm glad for any response
Likely that would be new ResourceLocation(Block#getRegistryName())
But then you'd have to load the block's blockstate and model files yourself to try and find textures. Any given block can have as many textures as it wants for as many blockstates as it wants.
Alternatively, you can get it's baked quads like so:
https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe04_block_dynamic_block_model1/CamouflageBakedModel.j