From 9fb9461398471e25d5d031f0887a47cf346ad683 Mon Sep 17 00:00:00 2001 From: mschae23 Date: Mon, 15 Mar 2021 15:49:32 +0100 Subject: [PATCH] Mapped world gen noise interpolator (#2138) * Mapped world gen noise interpolator * Noise3DInterpolator -> NoiseInterpolator * Use SuperCoder79's suggestions Co-authored-by: SuperCoder7979 <25208576+SuperCoder7979@users.noreply.github.com> Co-authored-by: SuperCoder7979 <25208576+SuperCoder7979@users.noreply.github.com> --- .../minecraft/util/math/MathHelper.mapping | 24 ++++---- .../util/math/NoiseInterpolator.mapping | 57 +++++++++++++++++++ .../gen/chunk/NoiseChunkGenerator.mapping | 6 ++ 3 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 mappings/net/minecraft/util/math/NoiseInterpolator.mapping diff --git a/mappings/net/minecraft/util/math/MathHelper.mapping b/mappings/net/minecraft/util/math/MathHelper.mapping index fcf2111d45..7121b91d69 100644 --- a/mappings/net/minecraft/util/math/MathHelper.mapping +++ b/mappings/net/minecraft/util/math/MathHelper.mapping @@ -155,13 +155,13 @@ CLASS net/minecraft/class_3532 net/minecraft/util/math/MathHelper COMMENT The x-coordinate on the unit square ARG 2 deltaY COMMENT The y-coordinate on the unit square - ARG 4 val00 + ARG 4 x0y0 COMMENT The output if {@code deltaX} is 0 and {@code deltaY} is 0 - ARG 6 val10 + ARG 6 x1y0 COMMENT The output if {@code deltaX} is 1 and {@code deltaY} is 0 - ARG 8 val01 + ARG 8 x0y1 COMMENT The output if {@code deltaX} is 0 and {@code deltaY} is 1 - ARG 10 val11 + ARG 10 x1y1 COMMENT The output if {@code deltaX} is 1 and {@code deltaY} is 1 METHOD method_16438 lerp3 (DDDDDDDDDDD)D COMMENT A three-dimensional lerp between values on the 8 corners of the unit cube. Arbitrary values are specified for the corners and the output is interpolated between them. @@ -171,21 +171,21 @@ CLASS net/minecraft/class_3532 net/minecraft/util/math/MathHelper COMMENT The y-coordinate on the unit cube ARG 4 deltaZ COMMENT The z-coordinate on the unit cube - ARG 6 val000 + ARG 6 x0y0z0 COMMENT The output if {@code deltaX} is 0, {@code deltaY} is 0 and {@code deltaZ} is 0 - ARG 8 val100 + ARG 8 x1y0z0 COMMENT The output if {@code deltaX} is 1, {@code deltaY} is 0 and {@code deltaZ} is 0 - ARG 10 val010 + ARG 10 x0y1z0 COMMENT The output if {@code deltaX} is 0, {@code deltaY} is 1 and {@code deltaZ} is 0 - ARG 12 val110 + ARG 12 x1y1z0 COMMENT The output if {@code deltaX} is 1, {@code deltaY} is 1 and {@code deltaZ} is 0 - ARG 14 val001 + ARG 14 x0y0z1 COMMENT The output if {@code deltaX} is 0, {@code deltaY} is 0 and {@code deltaZ} is 1 - ARG 16 val101 + ARG 16 x1y0z1 COMMENT The output if {@code deltaX} is 1, {@code deltaY} is 0 and {@code deltaZ} is 1 - ARG 18 val011 + ARG 18 x0y1z1 COMMENT The output if {@code deltaX} is 0, {@code deltaY} is 1 and {@code deltaZ} is 1 - ARG 20 val111 + ARG 20 x1y1z1 COMMENT The output if {@code deltaX} is 1, {@code deltaY} is 1 and {@code deltaZ} is 1 METHOD method_16439 lerp (FFF)F ARG 0 delta diff --git a/mappings/net/minecraft/util/math/NoiseInterpolator.mapping b/mappings/net/minecraft/util/math/NoiseInterpolator.mapping new file mode 100644 index 0000000000..1d8e6c81ca --- /dev/null +++ b/mappings/net/minecraft/util/math/NoiseInterpolator.mapping @@ -0,0 +1,57 @@ +CLASS net/minecraft/class_5917 net/minecraft/util/math/NoiseInterpolator + FIELD field_29227 startNoiseBuffer [[D + FIELD field_29228 endNoiseBuffer [[D + FIELD field_29229 sizeY I + FIELD field_29230 sizeZ I + FIELD field_29231 minY I + FIELD field_29232 columnSampler Lnet/minecraft/class_5917$class_5918; + FIELD field_29233 x0y0z0 D + FIELD field_29234 x0y0z1 D + FIELD field_29235 x1y0z0 D + FIELD field_29236 x1y0z1 D + FIELD field_29237 x0y1z0 D + FIELD field_29238 x0y1z1 D + FIELD field_29239 x1y1z0 D + FIELD field_29240 x1y1z1 D + FIELD field_29241 x0z0 D + FIELD field_29242 x1z0 D + FIELD field_29243 x0z1 D + FIELD field_29244 x1z1 D + FIELD field_29245 z0 D + FIELD field_29246 z1 D + FIELD field_29247 startX I + FIELD field_29248 startZ I + METHOD (IIIIIILnet/minecraft/class_5917$class_5918;)V + ARG 1 sizeX + ARG 2 sizeY + ARG 3 sizeZ + ARG 4 chunkX + ARG 5 chunkZ + ARG 6 minY + ARG 7 columnSampler + METHOD method_34286 sampleStartNoise ()V + METHOD method_34287 sampleNoiseY (D)V + ARG 1 deltaY + METHOD method_34288 sampleEndNoise (I)V + ARG 1 x + METHOD method_34289 sampleNoiseCorners (II)V + ARG 1 noiseY + ARG 2 noiseZ + METHOD method_34290 sampleNoise ([[DI)V + ARG 1 buffer + ARG 2 noiseX + METHOD method_34291 swapBuffers ()V + METHOD method_34292 sampleNoiseX (D)V + ARG 1 deltaX + METHOD method_34293 createBuffer (II)[[D + ARG 0 sizeY + ARG 1 sizeZ + METHOD method_34294 sampleNoise (D)D + ARG 1 deltaZ + CLASS class_5918 ColumnSampler + METHOD fillNoiseColumn ([DIIII)V + ARG 1 buffer + ARG 2 x + ARG 3 z + ARG 4 minY + ARG 5 noiseSizeY diff --git a/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping b/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping index 408ab696cd..db24249648 100644 --- a/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping +++ b/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping @@ -58,3 +58,9 @@ CLASS net/minecraft/class_3754 net/minecraft/world/gen/chunk/NoiseChunkGenerator ARG 2 chunk ARG 3 minY ARG 4 noiseSizeY + METHOD method_34284 sampleNoiseColumn ([DIIII)V + ARG 1 buffer + ARG 2 x + ARG 3 z + ARG 4 minY + ARG 5 noiseSizeY