Sparrow: Difference between revisions
Space Walker (talk | contribs) (create Sparrow page) |
Space Walker (talk | contribs) (add note on 'remove' mode) |
||
Line 17: | Line 17: | ||
* <code>class name</code>: the internal name of the class. | * <code>class name</code>: the internal name of the class. | ||
* <code>class signature</code>: the generic type signature of the class (optional). | * <code>class type signature</code>: the generic type signature of the class (optional). | ||
* <code>member name</code>: the name of the field or method. | * <code>member name</code>: the name of the field or method. | ||
* <code>member type descriptor</code>: the type descriptor of the field or method. | * <code>member type descriptor</code>: the type descriptor of the field or method. | ||
Line 25: | Line 25: | ||
The file format does not support generic type signatures for local variables. | The file format does not support generic type signatures for local variables. | ||
The <code>class type signature</code> and <code>member type signature</code> values can be set to <code>.</code> to signal that the generic type signature should be removed from that class or class member respectively. | |||
[[category:Mod Development]] | [[category:Mod Development]] |
Latest revision as of 09:09, 13 August 2025
Sparrow is Ornithe's generics patch. It is used to modify generic type signatures in Java class files.
See Signature Changer for information on generic type signatures and how these patches are applied.
Relevance
Most Minecraft versions before 1.8.2 Pre-release 5 had the generic type signatures stripped from the jar. Sparrow was created in an effort to reconstruct what the original generics would have been in the source code.
File Specification
The .sigs
file format was originally created by Gaming32. .sigs
files are UTF-8
encoded text files. A line has the following format.
<class name> [<class signature>] <member name> <member type descriptor> <member signature> ... ...
class name
: the internal name of the class.class type signature
: the generic type signature of the class (optional).member name
: the name of the field or method.member type descriptor
: the type descriptor of the field or method.member signature
: the generic type signature of the field or method.
Notes
The file format does not support generic type signatures for local variables.
The class type signature
and member type signature
values can be set to .
to signal that the generic type signature should be removed from that class or class member respectively.