Skip to content

Commit 8e6601b

Browse files
committed
UD-260113
1 parent 0eb7b82 commit 8e6601b

13 files changed

Lines changed: 51 additions & 38 deletions

File tree

src/generated/resources/data/mia/worldgen/density_function/the_abyss/caves/noodle.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"argument": {
66
"type": "minecraft:range_choice",
77
"input": "minecraft:y",
8-
"max_exclusive": 552.0,
8+
"max_exclusive": 424.0,
99
"min_inclusive": -168.0,
1010
"when_in_range": 0.0,
1111
"when_out_of_range": -1.0
@@ -21,7 +21,7 @@
2121
"argument": {
2222
"type": "minecraft:range_choice",
2323
"input": "minecraft:y",
24-
"max_exclusive": 552.0,
24+
"max_exclusive": 424.0,
2525
"min_inclusive": -168.0,
2626
"when_in_range": {
2727
"type": "minecraft:add",
@@ -50,7 +50,7 @@
5050
"argument": {
5151
"type": "minecraft:range_choice",
5252
"input": "minecraft:y",
53-
"max_exclusive": 512.0,
53+
"max_exclusive": 384.0,
5454
"min_inclusive": -128.0,
5555
"when_in_range": {
5656
"type": "minecraft:noise",

src/generated/resources/data/mia/worldgen/density_function/the_abyss/hole_below.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "minecraft:add",
33
"argument1": {
44
"type": "mia:general_abyss_hole",
5-
"mul": 0.25,
5+
"mul": 0.3,
66
"radius": 0.0
77
},
88
"argument2": "mia:base_3d_noise_the_abyss"

src/generated/resources/data/mia/worldgen/density_function/the_abyss/inside_hole_above.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"argument1": {
44
"type": "minecraft:range_choice",
55
"input": "minecraft:y",
6-
"max_exclusive": 460.0,
6+
"max_exclusive": 320.0,
77
"min_inclusive": 5.0,
88
"when_in_range": "mia:the_abyss/hole_above",
99
"when_out_of_range": -1.0

src/generated/resources/data/mia/worldgen/density_function/the_abyss/middle_3d_noise.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"argument1": {
44
"type": "minecraft:range_choice",
55
"input": "minecraft:y",
6-
"max_exclusive": 460.0,
6+
"max_exclusive": 320.0,
77
"min_inclusive": -128.0,
88
"when_in_range": "mia:base_3d_noise_the_abyss",
99
"when_out_of_range": -1.0

src/generated/resources/data/mia/worldgen/noise_settings/the_abyss.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"disable_mob_generation": false,
1313
"legacy_random_source": false,
1414
"noise": {
15-
"height": 768,
15+
"height": 640,
1616
"min_y": -256,
1717
"size_horizontal": 2,
1818
"size_vertical": 1
@@ -56,9 +56,9 @@
5656
"argument1": {
5757
"type": "minecraft:y_clamped_gradient",
5858
"from_value": 1.0,
59-
"from_y": 460,
59+
"from_y": 320,
6060
"to_value": 1.0,
61-
"to_y": 512
61+
"to_y": 384
6262
},
6363
"argument2": {
6464
"type": "minecraft:add",
@@ -225,9 +225,9 @@
225225
"argument1": {
226226
"type": "minecraft:y_clamped_gradient",
227227
"from_value": 1.0,
228-
"from_y": 314,
228+
"from_y": 166,
229229
"to_value": 0.0,
230-
"to_y": 384
230+
"to_y": 236
231231
},
232232
"argument2": {
233233
"type": "minecraft:add",

src/main/java/com/altnoir/mia/MiaConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public enum DisconnectButtonState {
1919
public static DisconnectButtonState disconnectButtonState;
2020

2121
private static final ModConfigSpec.IntValue ABYSS_RADIUS = COMMON_BUILDER
22-
.comment("The radius of the Abyss (Default: 256) | 深渊半径 (默认值: 256)")
23-
.defineInRange("abyss_radius", 256, 64, 10000);
22+
.comment("The radius of the Abyss (Default: 160) | 深渊半径 (默认值: 160)")
23+
.defineInRange("abyss_radius", 160, 64, 10000);
2424

2525
private static final ModConfigSpec.BooleanValue CURSE = SERVER_BUILDER
2626
.comment("Whether to enable the Curse (Default: true) | 是否启用上升诅咒 (默认值: true)")

src/main/java/com/altnoir/mia/client/renderer/TheAbyssDimEffects.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616
import org.joml.Matrix4f;
1717

1818
public class TheAbyssDimEffects extends DimensionSpecialEffects {
19-
protected static final ResourceLocation CLOUDS_LOCATION = MiaUtil.vanillaId("textures/environment/clouds.png");
2019
protected static final ResourceLocation THE_ABYSS = MiaUtil.miaId("textures/skybox/the_abyss.png");
2120

2221
public static final float SIZE = 2048.0F;
2322
public static final float HEIGHT = 1536.0F;
2423
public static final float CLOUD_0 = -64.0F;
2524
public static final float CLOUD_1 = 40.0F;
26-
public static final float CLOUD_2 = 256.0F;
27-
public static final float CLOUD_3 = 450.0F;
25+
public static final float CLOUD_2 = 384.0F;
2826

2927
private int prevCloudX = Integer.MIN_VALUE;
3028
private int prevCloudY = Integer.MIN_VALUE;
@@ -37,7 +35,7 @@ public class TheAbyssDimEffects extends DimensionSpecialEffects {
3735
private VertexBuffer cloudBuffer;
3836

3937
public TheAbyssDimEffects() {
40-
super(Float.NaN, true, SkyType.NONE, true, false);
38+
super(Float.NaN, true, SkyType.NONE, false, false);
4139
}
4240

4341
@Override
@@ -106,8 +104,7 @@ public boolean renderSky(ClientLevel level, int ticks, float partialTick, Matrix
106104
public boolean renderClouds(ClientLevel level, int ticks, float partialTick, PoseStack poseStack, double camX, double camY, double camZ, Matrix4f modelViewMatrix, Matrix4f projectionMatrix) {
107105
return renderCloud(poseStack, modelViewMatrix, projectionMatrix, partialTick, camX, camY, camZ, level, ticks, CLOUD_0)
108106
|| renderCloud(poseStack, modelViewMatrix, projectionMatrix, partialTick, camX, camY, camZ, level, ticks, CLOUD_1)
109-
|| renderCloud(poseStack, modelViewMatrix, projectionMatrix, partialTick, camX, camY, camZ, level, ticks, CLOUD_2)
110-
|| renderCloud(poseStack, modelViewMatrix, projectionMatrix, partialTick, camX, camY, camZ, level, ticks, CLOUD_3);
107+
|| renderCloud(poseStack, modelViewMatrix, projectionMatrix, partialTick, camX, camY, camZ, level, ticks, CLOUD_2);
111108
}
112109

113110
private boolean renderCloud(PoseStack poseStack, Matrix4f frustumMatrix, Matrix4f projectionMatrix, float partialTick, double camX, double camY, double camZ,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.altnoir.mia.worldgen;
2+
3+
public record MiaHeight(int minY, int allY, int maxY) {
4+
public static final MiaHeight THE_ABYSS = create(-256, 640);
5+
public static final MiaHeight THE_GREAT_FAULT = create(-512, 512);
6+
public static final MiaHeight THE_GOBLETS_OF_GIANTS = create(0, 320);
7+
public static final MiaHeight THE_SEA_OF_CORPSES = create(-128, 512);
8+
public static final MiaHeight THE_CAPITAL_OF_THE_UNRETURNED = create(0, 320);
9+
public static final MiaHeight THE_FINAL_MAELSTROM = create(0, 320);
10+
11+
public static MiaHeight create(int minY, int allY) {
12+
return new MiaHeight(minY, allY, minY + allY);
13+
}
14+
}

src/main/java/com/altnoir/mia/worldgen/dimension/MiaDimensionTypes.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.altnoir.mia.client.event.ClientDimEffects;
44
import com.altnoir.mia.util.MiaUtil;
5+
import com.altnoir.mia.worldgen.MiaHeight;
56
import net.minecraft.core.registries.Registries;
67
import net.minecraft.data.worldgen.BootstrapContext;
78
import net.minecraft.resources.ResourceKey;
@@ -24,9 +25,9 @@ public static void bootstrapType(BootstrapContext<DimensionType> context) {
2425
1.0, // 坐标缩放值
2526
true, // 床是否可用
2627
false, // 重生锚是否可用
27-
-256, // 最小Y
28-
768, // 高度 (必须为16的倍数)
29-
768, // 逻辑高度 (紫颂果的传送和游戏创建的传送门不会超过此高度)
28+
MiaHeight.THE_ABYSS.minY(), // 最小Y
29+
MiaHeight.THE_ABYSS.allY(), // 高度 (必须为16的倍数)
30+
MiaHeight.THE_ABYSS.allY(), // 逻辑高度 (紫颂果的传送和游戏创建的传送门不会超过此高度)
3031
BlockTags.INFINIBURN_OVERWORLD, // 火能在哪些方块上永久燃烧
3132
ClientDimEffects.THE_ABYSS_EFFECTS, // 天空效果
3233
0.12F, // 环境光

src/main/java/com/altnoir/mia/worldgen/noise_setting/MiaDensityFunctions.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.altnoir.mia.MIA;
44
import com.altnoir.mia.init.worldgen.MiaDensityFunctionTypes;
5+
import com.altnoir.mia.worldgen.MiaHeight;
56
import net.minecraft.core.Holder;
67
import net.minecraft.core.HolderGetter;
78
import net.minecraft.core.registries.Registries;
@@ -79,14 +80,14 @@ public static Holder<? extends DensityFunction> bootstrap(BootstrapContext<Densi
7980
getFunction(holdergetter1, THE_ABYSS_PILLARS)
8081
));
8182
DensityFunction the_abyss_depth = DensityFunctions.add(DensityFunctions.yClampedGradient(5, 1200, 1.5, -2.5), getFunction(holdergetter1, MiaNoiseRouterData.OFFSET));
82-
context.register(THE_ABYSS_DEPTH, DensityFunctions.rangeChoice(yFunction, -256, 5, DensityFunctions.constant(2.0), the_abyss_depth));
83+
context.register(THE_ABYSS_DEPTH, DensityFunctions.rangeChoice(yFunction, MiaHeight.THE_ABYSS.minY(), 5, DensityFunctions.constant(2.0), the_abyss_depth));
8384

8485
context.register(THE_ABYSS_HOLE_ABOVE, DensityFunctions.add(MiaDensityFunctionTypes.hopperAbyssHole(), getFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS)));
85-
context.register(THE_ABYSS_HOLE_BELOW, DensityFunctions.add(MiaDensityFunctionTypes.generalAbyssHole(0.0F, 0.25F), getFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS)));
86+
context.register(THE_ABYSS_HOLE_BELOW, DensityFunctions.add(MiaDensityFunctionTypes.generalAbyssHole(0.0F, 0.3F), getFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS)));
8687
context.register(THE_ABYSS_BIG_HOLE, DensityFunctions.add(MiaDensityFunctionTypes.generalAbyssHole(128.0F), getFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS)));
87-
context.register(THE_ABYSS_INSIDE_HOLE_ABOVE, abyssDensityFunction(holdergetter1, THE_ABYSS_HOLE_ABOVE, 5, 460, -1.0));
88-
context.register(THE_ABYSS_INSIDE_HOLE_BELOW, abyssDensityFunction(holdergetter1, THE_ABYSS_HOLE_BELOW, -128, 5, -1.0));
89-
context.register(THE_ABYSS_MIDDLE_BASE_3D, abyssDensityFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS, -128, 460, -1.0));
88+
context.register(THE_ABYSS_INSIDE_HOLE_ABOVE, abyssDensityFunction(holdergetter1, THE_ABYSS_HOLE_ABOVE, 5, MiaHeight.THE_ABYSS.maxY() - 64, -1.0));
89+
context.register(THE_ABYSS_INSIDE_HOLE_BELOW, abyssDensityFunction(holdergetter1, THE_ABYSS_HOLE_BELOW, MiaHeight.THE_ABYSS.minY() + 128, 5, -1.0));
90+
context.register(THE_ABYSS_MIDDLE_BASE_3D, abyssDensityFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS, MiaHeight.THE_ABYSS.minY() + 128, MiaHeight.THE_ABYSS.maxY() - 64, -1.0));
9091
context.register(THE_ABYSS_OUTSIDE_BASE_3D, abyssDensityFunction(holdergetter1, BASE_3D_NOISE_THE_ABYSS));
9192

9293
DensityFunction densityfunction3 = DensityFunctions.noise(holdergetter.getOrThrow(Noises.JAGGED), 1500.0, 0.0);
@@ -98,12 +99,8 @@ public static Holder<? extends DensityFunction> bootstrap(BootstrapContext<Densi
9899
return context.register(THE_ABYSS_NOODLE, theAbyssNoodle(holdergetter1, holdergetter));
99100
}
100101

101-
private static DensityFunction abyssEdgeNoodle(HolderGetter<DensityFunction> densityFunctions, HolderGetter<NormalNoise.NoiseParameters> noiseParameters) {
102-
return noodle(5, 512, densityFunctions, noiseParameters, 0, 40, false);
103-
}
104-
105102
private static DensityFunction theAbyssNoodle(HolderGetter<DensityFunction> densityFunctions, HolderGetter<NormalNoise.NoiseParameters> noiseParameters) {
106-
return noodle(-128, 512, densityFunctions, noiseParameters, -40, 40, false);
103+
return noodle(MiaHeight.THE_ABYSS.minY() + 128, MiaHeight.THE_ABYSS.maxY(), densityFunctions, noiseParameters, -40, 40, false);
107104
}
108105

109106
private static DensityFunction noodle(int minY, int maxY, HolderGetter<DensityFunction> densityFunctions, HolderGetter<NormalNoise.NoiseParameters> noiseParameters, int minYOffset, int maxYOffset, boolean ridgeB) {

0 commit comments

Comments
 (0)