Jump to content

[1.10.2] Porting from 1.7.10 - Glow effects, replacement for ISimpleBlockRenderingHandler?


Recommended Posts

Posted

Hello!

 

I have spent whole today trying to find a solution to something like this, googling, looking at this forum, everything... I came here hoping that someone might be able to help me.

 

I used to maintain a mod called HEXCraft in 1.7.10. Probably the most important feature of this mod were the glow effects of almost all blocks. I used to achieve this by rendering in two separate passes using ISimpleBlockRenderingHandler: one pass for the inner glow texture, and one pass for the outer texture with normal shading. I am currently porting this mod to 1.10.2, and virtually everything has changed to the point that I am rewriting the whole mod ground-up. I've spent most of the day trying to figure out how to achieve the glow effect again. I've read about the existence of IBakedModel and ISmartBlockModel, but I've not been able to find any straight tutorials on how to use them correctly, especially for something like this...


Here is how the effect used to look like: http://dl.celestek.xyz/thorinair/Minecraft/2017-04-08_17.59.06.png

Some more screenshots of the glow on various blocks are here on my Wiki: http://wiki.celestek.xyz/index.php?title=HEXCraft
And here is how it obviously looks now without the glow: http://dl.celestek.xyz/thorinair/Minecraft/2017-04-08_17.55.57.png

 

Here is the original source code of the 1.7.10 version, specifically of the ISimpleBlockRenderingHandler for the glowing blocks: https://github.com/CelesTek-Team/HexCraft/blob/master/main/java/com/celestek/hexcraft/client/renderer/HexBlockRenderer.java

And here is the whole source so far of the 1.10.2 version: https://github.com/CelesTek-Team/HexCraft/tree/1.10.2 Note that so far, only the basic items and the ore blocks are implemented, with the ore blocks not glowing. Most of the code are bits and pieces from Choonster's TestMod3 clumped together to make the basic stuff work (I haven't cleaned it up yet properly, but it should be understandable).


I honestly don't know how to proceed to combine all of this and make a glowing effect. I tried to use the

"shade": false

for the model, but that is useless as this only works when the block emits light. These blocks should never emit actual light.

Posted

Most of the most important mods which HEXCraft interfaced with are still on 1.10.2 (and I don't see that changing too much), plus porting to 1.11.2 should be way easier than from 1.7.10 afterwards, so maintaining two versions is a high possibility from this point on.

Posted

Exactly, but as I described in my OP, it is a bit more complicated than that. Check the screenshots for reference. The block has an internal glowing texture, and another texture on top of it which has normal shading, making it look like the glow is escaping from within the blocks. These textures are already on GitHub, for instance here are the two textures for the red ore block:
hexorium_a_red.png

hexorium_b_red.png
The "a" texture is the inner texture which should glow, and the "b" texture wraps around it to make only the red parts appear as glowing.

Posted

I've already seen both of those threads. Both don't answer the issue of the block not emitting light. Using the shade properity is useless in this situation. However, that example of IBakedModel does look nice and possibly usable.

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.