Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
- GL11.glPushMatrix();
- GL11.glTranslatef((float)x, (float)y, (float)z);
- GL11.glRotatef(0F, 0, 0, 0);
- GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
- //GL11.glEnable(GL11.GL_BLEND);
- //GL11.glEnable(GL11.GL_SRC_ALPHA);
- //GL11.glEnable(GL11.GL_ONE_MINUS_SRC_ALPHA);
- TileEntityThaumicGen t = (TileEntityThaumicGen)te;
- renderBlockYour(t, t.getWorldObj(), t.xCoord, t.yCoord, t.zCoord, TKBlocks.dummytg);
- GL11.glPopMatrix();
- }
- private void renderBlockYour(TileEntityThaumicGen te, World world, int i, int j, int k, Block block) {
- TileEntityThaumicGen t = (TileEntityThaumicGen)te;
- Tessellator tessellator = Tessellator.instance;
- float f = block.getLightValue(world, i, j, k);
- int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
- int l1 = l % 65536;
- int l2 = l / 65536;
- tessellator.setColorOpaque_F(f, f, f);
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)l1, (float)l2);
- int dir = world.getBlockMetadata(i, j, k);
- switch(t.getFacing().ordinal()) {
- case 2:
- GL11.glRotatef(180, 0, 1, 0);
- GL11.glTranslatef(0F, -1.5F, 1F); // +0.5, -0.5, +1
- break;
- case 3:
- GL11.glRotatef(180, 0, 1, 0);
- GL11.glTranslatef(0F, 1F, 0F);
- break;
- case 4:
- GL11.glRotatef(90, 0, 1, 0);
- GL11.glTranslatef(0F, 0F, 1F);
- break;
- case 5:
- GL11.glRotatef(270, 0, 1, 0);
- GL11.glTranslatef(1F, 0F, 0F);
- break;
- default:
- }
- GL11.glRotatef(dir * (-90F), 0F, 1F, 0F);
- GL11.glTranslatef(-0.5F, 0F, -0.5F);
- Minecraft.getMinecraft().renderEngine.bindTexture(TEX);
- this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement