Jump to content

Recommended Posts

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.

Posted

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

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