99import java .util .List ;
1010
1111import net .minecraft .client .Minecraft ;
12- import net .minecraft .client .renderer .BlockRendererDispatcher ;
1312import net .minecraft .client .renderer .Tessellator ;
14- import net .minecraft .client .renderer .VertexBuffer ;
13+ import net .minecraft .client .renderer .WorldRenderer ;
1514import net .minecraft .client .renderer .vertex .DefaultVertexFormats ;
16- import net .minecraft .world .World ;
1715import net .minecraftforge .client .event .RenderWorldLastEvent ;
1816import net .minecraftforge .fml .common .eventhandler .SubscribeEvent ;
1917import com .fgtXray .reference .BlockInfo ;
@@ -31,7 +29,7 @@ public void onWorldRenderLast( RenderWorldLastEvent event ) // Called when drawi
3129 {
3230 if ( mc .theWorld != null && FgtXRay .drawOres )
3331 {
34- float f = event .getPartialTicks () ;
32+ float f = event .partialTicks ;
3533 float px = (float )mc .thePlayer .posX ;
3634 float py = (float )mc .thePlayer .posY ;
3735 float pz = (float )mc .thePlayer .posZ ;
@@ -41,7 +39,8 @@ public void onWorldRenderLast( RenderWorldLastEvent event ) // Called when drawi
4139 float dx = mx + ( px - mx ) * f ;
4240 float dy = my + ( py - my ) * f ;
4341 float dz = mz + ( pz - mz ) * f ;
44- drawOres ( dx , dy , dz ); // this is a world pos of the player
42+
43+ drawOres ( dx , dy , dz );
4544 }
4645 }
4746
@@ -57,10 +56,9 @@ private void drawOres( float px, float py, float pz )
5756 GL11 .glBlendFunc ( GL11 .GL_SRC_ALPHA , GL11 .GL_ONE_MINUS_SRC_ALPHA );
5857 GL11 .glLineWidth ( 1f );
5958
60- Tessellator tessellator = Tessellator .getInstance ();
61- VertexBuffer vertexBuffer = tessellator .getBuffer ();
62-
63- List <BlockInfo > temp = new ArrayList ();
59+ Tessellator tes = Tessellator .getInstance ();
60+ WorldRenderer vertexBuffer = Tessellator .getInstance ().getWorldRenderer ();
61+ List <BlockInfo > temp = new ArrayList <BlockInfo >();
6462 temp .addAll (this .ores ); // If we dont make a copy then the thread in ClientTick will ConcurrentModificationException.
6563
6664 for ( BlockInfo b : temp )
@@ -101,7 +99,7 @@ private void drawOres( float px, float py, float pz )
10199 vertexBuffer .pos (bx -px + f , by -py + f , bz -pz + f ).color (red , green , blue , 255 ).endVertex ();
102100 vertexBuffer .pos (bx -px + f , by -py + f1 , bz -pz + f ).color (red , green , blue , 255 ).endVertex ();
103101
104- tessellator .draw ();
102+ tes .draw ();
105103 }
106104
107105 GL11 .glDepthMask (true );
0 commit comments