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.

[1.16.5] Changing how a specific block is rendered.

Featured Replies

Posted

So i have been trying to implement a fluid that flows up instead of down.
I got the mechanics right, but the look is off.
The main problem is: 
the model that is rendered, depending on the flkuid height (the thing that makes flowing water into slopes)
is kinda hardcoded into fluid renderer from what i see (although in a perfect world it would use a model declared in a flowingfluid class).
And to make it look not as bad, I'd need to either somehow supply a custom renderer for my block (or FlowingFluidBlock to be precise)
or add a check in the fluid renderer for if the fluid is a instance of my block and patch a custom function in there.

Neither of which are trivial, from what i can see at least.
My question is, is it doable to lightly patch a core class or pass a custom renderer to a block within forge?
Or by any miracle if theres a way to somehow influence the rendered model from within fluid class afterall?

And yes im quite aware, that you never should modify base classes, but I can't find an event I could intercept to achieve the same result.

  • Author

Got it working with mixin for now, can't tell I'm satisfied with injecting a custom block check into a random renderer function, but as long as it works it's good I suppose.

For future reference, I hijacked the render fluid function within BlockRendererDispatcher if I recall correctly.

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.