Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
3,985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. The method resorts the vertex data for translucent blocks in a temporary int array
  2. *************************************************************************************************************************
  3. public WorldRenderer.State getVertexState(float p_178971_1_, float p_178971_2_, float p_178971_3_)
  4. {
  5. int[] var4 = new int[this.rawBufferIndex];
  6. PriorityQueue var5 = new PriorityQueue(this.rawBufferIndex, new QuadComparator(this.rawFloatBuffer, (float)((double)p_178971_1_ + this.xOffset), (float)((double)p_178971_2_ + this.yOffset), (float)((double)p_178971_3_ + this.zOffset), this.vertexFormat.getNextOffset() / 4));
  7. int var6 = this.vertexFormat.getNextOffset();
  8. int var7;
  9.  
  10. for (var7 = 0; var7 < this.rawBufferIndex; var7 += var6)
  11. {
  12. var5.add(Integer.valueOf(var7));
  13. }
  14.  
  15. for (var7 = 0; !var5.isEmpty(); var7 += var6)
  16. {
  17. int var8 = ((Integer)var5.remove()).intValue();
  18.  
  19. for (int var9 = 0; var9 < var6; ++var9)
  20. {
  21. var4[var7 + var9] = this.rawIntBuffer.get(var8 + var9);
  22. }
  23. }
  24.  
  25. this.rawIntBuffer.clear();
  26. this.rawIntBuffer.put(var4);
  27. return new WorldRenderer.State(var4, this.rawBufferIndex, this.vertexCount, new VertexFormat(this.vertexFormat));
  28. }
  29. *************************************************************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement