public void replaceTextureData(int[] pixels, int mipmapLevels)
throws Exception
{
BetterBarrels.debug("37p1 - entering texture replacement with " + mipmapLevels + " mipmap levels.");
int[][] aint = new int[1 + mipmapLevels][];
aint[0] = pixels;
fixPixels.invoke(this, new Object[] { aint });
boolean useAnisotropic = useAnisotropic.getBoolean(this);
aint = (int[][])setupAnisotropic.invoke(this, new Object[] { aint, Integer.valueOf(useAnisotropic ? this.field_130223_c - 16 : this.field_130223_c), Integer.valueOf(useAnisotropic ? this.field_130224_d - 16 : this.field_130224_d) });
aint = TextureUtil.func_147949_a(mipmapLevels, this.field_130223_c, aint);
BetterBarrels.debug("37 - Attempting to replace texture for [" + func_94215_i() + "] with an array of [" + (aint != null ? Integer.valueOf(aint[0].length) : "(null)") + "] pixels, current texture dims are [" + this.field_130223_c + "x" + this.field_130224_d + "] for a total size of " + this.field_130223_c * this.field_130224_d);
BetterBarrels.debug(toString());
if (aint[0].length != this.field_130224_d * this.field_130223_c) {
throw new Exception("Attempting to replace texture image data with " + (aint[0].length > this.field_130224_d * this.field_130223_c ? "too much" : "too little") + " data.");
}
BetterBarrels.debug("38 - Calling Minecraft Texture upload utility method");
TextureUtil.func_147955_a(aint, this.field_130223_c, this.field_130224_d, this.field_110975_c, this.field_110974_d, false, false);
func_130103_l();
}
StructuralLevelClientData.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:JABBA
作者:
评论列表
文章目录