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 [2023/01/13 21:42] – [File format] clarified the 'named' part, I did not understand it at all when I first read it lightningtow | tutorial:accesswideners [2023/08/13 10:39] – info about V2 format tooster | ||
---|---|---|---|
Line 17: | Line 17: | ||
A specific file format is used to define the access changes included in your mod. To aid IDE's you should use the '' | A specific file format is used to define the access changes included in your mod. To aid IDE's you should use the '' | ||
- | The file must start with the following header. '' | + | The file must start with the following header. '' |
<code [enable_line_numbers=" | <code [enable_line_numbers=" | ||
- | accessWidener v1 < | + | accessWidener |
</ | </ | ||
Line 100: | Line 100: | ||
* Fields have final removed | * Fields have final removed | ||
+ | |||
+ | If you want to make a private final field both accessible //and// mutable, you need to use two directives, one for each change. | ||
===== Specifying file location ===== | ===== Specifying file location ===== | ||
- | The access widener file location must be specified in your build.gradle and in your fabric.mod.json file. It should be stored in the resources as it needs to be included in the exported jar file. | + | The access widener file location must be specified in your build.gradle and in your fabric.mod.json file. It should be stored in the resources as it needs to be included in the exported jar file. (Replace " |
Loom 0.9 or higher: | Loom 0.9 or higher: | ||
Line 134: | Line 136: | ||
By default, accesswidener entries that don't exist are ignored. | By default, accesswidener entries that don't exist are ignored. | ||
On recent versions of Loom, you can run '' | On recent versions of Loom, you can run '' | ||
+ | |||
+ | The error messages can be a little cryptic. For example, if you make a mistake in specifying a field, the error doesn' | ||
+ | |||
+ | ===== V2 changes ===== | ||
+ | |||
+ | With the v2 version, the '' | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | They differ from their regular, non-prefixed variants in that they also apply to mods that depend on this one. | ||
+ | |||
+ | |||
+ |
tutorial/accesswideners.txt · Last modified: 2024/06/09 05:33 by haykam