Jump to content

Boss Mobs


Alix_The_Alicorn

Recommended Posts

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 ;)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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?)

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.