Minecraft does not extrude any polygons. Minecraft uses simple polygons such as a rectangle and places a 16x16 texture on it. (Mods may use different resolution ones). The sword you are holding is made of polygons, it's not 2D.
To answer your questions anyways, there are several ways to "extrude" from 2D textures. Usually you use a technique called normal mapping or bump mapping. You may also use parallax mapping. Finally you can also use geometry shader to literally create new geometry.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.