Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public void renderAModelAt(TileEntityIcicle tileEntity, double x, double y, double z, float f)
  2. {
  3. int meta = 0;
  4. if(tileEntity.getWorldObj() != null)
  5. {
  6. meta = tileEntity.getBlockMetadata();
  7. }
  8. FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Arcticraft.MOD_ID, "textures/blocks/modeled_blocks/icicle.png"));
  9. GL11.glPushMatrix();
  10. GL11.glEnable(GL11.GL_NORMALIZE);
  11. GL11.glEnable(GL11.GL_BLEND);
  12. GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  13. GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
  14. GL11.glScalef(1.0F, -1F, -1F);
  15. GL11.glRotatef(meta * 90, 0.0F, 1.0F, 0.0F);
  16. if(BlockIcicle.icicles[0] != null)
  17. {
  18. //large
  19. GL11.glScalef(1.2F, 1.0F, 1F);
  20. }
  21. else if(BlockIcicle.icicles[1] != null)
  22. {
  23. //regular
  24. GL11.glScalef(2.0F, 1F, 1F);
  25. }
  26. else if(BlockIcicle.icicles[3] != null)
  27. {
  28. //small
  29. GL11.glScalef(1.0F, 1F, 1F);
  30. }
  31. model.renderAll();
  32. GL11.glPopMatrix();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement