MoreMcmeta / core

Animate almost any Minecraft texture with more options. Texture configuration API. 1.16-1.20
GNU Lesser General Public License v3.0
28 stars 5 forks source link

Enchantment glint please #15

Closed katashisano closed 10 months ago

katashisano commented 2 years ago

I was making a texture pack for crystal pvp and I wanted to apply the enchantment glint effect to the totem, but there was no option to do that through .mcmeta file, so please, add it if possible.

soir20 commented 2 years ago

I like this idea. Just as an FYI, I've paused new feature development on 3.x while I work on 4.x. 4.x is a big enough change that it isn't really efficient to develop features for 3.x and then port them over to 4.x, though I am still doing bug fixes for 3.x. You might wish to watch #7 for more current updates, which is highest priority and the main issue for 4.x-related things at the moment.

katashisano commented 2 years ago

Thanks, really useful.

soir20 commented 10 months ago

I've finally had a chance to take a closer look at this. I originally wanted to implement this so that you could simply add "enchanted": true for a texture, but I've found that this isn't really workable for several technical reasons. The main reason is that the way Minecraft implements block textures doesn't work well with the sliding/translation and blur effects of the enchantment glint. The workaround the avoid that issue has the potential to impact game performance and be complicated to implement.

Now that the emissive plugin has been finished, I decided to add an enchantment effect as an animated emissive overlay. Here's the resource pack I'm using and a GIF of the enchantment effect:

MoreMcmeta Enchantment Demo.zip

enchantment_glint

For testing, I only applied the enchantment to the oak log. You can use this .moremcmeta file to apply the enchantment to other blocks and entities (assets/minecraft/textures/block/oak_log.png.moremcmeta in the pack):

{
    "overlay": {
        "texture": "minecraft:textures/enchantment_glint.png",
        "emissive": true,
        "transparency": "translucent"
    }
}

I created a command-line tool to help me generate this animation and made it available here, in case someone wants to create their own version of the enchantment animation.

Note that you need MoreMcmeta and the emissive plugin for the enchantment effect to appear.