From d440a7188c90480fe84ff41bf2e04df9e675f8b6 Mon Sep 17 00:00:00 2001 From: liach <7806504+liach@users.noreply.github.com> Date: Fri, 2 Apr 2021 16:26:16 +0700 Subject: [PATCH] Two annotations. They write cursed annotations (#2241) * Two annotations. They write cursed annotations Signed-off-by: liach * stuff * Update mappings/net/minecraft/obfuscate/DontObfuscate.mapping Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: liach Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> --- .../minecraft/obfuscate/DontObfuscate.mapping | 23 +++++++++++++++++++ .../minecraft/util/annotation/Debug.mapping | 15 ++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 mappings/net/minecraft/obfuscate/DontObfuscate.mapping create mode 100644 mappings/net/minecraft/util/annotation/Debug.mapping diff --git a/mappings/net/minecraft/obfuscate/DontObfuscate.mapping b/mappings/net/minecraft/obfuscate/DontObfuscate.mapping new file mode 100644 index 0000000000..b765f50f25 --- /dev/null +++ b/mappings/net/minecraft/obfuscate/DontObfuscate.mapping @@ -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

Its behavior appears as follows: + COMMENT

+ COMMENT + COMMENT

Visit the use page for the usage of this annotation. + COMMENT + COMMENT

In addition, single-abstract-method interfaces used as lambda expressions + COMMENT always have their single abstract method unobfuscated per proguard behavior. + COMMENT + COMMENT

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 diff --git a/mappings/net/minecraft/util/annotation/Debug.mapping b/mappings/net/minecraft/util/annotation/Debug.mapping new file mode 100644 index 0000000000..02c243bebc --- /dev/null +++ b/mappings/net/minecraft/util/annotation/Debug.mapping @@ -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

Most methods annotated are getters that don't cause side-effects. Some of + COMMENT those methods also may execute dry-runs. + COMMENT + COMMENT

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

This annotation has class retention and can be applied to a wide range of + COMMENT targets. + COMMENT + COMMENT

This annotation is not {@link java.lang.annotation.Documented}, and hence + COMMENT will not appear in the generated javadoc for annotated elements.