Jump to content

[1.18] How to make blocks glow like a spider's eyes


Zemelua

Recommended Posts

I have implemented a custom liquid and it is working.

Now, I want to make it glow like a spider's eye (I know it's not really shining, it's rendered ignoring shadows). I want to make the whole block shine, not just a part like the eyes of a spider.

Here is my code. Apply ManaModel to my liquid block with ClientHanlder.onModelBake. ManaModel is an IBakedModel and I believe it can be rendered by overriding getQuads and setting the quads to the maximum light.

But it doesn't work. Is it because ManaModel.putLightVertex is not passing the correct value? Or is it not possible to apply the light in the first place? Model is complicated, please help someone.

Link to comment
Share on other sites

I was expecting to get a FluidModel with ModelBakeEvent, but apparently this isn't being used. It is the LiquidBlockRenderer class that actually renders the liquid. By rewriting the getLightColor method of this class, my goal was achieved. However, since I'm using a mixin, if anyone has an idea that can do the same within the forge, I'd appreciate it if you could tell me for other modders who saw this as well.

Link to comment
Share on other sites

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.