/weft

Unpick definitions for Minecraft, free for all to use

Primary LanguageJavaCreative Commons Zero v1.0 UniversalCC0-1.0

Weft

WeaveMC only existed for interim management of the project until Fabric was in a suitable state to integrate it directly into the toolchain. FabricMC/yarn now provides Unpick definitions. This project now exists only for historical reasons.

Weft is an open source project project that aims to provide a set of Unpick definitions that covers every inlined constant in the Minecraft: Java Edition codebase. The intent is to make it easier for modders to understand the decompiled code, making mod creation a little bit easier.

Usage

Weft

The only way to apply sets of Unpick definitions (e.g Weft) right now is Warp, an addon for Fabric's Gradle plugin, Loom. No equivalent for ForgeGradle is currently available.

Weft Constant Library

Minecraft constants, such as the setBlockState() flags, have their backing fields in the Weft Constant Library, as the compiler has optimised the fields out of the Minecraft binary. Warp fetches the WCL automatically for its own use when decompiling, but it does not put the WCL on the classpath.
To put the WCL on the classpath so you can use its constants in code you write, add the following to your Gradle dependencies.
compileOnly 'io.github.weavemc:weft:<weft version here>:constants'
Note that this only creates a compile time dependency, due to inlining, the WCL will not be required at runtime.

Contributing

See here

Discord

If you need support with warp or weft, you can find it here.