- 32
- 3
- 4
Моделька рендерится почему-то не над мобом, а надо мной.
Render:
@SideOnly(Side.CLIENT)
public class RenderAbsoluteDeath extends RenderLiving {
private static final ResourceLocation TEXTURE_URL = new ResourceLocation("witchery", "textures/entities/death.png");
private static final ResourceLocation generic = new ResourceLocation("dh", "textures/particles/generic_block.png");
private final ResourceLocation modelPath = new ResourceLocation("dh", "models/generic_block.obj");
private final IModelCustom shieldModel = new ModelWrapperDisplayList((WavefrontObject) AdvancedModelLoader.loadModel(modelPath));
private final WavefrontObject test = new WavefrontObject(modelPath);
public RenderAbsoluteDeath() {
super(new ModelDeath(), 0.5F);
}
public void doRenderDeath(AbsoluteDeath entity, double par2, double par4, double par6, float par8, float par9) {
super.doRender(entity, par2, par4, par6, par8, par9);
BossStatus.setBossStatus(entity, true);
bindTexture(generic);
GL11.glPushMatrix();
GL11.glTranslatef(0F, 0.5F, 0F);
shieldModel.renderAll();
GL11.glPopMatrix();
}
public void doRender(EntityLiving entity, double par2, double par4, double par6, float par8, float par9) {
this.doRenderDeath((AbsoluteDeath)entity, par2, par4, par6, par8, par9);
}
protected ResourceLocation getEntityTexture(Entity par1Entity) {
return this.func_110832_a((AbsoluteDeath)par1Entity);
}
protected ResourceLocation func_110832_a(AbsoluteDeath par1Entity) {
return TEXTURE_URL;
}
}