Posted April 27, 20232 yr As the title states I want to render a layer or really anything that makes the entities I select turn blue, similar to the red layering of when a player is on fire but with my own twists to it. I have looked in vanilla code and saw that RenderBlockScreenEffectEvent holds all the information before the layering is added to the player(apparently its a block layered onto a player I am unsure) I want to do this but there is no actual code about how to do it its just documentation and get() methods. I've seen other members on the forum mention RenderSystem.setShaderColor but I dont understand how to get the ShaderInstance of the entity. Right now I am stuck between using RenderSystem or creating my own Layering which again has little to no documentation on it. Currently this is all I have @SubscribeEvent public static void onLivingRender(RenderLivingEvent.Pre e){ LivingEntity entity = e.getEntity(); if(entity.getPersistentData().contains(XprtData.ICE_BALL_FROZEN)){ RenderSystem.setShader(GameRenderer::getRendertypeEntityNoOutlineShader); RenderSystem.setShaderColor(0,0,255,1); } } I noticed in the event it has LivingRenderer class which has getModel() which also has a render method which can be used to re-render the model which I have also tried to do but when getting the RenderType from its ResourceLocation it just returns a default player model head and is placed directly at head level of the entity. Very weird
April 27, 20232 yr 1 hour ago, sFXprt said: Right now I am stuck between using RenderSystem or creating my own Layering which again has little to no documentation on it. Create a new RenderLayer for that and do something like the EnergySwirlLayer. Then, attach it during EntityRenderersEvent$AddLayers on the mod event bus. What you are doing right now will do nothing as the parameters are set by the model before rendering anyways.
April 28, 20232 yr Author 11 hours ago, ChampionAsh5357 said: Create a new RenderLayer for that and do something like the EnergySwirlLayer. Then, attach it during EntityRenderersEvent$AddLayers on the mod event bus. What you are doing right now will do nothing as the parameters are set by the model before rendering anyways. Got it, thanks for letting me know 👍
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.