Posted December 4, 201311 yr I'd like to render the Ender Dragon with a new texture. Is it possible for me to use a Forge event that every time the Ender dragon is called(constucted) I can bind my custom texxture? A little help.
December 5, 201311 yr Hi Unfortunately I think the answer is almost certainly "no". But you could copy the Ender Dragon to a set of new classes and change the textures to whatever you want. Won't be easy, the dragon is complicated. -TGG
December 5, 201311 yr Wouldnt it be possible to extend the renderer class(s) and override the method that sets the texture? It makes sence to me that it would work, but i could be overlooking something.
December 6, 201311 yr Author That's exactly what I was thinking. That I could just hook into the Ender Dragon Render class and when ever it is called just bind my custom texture.
December 6, 201311 yr The question is a bit ... confusing. Construction of a mob's models happens at most twice during the game run: Once into Minecraft's internal representation of it (during the constructor call of its Model) and once when the model first has to be rendered, into graphic card memory (in compileDisplayList(float) of its ModelRenderers). Neither of them involve any texture binding. Texture binding (for mobs) happens once per frame the entity is to be rendered in renderModel(EntityLivingBase, float, float, float, float, float, float) (actually more of a renderModel(<? extends EntityLivingBase>, float, float, float, float, float, float) in original code, but we don't get the generics decompiled properly right now) of the entity's renderer, and it typically binds whatever ResourceLocation gets returned from getEntityTexture(Entity) of the entity's renderer returns (though the Ender Dragon specifically also some extra code for the "dying" textures). There are no hooks or events you can set anywhere in code to manipulate that. Your best - least invasive, at least - bet would be to do a coremod and exchange RenderDragon's protected ResourceLocation getEntityTexture(Entity) method with your own. More complicated (in terms of the amount of code needed) would be to @ForgeSubscribe to the RenderLivingEvent.Pre event and do the whole dragon rendering yourself, preventing the original renderer from even running (event.setCanceled(true)). ItemBlock is not a Block ItemStack is not an Item Damage value is not metadata Stop confusing them.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.