SHARE
TWEET

pejst

a guest Jul 11th, 2017 26 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class SwordRenderer implements IItemRenderer {
  2. ModelBase itemModel;
  3. public SwordRenderer(){
  4.     itemModel = new YOURMODEL()
  5. }  
  6. @Override
  7. public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
  8. ItemRendererHelper helper)
  9. {
  10.  
  11. return false;
  12. }
  13.  
  14. @Override
  15. public void renderItem(ItemRenderType type, ItemStack item, Object... data)
  16. {
  17. switch(type)
  18. {
  19. case EQUIPPED:
  20. {
  21. GL11.glPushMatrix();
  22.  
  23. Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(YOUR_TEXTURE));
  24.  
  25. itemModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
  26.  
  27. GL11.glPopMatrix();
  28. }
  29. default:
  30. break;
  31. }
  32.  
  33. }
  34.  
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top