Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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

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

  • 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]

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.