Tuesday, February 21, 2012

Why is the Gold on Fire?

Question

I've recently been trying to find a Texture-Pack for MineCraft that I'm happy with, and I seem to have run into a problem with some of them. In 3 of the 4 packs I've tried, Gold Blocks don't display correctly. Here's a sample:


It Burns!
Does anyone have any idea why this might be occurring?

For reference, this is the GeruDoku fantasy/adventurer texture pack.

Asked by GnomeSlice

Answer

Minecraft isn't written to support different-resolution textures.

The default Minecraft terrain texture is a 256×256 image with 16×16 tiles in it. The code which animates the animated textures in Minecraft (fire, water, lava, and portals) writes onto specific pixel offsets according to 16×16 tiles, which are wrong for larger textures, so you get small fire/water/portal images occupying other blocks. Presumably the patchers replace the 16× factors with 32×, or whatever fits the actual texture resolution.

The reason the textures mostly work is that the OpenGL 3D API mostly takes coordinates in textures in terms of numbers between 0 and 1, rather than 0 and whatever the pixel size of the image is, so the main rendering doesn't care; only the animated textures, which are actually defined in terms of calculating individual pixels, are affected.

Also, tiles over a certain size (128×128, I think) will crash Minecraft. Below that size, you can still use HD textures and it will work except for the misplaced animations. The animated items will not animate, and (for a 32× pack) these will have animations on them: bricks, gold blocks, Netherrack, and pumpkins.

Answered by Kevin Reid

No comments:

Post a Comment