Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative for minecraftLibrary #12

Closed
henkelmax opened this issue Oct 30, 2023 · 5 comments
Closed

Alternative for minecraftLibrary #12

henkelmax opened this issue Oct 30, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@henkelmax
Copy link

There does not seem to be an alternative for minecraftLibrary in NG7.
Is there any way to get libraries working in the development runtime?

@henkelmax henkelmax changed the title Alternaive for minecraftLibrary Alternative for minecraftLibrary Oct 30, 2023
@Technici4n
Copy link
Member

Does implementation not work?

@henkelmax
Copy link
Author

henkelmax commented Oct 30, 2023

Does implementation not work?

No, it complains about all classes from the libraries missing when trying to run the game.


EDIT:

Same for gradle sub projects like shown here

https://github.com/neoforged/MDK/blob/ab3c7e49df21e46f5d316added8e1c5afc334ee0/build.gradle#L100

I only get subprojects to get included on the runtime when doing

tasks.withType(JavaCompile).configureEach {
    source(project(':otherproject').sourceSets.main.allSource)
    ...

This does not seem to work

runs {
    client {
        modSource project(':otherproject').sourceSets.main
        ...

@SquidDev
Copy link
Contributor

implementation doesn't work because the classes only end up on the classpath, but they actually need to end up on the Minecraft classpath (defined by the legacyClassPath.file system property) (thanks bootstrap launcher)

Historically this could be done by overwriting the minecraft_classpath token (which is what minecraftLibrary did under the hood, which was then used to generate the classpath file.

However, minecraft_classpath is entirely gone now. Generation of the classpath file is done by UserDevRuntimeDefinition, which doesn't appear to be accessible from build scripts (and uses a temporary configuration, so definitely isn't suitable here anyway).

@sciwhiz12 sciwhiz12 added the bug Something isn't working label Oct 31, 2023
@HeatherComputer
Copy link

This hurts my ability to do stuff too, I'd love to see a fix asap really, as I'm not sure I can properly port - I mean, I'd love for my IDE to be able to test, even though this doesn't affect runtime for me.

@Technici4n
Copy link
Member

This should be addressed by #52.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants