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

How do I import this into my own mod to use for animations? I can't find a maven repository, is there another way? #20

Closed exited556 closed 1 year ago

exited556 commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Which Minecraft versions would this feature apply to? List Minecraft versions that the feature should be developed for.

Additional context Add any other context or screenshots about the feature request here.

exited556 commented 1 year ago

nvm I found it: https://github.com/soir20/MoreMcmeta/packages/1595482

soir20 commented 1 year ago

Yes, this is MoreMcmeta's Maven repostiory. GitHub packages might not allow you to download these packages automatically; last time I checked, it required an access token. I am aware of the issue, and a fix is planned so that I can provide Maven credentials in a secure manner.

soir20 commented 1 year ago

(Please let me know if you don't run into this issue; it's possible GitHub packages has been updated to allow public access without a token since I last checked.

You might be able to generate your own personal access token to download the packages.)

exited556 commented 1 year ago

Yeah you're right, I can't download them. I have no clue as to how I would go about generating personal access tokens. But that's cool, I'm new to all this modding so I thought it might just be me who didn't know how to import it.

soir20 commented 1 year ago

If the error is "unauthorized," it's a token issue.

GitHub has instructions to generate a PAT. It needs to have read:packages permissions. I am not 100% sure if a PAT for your account will allow you to download the packages. I think it will since the packages are configured to be public.

This the Maven repository configuration that I use to download MoreMcmeta packages with Gradle. The username would be your GitHub username, and the password is your PAT. I provide the credentials via environment variables (System.getenv() calls) in GitHub Actions or via global Gradle properties in my local development environment. Keeping the credentials in external files helps prevent them from being accidentally committed/shared and causing a security issue.

    repositories {
        // ...
        maven {
            url "https://maven.pkg.github.com/soir20/MoreMcmeta/"
            credentials {
                username System.getenv("MOREMCMETA_MAVEN_USER") ?: project.moremcmeta_maven_user
                password System.getenv("MOREMCMETA_MAVEN_PASS") ?: project.moremcmeta_maven_pass
            }
        }
    }
exited556 commented 1 year ago

Thank you for your help, I ended up doing it through the cursemaven repository and it looks beautiful. 👍 https://www.cursemaven.com/ (For others if they want to do it too, super easy)

soir20 commented 1 year ago

1.19-3.0.5 (1.19, not 1.19.3) works on 1.19.2. 3.0.6 includes a small compatibility fix for a specific mod (Dynamic Assets Generator), so you should be okay to use 3.0.5.

I typically only develop for the latest minor version on all supported major versions, but 1.19.3 is an anomaly in terms of the size of Mojang's code changes. I've been waiting to see how quickly other mods update before deciding what I want to do with 1.19.2. It's possible I might consider 1.19.3 as part of 1.20 and 1.19.2 as the last 1.19 version. There is a major update in the works for MoreMcmeta; something will probably be decided when that releases.

exited556 commented 1 year ago

1.19-3.0.5 can open in 1.19.2 but the animations won't work.

soir20 commented 1 year ago

I'm unable to reproduce this on Forge 43.2.0 (MC 1.19.2); I've also previously tested on Fabric 1.19.2. Can you provide logs, and are you using any other mods while testing?

exited556 commented 1 year ago

I can't provide logs rn but I will in a couple of days. Only other mod I'm using is GeckoLib.

soir20 commented 1 year ago

I tested with GeckoLib 1.19-3.1.39 on Forge 1.19.2 and still cannot reproduce the issue. Does this happen every time you start the game, and does this happen only in a dev environment?

exited556 commented 1 year ago

I just realized I'm using GeckoLib 3.1.19, so quite outdated, could that be the culprit? Not quite sure how to find logs.

soir20 commented 1 year ago

I just tested with GeckoLib 3.1.19, and the animations are working correctly.

Logs are located in %APPDATA%/Roaming/<your modded MC folder>/logs on Windows; the files are debug.log and latest.log from a session where the animations aren't working. If you're in a dev environment, there should be a logs folder inside a run folder (or equivalent).

When you say the animations are not working, does it look like all the frames in the textures are squished together? Or does the animation simply not progress?

exited556 commented 1 year ago

debug.log latest.log

All the frames in the textures are squished together. (It's the starmetal_ingot_layer_1.png that is not working, if you need to know that.)

soir20 commented 1 year ago

I don't see anything from the logs indicating an error with MoreMcmeta. If you use the MoreMcmeta Demo Pack, are the animations from the demo pack functional? If not, can you try removing all other packs?