Advertisement
Creepinson

d

Feb 20th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. @Override
  2. public void doRender(Entity entity, double x, double y, double z, float yaw, float partialTick) {
  3. // again, if you need some information from your custom entity class, you can cast to your
  4. // custom class, either passing off to another method, or just doing it here
  5. // in this example, it is not necessary
  6.  
  7. // if you are going to do any openGL matrix transformations, be sure to always Push and Pop
  8. GL11.glPushMatrix();
  9.  
  10. // bind your texture:
  11. bindTexture(textureSkin);
  12.  
  13. // do whatever transformations you need, then render
  14.  
  15. // typically you will at least want to translate for x/y/z position:
  16. GL11.glTranslated(x, y, z);
  17.  
  18. // if you are using a model, you can do so like this:
  19. model.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
  20.  
  21. // note all the values are 0 except the final argument, which is scale
  22. // vanilla Minecraft almost excusively uses 0.0625F, but you can change it to whatever works
  23.  
  24. GL11.glPopMatrix();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement