Started by
CelestialMoths
on
Topic category: Help with Minecraft modding (Java Edition)
So I'm trying to create a new block that spawns in the pale garden, and it's supposed to bloom at night like the eyeblossoms and glow in the dark like they do. I've checked the option for "emissive rendering" in the block properties, but it isn't rendering how I want it to. I have an extra texture to map where the glow should be, but you can only apply those textures to living entities for some reason. How did Mojang achieve this effect, and can I somehow do it too? I've already gotten it to bloom at the right time and now all I need is the emissive rendering.
I solved it!!! So, basically, what you need to do is make your .json file in blockbench with an extra cube face (or multiple, depending on where you need the emissive texture), map your normal texture with the emissive parts erased onto the first cube (will later be referred to as #0 in MCreator) and then map only the emissive parts on a different texture to the extra cube overlapping the original. You won't have to worry about Z-fighting because the textures won't overlap.
Next, before you import the .json into MCreator (because I had trouble editing it in MCreator not realizing I wasn't able to lock the custom model .json file before making changes and it wasn't saving), open it as a text file (or in something like IntelliJ) and add
just before the "faces": { on whichever faces you DON'T want to be emissive (just before the "texture": "#0" ones) and then add
In the same spot (right before "faces": {) on the faces that you DO want to be emissive, which are the blocks of code that end in "texture": "#1".
It worked like a charm and now I have blocks with glowing parts of the texture!
I should note, I don't think you HAVE to add "shade": false, to textures that aren't emissive. Now that I look at it, I think that was only part of the eyeblossoms' code that I copied over. Still, it worked out for me as I actually prefer it, but doing that will probably cause some weird lighting if you don't want it.