Posted July 2, 20214 yr 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 July 4, 20214 yr by LocusAzzurro solved
July 3, 20214 yr 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.
July 4, 20214 yr Author 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. Scrap that, someone pointed out to me that the renderer is shared for all entities, so yeah, only once at startup. Edited July 4, 20214 yr by LocusAzzurro
July 4, 20214 yr 8 minutes ago, LocusAzzurro said: Thanks for the help dude, and also for the grain interaction thing. No problem, I am glad I could be of assistance!
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.