tutorial:accesswidening
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorial:accesswidening [2025/12/05 16:37] – cassiancc | tutorial:accesswidening [2026/01/09 15:07] (current) – Make accessor mentions link to accessor mixins page gauntrecluse | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Access widening provides a way to loosen the access limits of classes, methods or fields. This includes making them public, or making them extendable (subclassable). | Access widening provides a way to loosen the access limits of classes, methods or fields. This includes making them public, or making them extendable (subclassable). | ||
| - | Access widening may be used instead of accessor mixins, and there are currently 2 cases where the functionality provided by mixin is not sufficient: | + | Access widening may be used instead of [[tutorial: |
| * Needing to access a (package) private class, especially for the purpose of shadowing or accessing a field or method in a mixin. | * Needing to access a (package) private class, especially for the purpose of shadowing or accessing a field or method in a mixin. | ||
| * Being able to override final methods or subclass final classes. | * Being able to override final methods or subclass final classes. | ||
| Line 12: | Line 12: | ||
| As with other types of class tweaking, in order for access widening changes to show up in the decompiled source, run the '' | As with other types of class tweaking, in order for access widening changes to show up in the decompiled source, run the '' | ||
| - | Note: Unlike accessor mixins, class tweaking only works on Minecraft code, and not on other mods. | + | Note: Unlike |
| ===== File format ===== | ===== File format ===== | ||
tutorial/accesswidening.1764952655.txt.gz · Last modified: 2025/12/05 16:37 by cassiancc