You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding or modifying the Access Transformer, the gradle project must be refreshed for the transformations to take effect.
30
+
```toml
31
+
# In mods.toml:
32
+
[[accessTransformers]]
33
+
file="META-INF/accesstransformer.at"
34
+
```
35
+
36
+
AT files can be anywhere specified by the lines above, though NeoForge will default to searching for `META-INF/accesstransformer.cfg` if no other file is specified.
37
+
38
+
Additionally, multiple AT files can be specified and will be applied in order. This can be useful for larger mods with multiple packages.
After adding or modifying any Access Transformer, the Gradle project must be refreshed for the transformations to take effect.
60
+
</TabItem>
61
+
62
+
<TabItemvalue="1.20.1"label="1.20.1-47.1 and older">
21
63
22
-
During development, the AT file can be anywhere specified by the line above. However, when loading in a non-development environment, Forge will only search for the exact path of `META-INF/accesstransformer.cfg` in your JAR file.
Copy file name to clipboardExpand all lines: neogradle/docs/configuration/index.mdx
+42-2Lines changed: 42 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
importTabsfrom'@theme/Tabs';
2
+
importTabItemfrom'@theme/TabItem';
3
+
1
4
ForgeGradle Configurations
2
5
==========================
3
6
@@ -6,7 +9,42 @@ ForgeGradle has numerous configurations that can change how the development envi
6
9
Enabling Access Transformers
7
10
----------------------------
8
11
9
-
[Access Transformers][at] can widen the visibility or modify the `final` flag of Minecraft classes, methods, and fields. To enable access transformers in the production environment, you can set `accessTransformer` to configuration file in question:
12
+
13
+
[Access Transformers][at] can widen the visibility or modify the `final` flag of Minecraft classes, methods, and fields.
14
+
15
+
<TabsdefaultValue="latest">
16
+
<TabItemvalue="latest"label="Latest">
17
+
To enable Access Transformers in the production environment, you can set `accessTransformers` to the configuration file in question:
18
+
19
+
```gradle
20
+
minecraft {
21
+
// ...
22
+
23
+
// Add an Access Transformer file relative to the project's directory
In production, NeoForge will search for Access Transformer files as specified in `mods.toml`, or at `META-INF/accesstransformer.cfg` if none are specified:
34
+
35
+
```toml
36
+
[[accessTransformers]]
37
+
file="META-INF/accesstransformer.at"
38
+
39
+
[[accessTransformers]]
40
+
file="accesstransformer_extras.at"
41
+
```
42
+
43
+
</TabItem>
44
+
45
+
46
+
<TabItemvalue="7.0.40"label="7.0.40 and older">
47
+
To enable Access Transformers in the production environment, you can set `accessTransformer` to the configuration file in question:
10
48
11
49
```gradle
12
50
minecraft {
@@ -18,8 +56,10 @@ minecraft {
18
56
```
19
57
20
58
:::caution
21
-
While the access transformer in the development environment can be read from anywhere the user specifies, in production, the file will only be read from `META-INF/accesstransformer.cfg`.
59
+
While the Access Transformer in the development environment can be read from anywhere the user specifies, in production, the file will only be read from `META-INF/accesstransformer.cfg`.
0 commit comments