Skip to content

v2.3

Compare
Choose a tag to compare
@quat1024 quat1024 released this 29 Apr 03:51

Available as agency.highlysuspect:voldeloom:2.3 on the repo.sleeping.town Maven server.

See CHANGELOG.md for more details.

Full diff: v2.2...v2.3

Breaking changes

Some volde.layered method names are different, sorry:

  • baseZip becomes importBaseZip
  • unmapClass becomes removeClass (single String argument) / removeClasses (Collection<String> argument)

Changes

  • Rewrote basically all of the mappings guts
    • I researched how MCP actually works, instead of simply throwing tiny-remapper at everything
    • tiny-remapper is used where MCP uses RetroGuard/SpecialSource, and an in-house NaiveRenamer is used where MCP uses "regular expressions over the source code"
      • The main difference is that NaiveRenamer also operates over Java bytecode as well as source code, but uses the same "just find-and-replace" algorithm that ignores things like method descriptors.
      • deobf: tiny-remapper is used for the initial deobfuscation to SRG names, NaiveRenamer takes it the rest of the way to named
      • reobf: the SRG is extended to cover MCP names instead of just SRGs (mirroring a find-replace step in MCP), inverted, and tiny-remapper is used
    • Side effect: maybe improves --refresh-dependencies performance a bit, NaiveRenamer is very fast (because it doesn't do much)
    • Deleted lots of tiny-remapper stuff that fell unused due to this change
  • Reobf-to-srg also works in the new mapping system
    • release 1.5/1.6/1.7 mods again! maybe! (test them!!!)
  • tiny-remapper output is postprocessed to remove things not compatible with ASM api level 4, like the parameter-name table
  • .srg parser can also handle the more compact MCPBot .csrg format too
  • Fixed cache soundness issues
    • Most files in your Gradle cache will now end in an 8-character hash of some metadata about their provenance. For example, version_manifest_{HASH}.json's filename now carries the URL that the manifest was downloaded from (if using the customManifestUrl feature).
    • The metadata trickles into files derived from it, so minecraft-1.4.7-client-{HASH}.jar's filename includes the same information, and so does the binpatched client, and the merged jar...
    • This fixes longstanding cache-coherency bugs, where changing the configuration of a file at the top of the tree would leave stale cache entries downstream from it, requiring a --refresh-dependencies to fix.
    • This also removes the need to store files in the per-project Gradle cache. Even if you use customized mappings in your project, it will not clash with other files in the cache.
    • I should probably expose the actual, not-hashed metadata somewhere
  • Linemapping now works, fixing stacktrace line numbers and debugger breakpoints
    • didn't understand what it was before 😅
    • After running genSources, might need to refresh your gradle to get your IDE to use the linemapped jar.
  • fixed 1.7.10 asset loading
  • Small performance/memory improvements
    • Forge binpatches only parsed when it's necessary to binpatch a jar
    • Reduced the amount of Files.readAllBytes calls, instead reading the files in chunks
    • Data structure used for packages.csv parsing is more memory-efficient
    • Mapping-related files are extracted from the mappings archive in a single pass
  • New interfaces for volde.layered:
    • importBaseZip imports (c)srgs, packages.csv, fields/methods csvs
    • importClasses imports (c)srgs/packages only (from a zip)
    • importFieldsMethods imports fields/methods csvs only (from a zip)
    • removeClasses deletes class mappings
    • importMCPBot is a convenience to import mappings from an MCPBot mirror service
      • try importMCPBot("https://mcpbot.unascribed.com/", minecraftVersion, "stable", "12-1.7.10")!
    • if that's not enough, modify lets you directly interface with the mcp mappings builder
      • I'm not really sure what people need/want out of layered mappings so if there's something i'm missing, let me know