Jump to content

[SOLVED] ElytraLayer rendering issues


LocusAzzurro

Recommended Posts

I'm trying to make some custom elytra-like items and have them render when worn. Got the rendering to work somewhat but there are many problems.

  • When starting to fly in midair the wing opening animation is smooth like vanilla one, but when they are closing when landing they just snap to closed position and leaves a kind of "trail" effect i.e. like if there were a dozen of them closing, same thing happens when crotching to make the wings spread a little.
  • The enchantment glow effect is kinda broken, looks like the glow just keeps getting stronger until it gets to full white.
  • There is kinda of a fps drop when the model is getting rendered.

Definitely there is something wrong in there or something that I forgot to put in, but I was unable to find a solution after digging thru docs and google search results and source codes of other similar mods so I'm kinda at wit's end now, hope if you know what is going on here.

The classes used for the rendering are in the following package:

https://github.com/LocusAzzurro/icaruswings_mod/tree/main/src/main/java/org/mineplugin/locusazzurro/icaruswings/render

Edited by LocusAzzurro
solved
Link to comment
Share on other sites

On 7/2/2021 at 5:49 PM, LocusAzzurro said:

I'm trying to make some custom elytra-like items and have them render when worn. Got the rendering to work somewhat but there are many problems.

The problem is that you are adding a new layer every time RenderPlayerEvent is called. You should add the layer to the player renderer only once at startup.

Link to comment
Share on other sites

11 hours ago, vemerion said:

The problem is that you are adding a new layer every time RenderPlayerEvent is called. You should add the layer to the player renderer only once at startup.

Oh gosh looks like I tunnel visioned onto the model and layer themselves and it never clicked on me that it was the render event all along.

Made a set to store all players that I've added the layer to, now it's smooth like butter. Thanks for the help dude, and also for the grain interaction thing. :D

Scrap that, someone pointed out to me that the renderer is shared for all entities, so yeah, only once at startup.

Edited by LocusAzzurro
  • Like 1
Link to comment
Share on other sites

  • LocusAzzurro changed the title to [SOLVED] ElytraLayer rendering issues

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.