16
16
import org .lwjgl .opengl .GL11 ;
17
17
import org .lwjgl .opengl .GL12 ;
18
18
19
+ import cpw .mods .fml .common .FMLCommonHandler ;
20
+
19
21
public class TileEntityLittleBlocksRenderer extends TileEntitySpecialRenderer {
20
-
22
+
21
23
@ Override
22
24
public void renderTileEntityAt (TileEntity tileentity , double d , double d1 , double d2 , float f ) {
23
25
renderTileEntityLittleBlocks (
@@ -56,15 +58,15 @@ private void renderTileEntityLittleBlocks(TileEntityLittleBlocks tile, double x,
56
58
}
57
59
}
58
60
59
- Tessellator tessellator = Tessellator .instance ;
60
- int mode = tessellator .drawMode ;
61
+ // Tessellator tessellator = Tessellator.instance;
62
+ // int mode = tessellator.drawMode;
61
63
62
- if (tessellator .isDrawing ) {
63
- tessellator .draw ();
64
- }
64
+ // if (tessellator.isDrawing) {
65
+ // tessellator.draw();
66
+ // }
65
67
66
68
GL11 .glPushMatrix ();
67
- tessellator .startDrawing (mode );
69
+ // tessellator.startDrawing(mode);
68
70
69
71
GL11 .glTranslated (x , y , z );
70
72
GL11 .glTranslated (-tile .xCoord , -tile .yCoord , -tile .zCoord );
@@ -86,35 +88,40 @@ private void renderTileEntityLittleBlocks(TileEntityLittleBlocks tile, double x,
86
88
87
89
renderTiles (littleBlocks , tile , f );
88
90
89
- this .bindTextureByName ("/terrain.png" );
91
+ // this.bindTextureByName("/terrain.png");
90
92
91
- if (tessellator .isDrawing ) {
92
- tessellator .draw ();
93
- }
93
+ // if (tessellator.isDrawing) {
94
+ // tessellator.draw();
95
+ // }
94
96
95
97
GL11 .glDisable (GL12 .GL_RESCALE_NORMAL );
96
98
GL11 .glPopMatrix ();
97
- tessellator .startDrawing (mode );
98
- tessellator .draw ();
99
+ // tessellator.startDrawing(mode);
100
+ // tessellator.draw();
99
101
}
100
102
101
103
public void renderTiles (BlockLittleBlocksLittleRenderer littleBlocks , TileEntityLittleBlocks tile , float f ) {
102
104
for (String textureFile : littleBlocks .textures ) {
103
105
if (littleBlocks .texturedBlocksToRender .containsKey (textureFile )) {
104
- Tessellator tessellator = Tessellator .instance ;
105
- int mode = tessellator .drawMode ;
106
- if (tessellator .isDrawing ) {
107
- tessellator .draw ();
108
- }
109
- tessellator .startDrawing (mode );
106
+ //Tessellator tessellator = Tessellator.instance;
107
+ //int mode = tessellator.drawMode;
108
+ //if (tessellator.isDrawing) {
109
+ // tessellator.draw();
110
+ // tessellator.startDrawing(mode);
111
+ //}
112
+ ModLoader .getLogger ().fine ("[LittleBlocks]-TileRender-Texture[" +textureFile +"]" );
113
+ //this.bindTextureByName(textureFile);
114
+ //if (tessellator.isDrawing) {
115
+ // tessellator.draw();
116
+ //}
110
117
HashMap <Integer , BlockLittleBlocksLittleRenderer .LittleBlockToRender > littleBlocksToRender = littleBlocks .texturedBlocksToRender .get (textureFile );
111
- this .bindTextureByName (textureFile );
112
118
for (LittleBlockToRender block : littleBlocksToRender .values ()) {
113
119
TileEntity littleTile = tile .getLittleWorld ().getBlockTileEntity (
114
120
block .x ,
115
121
block .y ,
116
122
block .z );
117
123
if (littleTile != null ) {
124
+ ModLoader .getLogger ().fine ("[LittleBlocks]-TileRender-Tile[" +littleTile .toString ()+"]" );
118
125
tileEntityRenderer .renderTileEntityAt (
119
126
littleTile ,
120
127
littleTile .xCoord ,
@@ -123,9 +130,9 @@ public void renderTiles(BlockLittleBlocksLittleRenderer littleBlocks, TileEntity
123
130
f );
124
131
}
125
132
}
126
- if (tessellator .isDrawing ) {
127
- tessellator .draw ();
128
- }
133
+ // if (tessellator.isDrawing) {
134
+ // tessellator.draw();
135
+ // }
129
136
}
130
137
}
131
138
}
0 commit comments