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

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

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.

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

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.