Nests: Difference between revisions
Space Walker (talk | contribs) (create Nests page) |
Space Walker (talk | contribs) (remove chapter about inner class attributes (and move them to the Nester page)) |
||
Line 1: | Line 1: | ||
Nests are Ornithe's inner class patches. They are used to modify inner class attributes in Java class files. | Nests are Ornithe's inner class patches. They are used to modify inner class attributes in Java class files. | ||
See [[Nester]] for information on how these patches are applied | See [[Nester]] for information on inner class attributes and how these patches are applied. | ||
=== Relevance === | === Relevance === |
Latest revision as of 12:52, 12 August 2025
Nests are Ornithe's inner class patches. They are used to modify inner class attributes in Java class files.
See Nester for information on inner class attributes and how these patches are applied.
Relevance
Most Minecraft versions before 1.8.2 Pre-release 5 had the inner class attributes stripped from the jar. Nests were created in an effort to reconstruct what the original inner classes would have been in the source code.
File Specification
.nest
files are UTF-8
encoded text files. Each line defines the relationship between a class and its outer class and, if applicable, outer method. A line has the following format.
<class name> <outer class name> <outer method name> <outer method descriptor> <inner name> <access>
class name
: the internal name of the classouter class name
: the internal name of the outer class.outer method name
: the name of the outer method (may be empty).outer method descriptor
: the descriptor describing the type of the outer method (may be empty).inner name
: the inner name of the class (may be empty).access
: the access flags for the inner class.
Notes
The inner name
component does not directly correspond to the inner name as defined in the inner class attribute. Rather, it is used to construct a new internal name of the class. The actual inner name is parsed from this component.
For regular inner classes, the inner name
component corresponds directly to the inner name as defined in the inner class attribute. If the component is all digits, the inner class is assumed to be anonymous, and the actual inner name null
. If the component starts with digits and transitions to text, the inner class is assumed to be local, and the inner name the text part of the component.
For example:
Example
- the class is assumed to be a regular inner class, with inner nameExample
.1
- the class is assumed to be an anonymous class, with inner namenull
.1Example
- the class is assumed to be a local class, with inner nameExample
.