From adf72aa42fc4cbced44aee4617fe02611f515df2 Mon Sep 17 00:00:00 2001 From: enbrain <69905075+enbrain@users.noreply.github.com> Date: Tue, 10 Aug 2021 18:47:54 +0900 Subject: [PATCH] Document whether inclusive or not (#2611) * Document whether inclusive or not * Use math interval notations --- mappings/net/minecraft/util/math/MathHelper.mapping | 12 ++++++++++++ .../intprovider/BiasedToBottomIntProvider.mapping | 2 ++ .../util/math/intprovider/UniformIntProvider.mapping | 2 ++ .../world/gen/decorator/Decoratable.mapping | 4 ++++ .../heightprovider/TrapezoidHeightProvider.mapping | 4 ++++ .../gen/heightprovider/UniformHeightProvider.mapping | 2 ++ 6 files changed, 26 insertions(+) diff --git a/mappings/net/minecraft/util/math/MathHelper.mapping b/mappings/net/minecraft/util/math/MathHelper.mapping index 5b835d00d3..48bd035340 100644 --- a/mappings/net/minecraft/util/math/MathHelper.mapping +++ b/mappings/net/minecraft/util/math/MathHelper.mapping @@ -166,9 +166,14 @@ CLASS net/minecraft/class_3532 net/minecraft/util/math/MathHelper ARG 0 degrees METHOD method_15394 randomUuid ()Ljava/util/UUID; METHOD method_15395 nextInt (Ljava/util/Random;II)I + COMMENT {@return a random, uniformly distributed integer value in {@code + COMMENT [min, max]} If the range is empty (i.e. {@code max < min}), it + COMMENT returns {@code min}. ARG 0 random ARG 1 min + COMMENT the minimum value, inclusive ARG 2 max + COMMENT the maximum value, inclusive METHOD method_16435 perlinFade (D)D ARG 0 value METHOD method_16436 lerp (DDD)D @@ -262,9 +267,16 @@ CLASS net/minecraft/class_3532 net/minecraft/util/math/MathHelper ARG 1 min ARG 2 max METHOD method_32751 nextBetween (Ljava/util/Random;II)I + COMMENT {@return a random, uniformly distributed integer value in {@code + COMMENT [min, max]} + COMMENT + COMMENT @throws IllegalArgumentException if the range is empty (i.e. {@code + COMMENT max < min}) ARG 0 random ARG 1 min + COMMENT the minimum value, inclusive ARG 2 max + COMMENT the maximum value, inclusive METHOD method_32854 clampedLerpFromProgress (DDDDD)D ARG 0 lerpValue ARG 2 lerpStart diff --git a/mappings/net/minecraft/util/math/intprovider/BiasedToBottomIntProvider.mapping b/mappings/net/minecraft/util/math/intprovider/BiasedToBottomIntProvider.mapping index 9ab52c6a9e..cbf141f669 100644 --- a/mappings/net/minecraft/util/math/intprovider/BiasedToBottomIntProvider.mapping +++ b/mappings/net/minecraft/util/math/intprovider/BiasedToBottomIntProvider.mapping @@ -7,6 +7,8 @@ CLASS net/minecraft/class_6333 net/minecraft/util/math/intprovider/BiasedToBotto ARG 2 max METHOD method_36249 create (II)Lnet/minecraft/class_6333; ARG 0 min + COMMENT the minimum value, inclusive ARG 1 max + COMMENT the maximum value, inclusive METHOD method_36251 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; ARG 0 instance diff --git a/mappings/net/minecraft/util/math/intprovider/UniformIntProvider.mapping b/mappings/net/minecraft/util/math/intprovider/UniformIntProvider.mapping index 5b2fe2143f..c4dfac8ffd 100644 --- a/mappings/net/minecraft/util/math/intprovider/UniformIntProvider.mapping +++ b/mappings/net/minecraft/util/math/intprovider/UniformIntProvider.mapping @@ -11,7 +11,9 @@ CLASS net/minecraft/class_6019 net/minecraft/util/math/intprovider/UniformIntPro ARG 0 instance METHOD method_35017 create (II)Lnet/minecraft/class_6019; ARG 0 min + COMMENT the minimum value, inclusive ARG 1 max + COMMENT the maximum value, inclusive METHOD method_35018 (Lnet/minecraft/class_6019;)Ljava/lang/Integer; ARG 0 provider METHOD method_35019 (Lnet/minecraft/class_6019;)Ljava/lang/Integer; diff --git a/mappings/net/minecraft/world/gen/decorator/Decoratable.mapping b/mappings/net/minecraft/world/gen/decorator/Decoratable.mapping index 76d14b2124..fd44f80ce5 100644 --- a/mappings/net/minecraft/world/gen/decorator/Decoratable.mapping +++ b/mappings/net/minecraft/world/gen/decorator/Decoratable.mapping @@ -28,7 +28,11 @@ CLASS net/minecraft/class_5432 net/minecraft/world/gen/decorator/Decoratable ARG 1 config METHOD method_36296 uniformRange (Lnet/minecraft/class_5843;Lnet/minecraft/class_5843;)Ljava/lang/Object; ARG 1 min + COMMENT the minimum offset, inclusive ARG 2 max + COMMENT the maximum offset, inclusive METHOD method_36297 triangleRange (Lnet/minecraft/class_5843;Lnet/minecraft/class_5843;)Ljava/lang/Object; ARG 1 min + COMMENT the minimum offset, inclusive ARG 2 max + COMMENT the maximum offset, inclusive diff --git a/mappings/net/minecraft/world/gen/heightprovider/TrapezoidHeightProvider.mapping b/mappings/net/minecraft/world/gen/heightprovider/TrapezoidHeightProvider.mapping index b1f8f1c52a..268447058b 100644 --- a/mappings/net/minecraft/world/gen/heightprovider/TrapezoidHeightProvider.mapping +++ b/mappings/net/minecraft/world/gen/heightprovider/TrapezoidHeightProvider.mapping @@ -12,8 +12,12 @@ CLASS net/minecraft/class_6342 net/minecraft/world/gen/heightprovider/TrapezoidH ARG 0 instance METHOD method_36307 create (Lnet/minecraft/class_5843;Lnet/minecraft/class_5843;)Lnet/minecraft/class_6342; ARG 0 minOffset + COMMENT the minimum offset, inclusive ARG 1 maxOffset + COMMENT the maximum offset, inclusive METHOD method_36308 create (Lnet/minecraft/class_5843;Lnet/minecraft/class_5843;I)Lnet/minecraft/class_6342; ARG 0 minOffset + COMMENT the minimum offset, inclusive ARG 1 maxOffset + COMMENT the maximum offset, inclusive ARG 2 plateau diff --git a/mappings/net/minecraft/world/gen/heightprovider/UniformHeightProvider.mapping b/mappings/net/minecraft/world/gen/heightprovider/UniformHeightProvider.mapping index a25bc18f2f..1e919cd33c 100644 --- a/mappings/net/minecraft/world/gen/heightprovider/UniformHeightProvider.mapping +++ b/mappings/net/minecraft/world/gen/heightprovider/UniformHeightProvider.mapping @@ -10,4 +10,6 @@ CLASS net/minecraft/class_6124 net/minecraft/world/gen/heightprovider/UniformHei ARG 0 instance METHOD method_35396 create (Lnet/minecraft/class_5843;Lnet/minecraft/class_5843;)Lnet/minecraft/class_6124; ARG 0 minOffset + COMMENT the minimum offset, inclusive ARG 1 maxOffset + COMMENT the maximum offset, inclusive