So i'm making an enderman farm in my survival world, and i don't like the leaf texture. So i'm not sure if i can use slabs or glass or whatever block in which endermen can't spawn instead of leaves. I searched for an answer but i didnt find anything. Thanks in advance.
Mob spawning attempts can only occur on non-transparent, solid blocks that align along the top face of the blockspace (ie, the top face of a full block). Glass is a solid transparent block, so no mobs will ever spawn there.
Slabs, however, are non-transparent and solid, so at least in the top position they can spawn mobs. What's interesting to note is that bottom slabs still make attempts to spawn a mob (and, of course, since it doesn't align with the top face of the blockspace the spawn fails). This is basically the same way that leaves work, except the condition that fails is that there is no appropriate mob that can spawn on the leaf block (when outside of jungles). Because the game still makes an attempt at a spawn, leaves allow you to expand the spawnable area a little bit so that you are more likely to catch spawns and therefore get more mobs appearing in your grinder.