Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SwordRenderer implements IItemRenderer {
- ModelBase itemModel;
- public SwordRenderer(){
- itemModel = new YOURMODEL()
- }
- @Override
- public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
- ItemRendererHelper helper)
- {
- return false;
- }
- @Override
- public void renderItem(ItemRenderType type, ItemStack item, Object... data)
- {
- switch(type)
- {
- case EQUIPPED:
- {
- GL11.glPushMatrix();
- Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(YOUR_TEXTURE));
- itemModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
- GL11.glPopMatrix();
- }
- default:
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement