tutorial:accesswideners
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:accesswideners [2020/04/27 06:51] – fix typo upcraftlp | tutorial:accesswideners [2020/06/12 01:01] – inner classes need $ not / lvanderzande | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Access Wideners ====== | ====== Access Wideners ====== | ||
- | Access wideners provide a way to loosen the access limits of classes, methods or fields. Access wideners similar to the commonly known Access Transformers. | + | Access wideners provide a way to loosen the access limits of classes, methods or fields. Access wideners |
- | Access wideners should only be used where mixin does not currenly | + | Access wideners should only be used where mixin does not currently |
===== Requirements ===== | ===== Requirements ===== | ||
Line 11: | Line 11: | ||
===== File format ===== | ===== File format ===== | ||
- | A specific file format is used to define the access changes included in your mod. To aid IDE' | + | A specific file format is used to define the access changes included in your mod. To aid IDE's you should use the `.accesswidener` file extension. |
The file must start with the following header, `namespace` should match the mappings namespace of your mod's source code, this is usually `named` loom will remap the access widener file for you into `intermediary` along with your mod. | The file must start with the following header, `namespace` should match the mappings namespace of your mod's source code, this is usually `named` loom will remap the access widener file for you into `intermediary` along with your mod. | ||
Line 25: | Line 25: | ||
</ | </ | ||
- | Any whitespace can be used to sperate | + | Any whitespace can be used to separate |
Class names are separated with a / and not . | Class names are separated with a / and not . | ||
+ | |||
+ | For inner classes, you should use '' | ||
== Classes == | == Classes == | ||
Class access can be changed by specifying the access and the class name as named the mappings namespace defined in the header. | Class access can be changed by specifying the access and the class name as named the mappings namespace defined in the header. | ||
+ | |||
<code [enable_line_numbers=" | <code [enable_line_numbers=" | ||
Line 41: | Line 44: | ||
== Methods == | == Methods == | ||
- | Method access can be changed by specifying the access, class name, method name and method | + | Method access can be changed by specifying the access, class name, method name and method |
<code [enable_line_numbers=" | <code [enable_line_numbers=" | ||
Line 54: | Line 57: | ||
== Fields == | == Fields == | ||
- | Field access can be changed by specifying the access, class name, field name and field descriptior | + | Field access can be changed by specifying the access, class name, field name and field descriptor |
<code [enable_line_numbers=" | <code [enable_line_numbers=" | ||
Line 63: | Line 66: | ||
- className is the owner class | - className is the owner class | ||
- fieldName is the field name | - fieldName is the field name | ||
- | - fieldDesc is the field descriptior | + | - fieldDesc is the field descriptor |
===== Access Changes ===== | ===== Access Changes ===== |
tutorial/accesswideners.txt · Last modified: 2024/04/29 21:00 by ayutac