Giter Club home page Giter Club logo

Comments (3)

Pokechu22 avatar Pokechu22 commented on May 23, 2024

So, this got more confusing. It is not related to liteloader. I stripped out basically all of the liteloader code, and tried with vanillagradle (both client and server). I also tried with forge, same issue. Here's the same project, set up with vanillagradle (server): lwts-test-2.zip.

Some debugging has gotten me down to this line of launchwrapper.

final Class<?> clazz = Class.forName(launchTarget, false, classLoader);

For some reason, that is inexplicable to me, on sponge this actually does use the classLoader instance passed in while for me it is using the default class loader (verified using the debugger). I have no clue why. And it's not that the class has already been loaded or something; I tried with -verbose:class and the class is only loaded when that line is hit.

It seems to be that that line is behaving differently on sponge for no discernable reason...

from launchwrappertestsuite.

stephan-gh avatar stephan-gh commented on May 23, 2024

This is the problem: https://github.com/Mojang/LegacyLauncher/blob/master/src/main/java/net/minecraft/launchwrapper/Launch.java#L97

Launchwrapper automatically adds a classloader exclusion for the package your tweaker is in. You need to put it into a separate package so SomeTest and TestMain are not excluded from Launchwrapper.

This is also what's different for Sponge: We have the tweaker in a separate launch package: https://github.com/SpongePowered/SpongeCommon/tree/bleeding/src/test/java/org/spongepowered/common/launch :)

from launchwrappertestsuite.

Pokechu22 avatar Pokechu22 commented on May 23, 2024

Ah, makes sense. Confirmed that that fixes my test program, and it should also fix my actual larger program. Thanks!

from launchwrappertestsuite.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.