Using frapi (the fabric-rendering API), this mod intercepts requests for block models, and if they refer to glTF files, provides them as static models that get baked into the chunk geometry as normal. Entirely clientside, this mod can be used to power "cursed" resource packs that replace existing blocks with non-cuboid shapes that vanilla can't make.
It can also be used as an "included" mod to power non-cuboid blocks in your mods.
The easiest way to create a compatible model is in Blockbench.
assets/minecraft/models/block)"loader": "suspicious_shapes:gltf". You can fill-in texture references and set color indices here too.The last part there is the hard part. In the file you'll see something like,
"images":[{"mimeType":"image/png","uri":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAr0lEQVQ4y6WTMQrCQBBFt0xtk0YQL+QR0mpnYyk5QbDObTc84YVB0NnFgSGTyf7/5w+bUpJ4LMdaeuI6jzWC5/Vcm0kAAyAleE6Hd00vkn8Fq0oCJv32up9yEg6REPGEQDLemyYR6DS3y7ATp3tQTTCEWqH3U50DcQccRl0b9lKSuAvV0wXG+AQyRTOYiDughkB76bXVgiDr5gkEeYEAu8iuf0L/WiD/Iii94diZ+gZo3N9oOnqLFAAAAABJRU5ErkJggg=="}]
This is a base-64 encoded image of the texture you used. Since block models can't use random textures that aren't in the atlas, we'll have to fix that. Replace each of the unreadable strings marked "uri" with a minecraft texture reference, like this
"images":[{"mimeType":"image/png","uri":"minecraft:blocks/stone"}]
Or, if you're making several models with this shape, you can use it as a parent with a texture up-reference like normal:
"images":[{"mimeType":"image/png","uri":"#all"}]
Your child model can look something like this:
{
"parent": "minecraft:block/sphere_all.gltf",
"loader": "suspicious_shapes:gltf",
"textures": {
"all": "minecraft:block/acacia_leaves"
},
"colorIndexes": [ 0 ]
}
And that's it! Load up minecraft or reload resource packs and you should see your model!

Use glTF models in resource packs and mods!