tutorial:reflection
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorial:reflection [2021/11/18 00:59] – created liach | tutorial:reflection [2021/11/18 22:49] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 34: | Line 34: | ||
===== Records ===== | ===== Records ===== | ||
Since 1.18, vanilla Minecraft starts using [[https:// | Since 1.18, vanilla Minecraft starts using [[https:// | ||
- | Minecraft is processed by Proguard, which removes the record information from the Minecraft classes, these record classes will have such behaviors at runtime: | + | Minecraft is processed by Proguard, which removes the record information from the Minecraft classes, these record classes will have such behaviors at runtime, despite being decompiled as records in source: |
<code java> | <code java> | ||
recordClass.isRecord() == false | recordClass.isRecord() == false | ||
Line 42: | Line 42: | ||
See the JDK 17 API docs for [[https:// | See the JDK 17 API docs for [[https:// | ||
+ | |||
+ | In addition, proguard also removes the signature (which indicates the generic information) from the record classes (but not from their methods). Yarn mappings defines signatures mappings for these classes. This affects reflection results on calls to some reflection methods, such as [[https:// |
tutorial/reflection.1637197153.txt.gz · Last modified: 2021/11/18 00:59 by liach