Posted July 3, 201411 yr Hey everyone, I have been trying to make a "boss" mob. What this means for me, is that a health bar and the mobs name render on the top of the screen, like the wither. So far, what I have is the standard mob setup. I have a Class extending EntityMob, Have a renderer class, am registering the mob class, am registering the renderer in my client proxy. But I can't figure out how to get the boss bar to render. I have been looking at EntityWither, ModelWither, and RenderWither, but with no avail. Any help is appreciated, especially is you have experience with this kind of stuff
July 3, 201411 yr I have no experience with adding bosses, but are you implementing IBossDisplayData in your Entity class, and calling BossStatus.setBossStatus in the doRender method of your Render class? Some code snippets would be helpful, as well
July 3, 201411 yr If you are inheriting from RenderLiving , you will probably need to @Override the doRender method. Something simple should suffice, along these lines perhaps?: @Override public void doRender(EntityLiving entityLiving, double x, double y, double z, float a, float b) { BossStatus.setBossStatus((IBossDisplayData)entityLiving, true); super.doRender(entityLiving, x, y, z, a, b); } Bear in mind that this exact code probably will not work as it is, but this is at least where I would start. I could be completely wrong, but that seems to be how the Wither does it (Oh, and I don't know what a and b are - maybe pitch/yaw?)
July 3, 201411 yr Author Yeah, I meant which, as in which out of the four form the superclass should I override. I did all four, and called a specific one from the other three. Here is the one method I was talking about: public void doRender(EntityTestBoss p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { BossStatus.setBossStatus(p_76986_1_, true); super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } [code]
July 3, 201411 yr https://bitbucket.org/Dragonisser/cobaltmod-source/src/108bc56e65c63b01a6becf329b0271c1c968c235/cobaltmod/entity/EntityCobaltGuardian.java?at=master https://bitbucket.org/Dragonisser/cobaltmod-source/src/108bc56e65c63b01a6becf329b0271c1c968c235/cobaltmod/renderer/RenderCobaltGuardian.java?at=master
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.