maxanier Posted September 16, 2014 Posted September 16, 2014 Hello, did not find a better heading. I want to render a vanilla cow with different textures (vanilla and vampire) dependent on the entity extended properties. For that I created custom rendere extending the vanilla cow renderer and registered in the RenderRegistry for the vanilla cow entity. The renderer rebinds the texture every onRender call, wherby it checks which texture to bind. (For testing purpose depening on health): protected ResourceLocation getEntityTexture(EntityCow cow) { if(cow.getHealth()<10.0f){ return vampireCowTextures; } return cowTextures; } public void doRender(EntityLiving cow, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_){ this.bindEntityTexture(cow); super.doRender(cow, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } My question is, will that affect the performance, when I use this for multiple differnt mobs, or is it better to create a own entity with own renderer and replacing the cow entity with it, after it becomes a vampire? Or maybe there is another solution. I hope I explained myself partly understandable. Thanks in advance. maxanier Quote Minecraft Second Screen Mod: Use your mobile as a second screen for Minecraft and see your inventory, redstone stati, the chat and much more on it. link Vampirism: Become a vampire in Minecraft link
TheGreyGhost Posted September 16, 2014 Posted September 16, 2014 Hi I think the best answer about performance questions is almost always "try it and see". -TGG Quote
maxanier Posted September 16, 2014 Author Posted September 16, 2014 Thanks for the quick answers. Thats sounds good. I wasnt sure, and I was not able to setup a reliable "try it and see" environment. maxanier Quote Minecraft Second Screen Mod: Use your mobile as a second screen for Minecraft and see your inventory, redstone stati, the chat and much more on it. link Vampirism: Become a vampire in Minecraft link
Recommended Posts
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.