tutorial:mixin_accessors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:mixin_accessors [2022/04/29 09:54] – [Mixin Accessors] solidblock | tutorial:mixin_accessors [2025/08/07 07:48] (current) – Add note about mutable to static accessors too, and note about javac inlining fields. earthcomputer | ||
---|---|---|---|
Line 34: | Line 34: | ||
((MinecraftClientAccessor) MinecraftClient.getInstance()).setItemUseCooldown(100); | ((MinecraftClientAccessor) MinecraftClient.getInstance()).setItemUseCooldown(100); | ||
</ | </ | ||
+ | |||
+ | When the field is final and you need to set it, use '' | ||
===== Accessor for static fields ===== | ===== Accessor for static fields ===== | ||
Line 71: | Line 73: | ||
VanillaLayeredBiomeSourceAccessor.setBiomes(biomes); | VanillaLayeredBiomeSourceAccessor.setBiomes(biomes); | ||
</ | </ | ||
+ | |||
+ | When the field is final and you need to set it, use '' | ||
===== Invoker ===== | ===== Invoker ===== |
tutorial/mixin_accessors.1651226043.txt.gz · Last modified: 2022/04/29 09:54 by solidblock