Code Monkey home page Code Monkey logo

compatre's People

Contributors

johnnyjayjay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

compatre's Issues

Use the URLs of the PluginClassLoader instead of just the plugin jar

NmsClassLoader currently just iterates over the contents of the plugin jar and only adjusts the classes contained there. This means that other JARs or classes in the classpath of the PluginClassLoader are ignored.

It should be considered to iterate over the URLs of the PluginClassLoader and preload all appropriate classes.

I still have to look into the consequences of this in terms of duplicate class loading.

Add support for obfuscation mappings

In addition to replacing the versions in nms and craftbukkit class names, this library could also take advantage of obfuscation maps and map the names of obfuscated classes, fields and methods to the correct names at runtime.

The first obstacle here is how to integrate the obfuscation maps. For versions following 1.14.4, they can be fetched via an HTTP request:

  1. Fetch version manifest
  2. Find the correct version
  3. Fetch version url (example)
  4. Fetch and parse server_mappings -> url (example)

Doing it like this (dynamically) instead of having a fixed set of mappings files as resources has the advantage that new releases need not be added manually and that the file size is smaller. On the other hand, this also adds some overhead because some http requests need to be made and some JSON files need to be parsed.

How the mappings can be parsed is still not entirely clear to me, but I have heard that Proguard, the obfuscator used by Mojang, has a tool/library for this. I will need to look into that further.

Getting these obfuscation maps is fairly trivial. The more complex part is how to achieve something similar for versions older than 1.14.4. For those versions, no official mappings are available, but with tools like MCP you can obtain unofficial and possibly incomplete community-made mappings. Or so I've heard. I will also need to investigate this and. if it's possible, whether the format matches the one of the official mappings.

Since those mappings are probably not available on the surface web, I will probably need to put them as resources into the jar (provided that this is legal, which it may not).

As for the actual remapping when all the necessary components are available, this will need a lot more ASM than before.

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.