Skip to content

Commit

Permalink
Two annotations. They write cursed annotations (FabricMC#2241)
Browse files Browse the repository at this point in the history
* Two annotations. They write cursed annotations

Signed-off-by: liach <[email protected]>

* stuff

* Update mappings/net/minecraft/obfuscate/DontObfuscate.mapping

Co-authored-by: enbrain <[email protected]>

Co-authored-by: liach <[email protected]>
Co-authored-by: enbrain <[email protected]>
  • Loading branch information
3 people authored Apr 2, 2021
1 parent 64eeb33 commit d440a71
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mappings/net/minecraft/obfuscate/DontObfuscate.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CLASS net/minecraft/obfuscate/DontObfuscate
COMMENT This annotation applies to some unobfuscated elements within the Minecraft
COMMENT source code.
COMMENT
COMMENT <p>Its behavior appears as follows:
COMMENT <ul>
COMMENT <li>The annotation itself is not obfuscated.</li>
COMMENT <li>If a class is annotated, it is not obfuscated. It's not yet clear if its
COMMENT members will always become deobfuscated as well.</li>
COMMENT <li>If a member is annotated, it and its containing class is not obfuscated,
COMMENT but other members in the same class may stay obfuscated.</li>
COMMENT </ul>
COMMENT
COMMENT <p>Visit the use page for the usage of this annotation.
COMMENT
COMMENT <p>In addition, single-abstract-method interfaces used as lambda expressions
COMMENT always have their single abstract method unobfuscated per proguard behavior.
COMMENT
COMMENT <p>This annotation is not {@link java.lang.annotation.Documented}, and hence
COMMENT will not appear in the generated javadoc for annotated elements.
COMMENT
COMMENT @see net.minecraft.util.CubicSampler.RgbFetcher
COMMENT @see net.minecraft.world.level.ColorResolver#getColor
15 changes: 15 additions & 0 deletions mappings/net/minecraft/util/annotation/Debug.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CLASS net/minecraft/class_5996 net/minecraft/util/annotation/Debug
COMMENT An annotation, mostly on side-effect-free methods.
COMMENT
COMMENT <p>Most methods annotated are getters that don't cause side-effects. Some of
COMMENT those methods also may execute dry-runs.
COMMENT
COMMENT <p>However, it is present on {@link
COMMENT net.minecraft.entity.passive.BeeEntity.MoveToHiveGoal}, and its purpose in that
COMMENT case is not yet clear.
COMMENT
COMMENT <p>This annotation has class retention and can be applied to a wide range of
COMMENT targets.
COMMENT
COMMENT <p>This annotation is not {@link java.lang.annotation.Documented}, and hence
COMMENT will not appear in the generated javadoc for annotated elements.

0 comments on commit d440a71

Please sign in to comment.