Fix wool coloring in texture support

This commit is contained in:
Mike Primm 2011-07-19 01:47:46 -05:00
parent 73825b4558
commit f58092167f
2 changed files with 4 additions and 3 deletions

View File

@ -164,7 +164,7 @@ public class HDBlockModels {
}
}
}
map[off] = (short)((255*raw_w) / (nativeres*nativeres*nativeres));
map[off] = (short)((255*raw_w) / (res*res*res));
if(map[off] > 255) map[off] = 255;
if(map[off] < 0) map[off] = 0;
}

View File

@ -463,8 +463,8 @@ public class TexturePack {
}
}
/* Generate weighted compnents into color */
c.setRGBA(accum_red / (nativeres*nativeres), accum_green / (nativeres*nativeres),
accum_blue / (nativeres*nativeres), accum_alpha / (nativeres*nativeres));
c.setRGBA(accum_red / (res*res), accum_green / (res*res),
accum_blue / (res*res), accum_alpha / (res*res));
dest_argb[(y*res) + x] = c.getARGB();
}
}
@ -581,6 +581,7 @@ public class TexturePack {
blkids.add(Integer.parseInt(av[1]));
}
else if(av[0].equals("data")) {
if(databits < 0) databits = 0;
if(av[1].equals("*"))
databits = 0xFFFF;
else