Jump to content

Recommended Posts

Posted

How to add a new renderLayer to the player?

In the original player class we have its constructor:

  Reveal hidden contents

I would like to add an additional Layer through events.
I searched a lot and found the way below, using
EntityRenderersEvent.AddLayers.

  Reveal hidden contents

However, the code states that o renderer = null.
How to add this RenderLayer to entities that already exist in vanilla?

Posted

Thanks. The renderer isn't more null. But the layer not render nothing.

Let's go back a few houses!!!

To check if the exampleentityLayer is working(Is working).
-> I built a new entity (extends Skeleton)
-> I added this render (my renderLayer) to my new created entity. It works! see

My entity renderer (created by me) and the added renderlayer:

  Reveal hidden contents

Look at the image that works:

  Reveal hidden contents

Now let's put my RenderLayer in a Vanila entity (a Skeleton). Not yet in the Player (we will do this later, if possible).
So all Skeletons must render this armor. But this does not happen: See the image below.

Adding the RenderLayer in Skeleton Vanilla via Register EntityRenderersEvent.AddLayers:

  Reveal hidden contents

The Vanilla Skeleton Image:

  Reveal hidden contents
Posted

Right. 

That is complete custom Skeleton:

  Reveal hidden contents

And this is the Complete Custom ExampleEntityLayer (the custom renderLayer to Custom Skeletom)

(It's basically an adapted HumanoidArmorLayer class)

  Reveal hidden contents

 

Posted

Is Here:

  Reveal hidden contents

 

Posted

I discovered the error: My Event Bus was in the wrong place.

Correct Place:

  Reveal hidden contents

 

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.