public void setRenderingChunk(boolean flag) { if (renderingChunk != flag) { for (int i = 0; i < subTextures.length; i++) { subTextures[i] = 0; } } renderingChunk = flag; if (textureUpdateTime != Config.getTextureUpdateTime()) { terrainTexture = 0; textureUpdateTime = Config.getTextureUpdateTime(); } }
public Tessellator getSubTessellatorImpl(int i) { for (int j = 0; j < subTextures.length; j++) { int l = subTextures[j]; if (l == i) { Tessellator tessellator1 = subTessellators[j]; return tessellator1; } } for (int k = 0; k < subTextures.length; k++) { int i1 = subTextures[k]; if (i1 <= 0) { Tessellator tessellator2 = subTessellators[k]; subTextures[k] = i; return tessellator2; } } Tessellator tessellator = new Tessellator(); Tessellator atessellator[] = subTessellators; int ai[] = subTextures; subTessellators = new Tessellator[atessellator.length + 1]; subTextures = new int[ai.length + 1]; System.arraycopy(atessellator, 0, subTessellators, 0, atessellator.length); System.arraycopy(ai, 0, subTextures, 0, ai.length); subTessellators[atessellator.length] = tessellator; subTextures[ai.length] = i; Config.dbg( (new StringBuilder()) .append("Allocated subtessellator, count: ") .append(subTessellators.length) .toString()); return tessellator; }
private int getTerrainTexture() { if (terrainTexture == 0) { terrainTexture = Config.getMinecraft().field_6315_n.func_1070_a("/terrain.png"); } return terrainTexture; }
public void func_991_a(double p_991_1_, double p_991_3_, double p_991_5_) { if (autoGrow && field_1498_o >= field_1494_B - 32) { Config.dbg( (new StringBuilder()) .append("Expand tessellator buffer, old: ") .append(field_1494_B) .append(", new: ") .append(field_1494_B * 2) .toString()); field_1494_B *= 2; int ai[] = new int[field_1494_B]; System.arraycopy(field_1506_g, 0, ai, 0, field_1506_g.length); field_1506_g = ai; field_1509_d = GLAllocation.func_1127_b(field_1494_B * 4); field_1508_e = field_1509_d.asIntBuffer(); field_1507_f = field_1509_d.asFloatBuffer(); field_35836_g = field_1509_d.asShortBuffer(); } field_1497_p++; if (field_1493_r == 7 && field_1511_b && field_1497_p % 4 == 0) { for (int i = 0; i < 2; i++) { int j = 8 * (3 - i); if (field_1500_m) { field_1506_g[field_1498_o + 3] = field_1506_g[(field_1498_o - j) + 3]; field_1506_g[field_1498_o + 4] = field_1506_g[(field_1498_o - j) + 4]; } if (field_35838_p) { field_1506_g[field_1498_o + 7] = field_1506_g[(field_1498_o - j) + 7]; } if (field_1501_l) { field_1506_g[field_1498_o + 5] = field_1506_g[(field_1498_o - j) + 5]; } field_1506_g[field_1498_o + 0] = field_1506_g[(field_1498_o - j) + 0]; field_1506_g[field_1498_o + 1] = field_1506_g[(field_1498_o - j) + 1]; field_1506_g[field_1498_o + 2] = field_1506_g[(field_1498_o - j) + 2]; field_1505_h++; field_1498_o += 8; } } if (field_1500_m) { field_1506_g[field_1498_o + 3] = Float.floatToRawIntBits((float) field_1504_i); field_1506_g[field_1498_o + 4] = Float.floatToRawIntBits((float) field_1503_j); } if (field_35838_p) { field_1506_g[field_1498_o + 7] = field_35837_l; } if (field_1501_l) { field_1506_g[field_1498_o + 5] = field_1502_k; } if (field_1499_n) { field_1506_g[field_1498_o + 6] = field_1489_v; } field_1506_g[field_1498_o + 0] = Float.floatToRawIntBits((float) (p_991_1_ + field_1492_s)); field_1506_g[field_1498_o + 1] = Float.floatToRawIntBits((float) (p_991_3_ + field_1491_t)); field_1506_g[field_1498_o + 2] = Float.floatToRawIntBits((float) (p_991_5_ + field_1490_u)); field_1498_o += 8; field_1505_h++; if (!autoGrow && field_1497_p % 4 == 0 && field_1498_o >= field_1494_B - 32) { func_982_a(); field_1488_w = true; } }