Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked fromReplayMod/remap

Source-level class, field and method name remapping for use by ReplayMod/preprocessor, supports Java+Kotlin, also remaps some Mixin annotiations

License

NotificationsYou must be signed in to change notification settings

Skytils/remap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To support multiple Minecraft versions with the ReplayMod, a preprocessor is used which transforms source code to compile against different Minecraft versions.

To keep preprocessor statements to a minimum and support changes in mapping (of originally obfuscated Minecraft names), the preprocessor additionally supportssource remapping of class, method and field names implemented in the application through use of an embedded IntelliJ IDEA (Java and Kotlin sources are supported).

Additionally, it supports defining simple "search and replace"-like patterns (but smarter in that they are type-aware) annotated by a@Pattern (configurable) annotation in one or more central places which then are applied all over the code base.This allows code which would previously have to be written with preprocessor statements or asMCVer.getWindow(mc) all over the code base to instead now use the much more intuitivemc.getWindow() and be automatically converted tomc.window (or even a Window stub object) on remap if a pattern for that exists anywhere in the same source tree:

@PatternprivatestaticWindowgetWindow(MinecraftClientmc) {//#if MC>=11500returnmc.getWindow();//#elseif MC>=11400//$$ return mc.window;//#else//$$ return new com.replaymod.core.versions.Window(mc);//#endif    }

All pattern cases should be a single line as to not mess with indentation and/or line count.Any arguments passed to the pattern must be used in the pattern in the same order in every case (introducing in-line locals to work around that is fine).Defining and/or applying patterns in/on Kotlin code is not yet supported.

This is not integrated into the preprocessor itself for essentially two (now historical) reasons:

  • License incompatibility between the GPL used in the ReplayMod (and the preprocessor) and the EPL used by the JDT
  • Lombok requires a javaagent to work for the JDT, so we need to fork off into a separate JVM anyway

License

The Remap is provided under the terms of the GNU General Public License Version 3 or (at your option) any later version.SeeLICENSE.md for the full license text.

About

Source-level class, field and method name remapping for use by ReplayMod/preprocessor, supports Java+Kotlin, also remaps some Mixin annotiations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin97.2%
  • Java2.8%

[8]ページ先頭

©2009-2025 Movatter.jp