From e396203686a6ecf86537fb4c9901ac8ceb841bc7 Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 16 Aug 2026 15:26:00 -0700 Subject: [PATCH 1/5] feat: sky color redesign base progress --- .../client/AetherIIRenderPipelines.java | 17 +++++ .../level/HolyIslesSkyboxRenderer.java | 76 ++++++++++++++++++- .../data/generators/AetherIIDataMapData.java | 2 +- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/aetherteam/aetherii/client/AetherIIRenderPipelines.java b/src/main/java/com/aetherteam/aetherii/client/AetherIIRenderPipelines.java index a3e28dc337..a2dcd1aef1 100644 --- a/src/main/java/com/aetherteam/aetherii/client/AetherIIRenderPipelines.java +++ b/src/main/java/com/aetherteam/aetherii/client/AetherIIRenderPipelines.java @@ -29,6 +29,21 @@ public class AetherIIRenderPipelines { .withCull(false) .build(); + public static final RenderPipeline BASE_SKY_SHADER = RenderPipeline.builder(RenderPipelines.MATRICES_FOG_SNIPPET) + .withLocation(Identifier.fromNamespaceAndPath(AetherII.MODID, "pipeline/base_sky")) + .withVertexShader("core/position") + .withFragmentShader("core/position") + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.TRIANGLE_FAN) + .build(); + + public static final RenderPipeline TOP_SKY_GRADIENT_SHADER = RenderPipeline.builder(RenderPipelines.MATRICES_FOG_SNIPPET) + .withLocation(Identifier.fromNamespaceAndPath(AetherII.MODID, "pipeline/top_sky_gradient")) + .withVertexShader("core/position_color") + .withFragmentShader("core/position_color") + .withColorTargetState(new ColorTargetState(BlendFunction.TRANSLUCENT)) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.TRIANGLE_FAN) + .build(); + public static final RenderPipeline CLOUD_COVER_SHADER = RenderPipeline.builder(RenderPipelines.MATRICES_FOG_SNIPPET) .withLocation(Identifier.fromNamespaceAndPath(AetherII.MODID, "pipeline/cloud_cover")) .withVertexShader("core/position_color") @@ -39,6 +54,8 @@ public class AetherIIRenderPipelines { public static void registerShaders(RegisterRenderPipelinesEvent event) { event.registerPipeline(ENTITY_DITHER_NO_CULL); + event.registerPipeline(BASE_SKY_SHADER); + event.registerPipeline(TOP_SKY_GRADIENT_SHADER); event.registerPipeline(CLOUD_COVER_SHADER); } } diff --git a/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java b/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java index 81962d8c46..ed8fa9c2f7 100644 --- a/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java +++ b/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java @@ -24,13 +24,56 @@ import java.util.OptionalInt; public class HolyIslesSkyboxRenderer implements CustomSkyboxRenderer { + private static final int BASE_SKY_BUFFER_VERTICES = 5; + private static final int TOP_SKY_GRADIENT_BUFFER_VERTICES = 42; private static final int CLOUD_COVER_BUFFER_VERTICES = 42; + private final GpuBuffer baseSkyBuffer; + private final GpuBuffer topSkyGradientBuffer; private final GpuBuffer cloudCoverBuffer; public HolyIslesSkyboxRenderer() { + this.baseSkyBuffer = this.buildBaseSkyDisc(); + this.topSkyGradientBuffer = this.buildTopSkyGradientDisc(); this.cloudCoverBuffer = this.buildCloudCover(); } + private GpuBuffer buildBaseSkyDisc() { + GpuBuffer buffer; + try (ByteBufferBuilder builder = ByteBufferBuilder.exactlySized(BASE_SKY_BUFFER_VERTICES * DefaultVertexFormat.POSITION.getVertexSize())) { + BufferBuilder bufferBuilder = new BufferBuilder(builder, VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION); + + bufferBuilder.addVertex(0.0F, 16.0F, 0.0F); + for (int i = -180; i <= 180; i += 120) { + float angle = i * Mth.DEG_TO_RAD; + bufferBuilder.addVertex(Math.signum(16.0F) * 512.0F * Mth.cos(angle), -512.0F, 512.0F * Mth.sin(angle)); + } + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + buffer = RenderSystem.getDevice().createBuffer(() -> "Base sky vertex buffer", 32, meshData.vertexBuffer()); + } + } + return buffer; + } + + private GpuBuffer buildTopSkyGradientDisc() { + GpuBuffer buffer; + try (ByteBufferBuilder builder = ByteBufferBuilder.exactlySized(TOP_SKY_GRADIENT_BUFFER_VERTICES * DefaultVertexFormat.POSITION_COLOR.getVertexSize())) { + BufferBuilder bufferBuilder = new BufferBuilder(builder, VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION_COLOR); + int centerColor = ARGB.white(1.0F); + int edgeColor = ARGB.white(0.0F); + float gradient = 32.0F; + + bufferBuilder.addVertex(0.0F, 16.0F, 0.0F).setColor(centerColor); + for (int i = -180; i <= 180; i += 9) { + float angle = i * Mth.DEG_TO_RAD; + bufferBuilder.addVertex( Math.signum(16.0F) * gradient * Mth.cos(angle), 0.0F, gradient * Mth.sin(angle)).setColor(edgeColor); + } + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + buffer = RenderSystem.getDevice().createBuffer(() -> "Top sky gradient vertex buffer", 32, meshData.vertexBuffer()); + } + } + return buffer; + } + private GpuBuffer buildCloudCover() { GpuBuffer buffer; try (ByteBufferBuilder builder = ByteBufferBuilder.exactlySized(CLOUD_COVER_BUFFER_VERTICES * DefaultVertexFormat.POSITION_COLOR.getVertexSize())) { @@ -43,7 +86,6 @@ private GpuBuffer buildCloudCover() { float angle = i * Mth.DEG_TO_RAD; bufferBuilder.addVertex(Math.signum(-16.0F) * 512.0F * Mth.cos(angle), -16.0F, 512.0F * Mth.sin(angle)).setColor(edgeColor); } - try (MeshData mesh = bufferBuilder.buildOrThrow()) { buffer = RenderSystem.getDevice().createBuffer(() -> "Cloud cover vertex buffer", 32, mesh.vertexBuffer()); } @@ -54,9 +96,9 @@ private GpuBuffer buildCloudCover() { @Override public boolean renderSky(LevelRenderState levelRenderState, SkyRenderState skyRenderState, Matrix4fc modelViewMatrix, Runnable setupFog) { SkyRenderer skyRenderer = ((LevelRendererAccessor) Minecraft.getInstance().levelRenderer).aether_ii$getSkyRenderer(); - setupFog.run(); PoseStack poseStack = new PoseStack(); - skyRenderer.renderSkyDisc(skyRenderState.skyColor); + this.renderBaseSkyDisc(); + this.renderTopSkyGradientDisc(); skyRenderer.renderSunriseAndSunset(poseStack, skyRenderState.sunAngle, skyRenderState.sunriseAndSunsetColor); skyRenderer.renderSunMoonAndStars(poseStack, skyRenderState.sunAngle, skyRenderState.moonAngle, @@ -68,6 +110,34 @@ public boolean renderSky(LevelRenderState levelRenderState, SkyRenderState skyRe return true; } + public void renderBaseSkyDisc() { + GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), ARGB.vector4fFromARGB32(0xffC2C0E0), new Vector3f(), new Matrix4f()); //todo color as environment variable + GpuTextureView colorTexture = Minecraft.getInstance().getMainRenderTarget().getColorTextureView(); + GpuTextureView depthTexture = Minecraft.getInstance().getMainRenderTarget().getDepthTextureView(); + + try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Base sky disc", colorTexture, OptionalInt.empty(), depthTexture, OptionalDouble.empty())) { + renderPass.setPipeline(AetherIIRenderPipelines.BASE_SKY_SHADER); + RenderSystem.bindDefaultUniforms(renderPass); + renderPass.setUniform("DynamicTransforms", dynamicTransforms); + renderPass.setVertexBuffer(0, this.baseSkyBuffer); + renderPass.draw(0, BASE_SKY_BUFFER_VERTICES); + } + } + + public void renderTopSkyGradientDisc() { + GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), ARGB.vector4fFromARGB32(0xff8A81CB), new Vector3f(), new Matrix4f()); //todo color as environment variable + GpuTextureView colorTexture = Minecraft.getInstance().getMainRenderTarget().getColorTextureView(); + GpuTextureView depthTexture = Minecraft.getInstance().getMainRenderTarget().getDepthTextureView(); + + try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(() -> "Top sky disc", colorTexture, OptionalInt.empty(), depthTexture, OptionalDouble.empty())) { + renderPass.setPipeline(AetherIIRenderPipelines.TOP_SKY_GRADIENT_SHADER); + RenderSystem.bindDefaultUniforms(renderPass); + renderPass.setUniform("DynamicTransforms", dynamicTransforms); + renderPass.setVertexBuffer(0, this.topSkyGradientBuffer); + renderPass.draw(0, TOP_SKY_GRADIENT_BUFFER_VERTICES); + } + } + public void renderCloudCoverDisc(LevelRenderState levelRenderState, PoseStack poseStack) { int color = levelRenderState.getRenderDataOrDefault(AetherIIDimensionRenderers.DATA_CLOUD_COVER_COLOR_KEY, 0); Vector3f colorVec = ARGB.vector3fFromRGB24(color); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java index a580cd42e9..8217a41a7d 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java @@ -137,7 +137,7 @@ protected void gather(HolderLookup.Provider provider) { blocks.add(AetherIIBlocks.STRIPPED_GUARDIAN_LOG, new BlockInfection(AetherIIBlocks.STRIPPED_INFECTED_LOG.getKey()), false); blocks.add(AetherIIBlocks.STRIPPED_GUARDIAN_WOOD, new BlockInfection(AetherIIBlocks.STRIPPED_INFECTED_WOOD.getKey()), false); - var colors = this.builder(AetherIIDataMaps.AETHER_GRASS_COLORS); + var colors = this.builder(AetherIIDataMaps.AETHER_GRASS_COLORS); //todo why do we have this again? can it be an environmental attribute? colors.add(AetherIITags.Biomes.HIGHFIELDS, 0xb5ffd0, false); colors.add(AetherIITags.Biomes.MAGNETIC, 0xc9ffd1, false); colors.add(AetherIITags.Biomes.ARCTIC, 0xbdf9ff, false); From 0a7bb327c126ee7d57467bf27bc152cd9c43adf6 Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 16 Aug 2026 15:55:37 -0700 Subject: [PATCH 2/5] improv: change grass color from using datamaps to environment attributes --- .../worldgen/biome/aether_grass_color.json | 9 ---- .../worldgen/biome/battleground_wastes.json | 1 + .../worldgen/biome/contaminated_jungle.json | 1 + .../worldgen/biome/enduring_woodland.json | 1 + .../aether_ii/worldgen/biome/expanse.json | 1 + .../worldgen/biome/flourishing_field.json | 1 + .../worldgen/biome/frigid_sierra.json | 1 + .../worldgen/biome/frozen_lakes.json | 1 + .../worldgen/biome/glistening_swamp.json | 1 + .../worldgen/biome/hestveil_caverns.json | 1 + .../worldgen/biome/magnetic_scar.json | 1 + .../worldgen/biome/sheer_tundra.json | 1 + .../worldgen/biome/shimmering_basin.json | 1 + .../worldgen/biome/shrouded_forest.json | 1 + .../worldgen/biome/turquoise_forest.json | 1 + .../worldgen/biome/verdant_woods.json | 1 + .../worldgen/biome/violet_highwoods.json | 1 + .../com/aetherteam/aetherii/AetherII.java | 1 - .../aetherii/AetherIIEventListeners.java | 2 - .../client/AetherIIColorResolvers.java | 16 +++---- .../client/event/hooks/BiomeHooks.java | 47 ------------------- .../data/generators/AetherIIDataMapData.java | 8 ---- .../holyisles/HolyIslesBiomeBuilders.java | 5 ++ .../registries/AetherIIDataMaps.java | 8 ---- .../clientbound/GrassTintSyncPacket.java | 46 ------------------ .../world/AetherIIEnvironmentAttributes.java | 1 + 26 files changed, 29 insertions(+), 130 deletions(-) delete mode 100644 src/generated/resources/data/aether_ii/data_maps/worldgen/biome/aether_grass_color.json delete mode 100644 src/main/java/com/aetherteam/aetherii/client/event/hooks/BiomeHooks.java delete mode 100644 src/main/java/com/aetherteam/aetherii/network/packet/clientbound/GrassTintSyncPacket.java diff --git a/src/generated/resources/data/aether_ii/data_maps/worldgen/biome/aether_grass_color.json b/src/generated/resources/data/aether_ii/data_maps/worldgen/biome/aether_grass_color.json deleted file mode 100644 index dcf4361f5b..0000000000 --- a/src/generated/resources/data/aether_ii/data_maps/worldgen/biome/aether_grass_color.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "values": { - "#aether_ii:arctic": 12450303, - "#aether_ii:highfields": 11927504, - "#aether_ii:irradiated": 16768409, - "#aether_ii:magnetic": 13238225, - "aether_ii:expanse": 11927504 - } -} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json b/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json index 586079afd9..ed77b680df 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#ffdd99", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json b/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json index 236a97d819..e50c05a39c 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#ffdd99", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json b/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json index 90d1d9d6c8..3de4c26757 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#bdf9ff", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json b/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json index 4092d803d0..03c7f86292 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json b/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json index 1049d3a0f9..45e91fb4d1 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json b/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json index 4f87f87a22..d36c7ed511 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#bdf9ff", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json b/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json index cf5f5cf49c..4a92e09ac2 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#bdf9ff", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json b/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json index b590ec6441..049846edb9 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#c9ffd1", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json b/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json index 3870a96eae..91d0a85af2 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json b/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json index b9c2a64bcb..3854fa7882 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#c9ffd1", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json b/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json index 71334a5536..3ab5c0a318 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#bdf9ff", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json b/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json index 4ae84fee0f..c4dd338e14 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json b/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json index b4d367c5f1..90483a9468 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json b/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json index e4ac095837..3a72501251 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#c9ffd1", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json b/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json index e2cf26eb94..218f0ad5dc 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#b5ffd0", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json b/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json index 6123e973ff..6efd19e7c9 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json @@ -1,5 +1,6 @@ { "attributes": { + "aether_ii:visual/aether_grass_color": "#c9ffd1", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/main/java/com/aetherteam/aetherii/AetherII.java b/src/main/java/com/aetherteam/aetherii/AetherII.java index 498a0b40ba..adf5ad0eca 100644 --- a/src/main/java/com/aetherteam/aetherii/AetherII.java +++ b/src/main/java/com/aetherteam/aetherii/AetherII.java @@ -243,7 +243,6 @@ public void registerPackets(RegisterPayloadHandlersEvent event) { registrar.playToClient(ResistanceKnockbackPacket.TYPE, ResistanceKnockbackPacket.STREAM_CODEC, ResistanceKnockbackPacket::execute); registrar.playToClient(SetAccessoriesPacket.TYPE, SetAccessoriesPacket.STREAM_CODEC, SetAccessoriesPacket::execute); registrar.playToClient(SetVehiclePacket.TYPE, SetVehiclePacket.STREAM_CODEC, SetVehiclePacket::execute); - registrar.playToClient(GrassTintSyncPacket.TYPE, GrassTintSyncPacket.STREAM_CODEC, GrassTintSyncPacket::execute); // SERVERBOUND registrar.playToServer(AlkahestBreakBlockPacket.TYPE, AlkahestBreakBlockPacket.STREAM_CODEC, AlkahestBreakBlockPacket::execute); diff --git a/src/main/java/com/aetherteam/aetherii/AetherIIEventListeners.java b/src/main/java/com/aetherteam/aetherii/AetherIIEventListeners.java index fb1dd0a586..dbdced1ebd 100644 --- a/src/main/java/com/aetherteam/aetherii/AetherIIEventListeners.java +++ b/src/main/java/com/aetherteam/aetherii/AetherIIEventListeners.java @@ -3,7 +3,6 @@ import com.aetherteam.aetherii.advancement.trigger.AetherIIAdvancementTriggers; import com.aetherteam.aetherii.attachment.AetherIIDataAttachments; import com.aetherteam.aetherii.block.AetherIIBlocks; -import com.aetherteam.aetherii.client.event.hooks.BiomeHooks; import com.aetherteam.aetherii.data.resources.registries.AetherIIDamageTypes; import com.aetherteam.aetherii.effect.buildup.EffectBuildupPresets; import com.aetherteam.aetherii.entity.AetherIIEntityTypes; @@ -119,7 +118,6 @@ public static void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { player.getData(AetherIIDataAttachments.ABILITY_BEHAVIOR).login(player); player.getData(AetherIIDataAttachments.GUIDEBOOK_DISCOVERY).login(player); player.getData(AetherIIDataAttachments.OUTPOST_TRACKER).login(player); - BiomeHooks.sendColors(player); } public static void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event) { diff --git a/src/main/java/com/aetherteam/aetherii/client/AetherIIColorResolvers.java b/src/main/java/com/aetherteam/aetherii/client/AetherIIColorResolvers.java index 99e201665d..240e05fa77 100644 --- a/src/main/java/com/aetherteam/aetherii/client/AetherIIColorResolvers.java +++ b/src/main/java/com/aetherteam/aetherii/client/AetherIIColorResolvers.java @@ -3,7 +3,7 @@ import com.aetherteam.aetherii.AetherII; import com.aetherteam.aetherii.block.AetherIIBlocks; import com.aetherteam.aetherii.block.natural.IrradiatedLeavesBlock; -import com.aetherteam.aetherii.client.event.hooks.BiomeHooks; +import com.aetherteam.aetherii.world.AetherIIEnvironmentAttributes; import net.minecraft.client.color.block.BlockTintSource; import net.minecraft.client.renderer.block.BlockAndTintGetter; import net.minecraft.core.BlockPos; @@ -15,10 +15,8 @@ import java.util.List; public class AetherIIColorResolvers { - public static final int AETHER_GRASS_COLOR = 0xb5ffd0; - public static final int AETHER_TALL_GRASS_COLOR = 0xb5ffd0; - - public static final ColorResolver GRASS_COLORS = BiomeHooks::getColor; + public static final int AETHER_GRASS_COLOR = AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get().defaultValue(); + public static final ColorResolver GRASS_COLORS = (biome, x, z) -> biome.getAttributes().applyModifier(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), AETHER_GRASS_COLOR); public static void registerColorResolvers(RegisterColorHandlersEvent.ColorResolvers event) { event.register(GRASS_COLORS); @@ -43,13 +41,13 @@ public static void registerBlockColor(RegisterColorHandlersEvent.BlockTintSource ), AetherIIBlocks.AETHER_GRASS_BLOCK.get()); event.register(List.of( - grassColor(0, AETHER_TALL_GRASS_COLOR, 5.0F, 6.0F), - grassColor(1, AETHER_TALL_GRASS_COLOR, 5.0F, 6.0F), - grassColor(2, AETHER_TALL_GRASS_COLOR, 5.0F, 6.0F) + grassColor(0, AETHER_GRASS_COLOR, 5.0F, 6.0F), + grassColor(1, AETHER_GRASS_COLOR, 5.0F, 6.0F), + grassColor(2, AETHER_GRASS_COLOR, 5.0F, 6.0F) ), AetherIIBlocks.SHORT_AETHER_GRASS.get(), AetherIIBlocks.MEDIUM_AETHER_GRASS.get(), AetherIIBlocks.TALL_AETHER_GRASS.get()); event.register(List.of( - fernColor(AETHER_TALL_GRASS_COLOR) + fernColor(AETHER_GRASS_COLOR) ), AetherIIBlocks.AETHER_FERN.get(), AetherIIBlocks.POTTED_AETHER_FERN.get()); } diff --git a/src/main/java/com/aetherteam/aetherii/client/event/hooks/BiomeHooks.java b/src/main/java/com/aetherteam/aetherii/client/event/hooks/BiomeHooks.java deleted file mode 100644 index 6d4b538db9..0000000000 --- a/src/main/java/com/aetherteam/aetherii/client/event/hooks/BiomeHooks.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.aetherteam.aetherii.client.event.hooks; - -import com.aetherteam.aetherii.client.AetherIIColorResolvers; -import com.aetherteam.aetherii.data.resources.registries.AetherIIDataMaps; -import com.aetherteam.aetherii.network.packet.clientbound.GrassTintSyncPacket; -import com.google.common.collect.ImmutableMap; -import com.mojang.datafixers.util.Pair; -import net.minecraft.core.Holder; -import net.minecraft.core.HolderGetter; -import net.minecraft.core.Registry; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.biome.Biome; -import net.neoforged.neoforge.network.PacketDistributor; - -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -public class BiomeHooks { - - private static Map COLORS = ImmutableMap.of(); - - public static void acceptColors(HolderGetter getter, Map, Integer> map) { - COLORS = map.entrySet().stream() - .map(entry -> Pair.of(getter.get(entry.getKey()), entry.getValue())) - .filter(pair -> pair.getFirst().isPresent()) - .map(pair -> pair.mapFirst(Optional::get)) - .filter(pair -> pair.getFirst().isBound()) - .map(pair -> pair.mapFirst(Holder::value)) - .collect(Collectors.toUnmodifiableMap(Pair::getFirst, Pair::getSecond)); - } - - public static int getColor(Biome biome, double x, double z) { - return biome.getModifiedSpecialEffects().grassColorModifier().modifyColor( - x, z, COLORS.getOrDefault(biome, AetherIIColorResolvers.AETHER_GRASS_COLOR)); - } - - public static void sendColors(Player player) { - if (!player.level().isClientSide() && player instanceof ServerPlayer sp) { - Registry registry = player.registryAccess().lookupOrThrow(Registries.BIOME); - PacketDistributor.sendToPlayer(sp, new GrassTintSyncPacket(registry.getDataMap(AetherIIDataMaps.AETHER_GRASS_COLORS))); - } - } -} diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java index 8217a41a7d..bc970865aa 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIDataMapData.java @@ -6,7 +6,6 @@ import com.aetherteam.aetherii.data.resources.maps.BlockInfection; import com.aetherteam.aetherii.data.resources.maps.BucketReplacement; import com.aetherteam.aetherii.data.resources.registries.AetherIIDataMaps; -import com.aetherteam.aetherii.data.resources.registries.holyisles.HolyIslesBiomes; import com.aetherteam.aetherii.item.AetherIIItems; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; @@ -136,13 +135,6 @@ protected void gather(HolderLookup.Provider provider) { blocks.add(AetherIIBlocks.GUARDIAN_WOOD, new BlockInfection(AetherIIBlocks.INFECTED_WOOD.getKey()), false); blocks.add(AetherIIBlocks.STRIPPED_GUARDIAN_LOG, new BlockInfection(AetherIIBlocks.STRIPPED_INFECTED_LOG.getKey()), false); blocks.add(AetherIIBlocks.STRIPPED_GUARDIAN_WOOD, new BlockInfection(AetherIIBlocks.STRIPPED_INFECTED_WOOD.getKey()), false); - - var colors = this.builder(AetherIIDataMaps.AETHER_GRASS_COLORS); //todo why do we have this again? can it be an environmental attribute? - colors.add(AetherIITags.Biomes.HIGHFIELDS, 0xb5ffd0, false); - colors.add(AetherIITags.Biomes.MAGNETIC, 0xc9ffd1, false); - colors.add(AetherIITags.Biomes.ARCTIC, 0xbdf9ff, false); - colors.add(AetherIITags.Biomes.IRRADIATED, 0xffdd99, false); - colors.add(HolyIslesBiomes.EXPANSE, 0xb5ffd0, false); } private void addCompost(DataMapProvider.Builder map, DeferredHolder item, float chance) { diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java b/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java index f040c86b37..e6b4b846a6 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java @@ -6,6 +6,7 @@ import com.aetherteam.aetherii.data.resources.registries.AetherIICarvers; import com.aetherteam.aetherii.data.resources.registries.holyisles.HolyIslesPlacedFeatures; import com.aetherteam.aetherii.entity.AetherIIEntityTypes; +import com.aetherteam.aetherii.world.AetherIIEnvironmentAttributes; import net.minecraft.core.HolderGetter; import net.minecraft.resources.ResourceKey; import net.minecraft.sounds.Music; @@ -740,6 +741,7 @@ public static Biome makeHestveilCavernsBiome(HolderGetter placedF public static Biome highfieldsDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() + .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xb5ffd0) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xecebfc) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xc9d1ff) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x55708a) @@ -758,6 +760,7 @@ public static Biome highfieldsDefinition(boolean precipitation, float temperatur public static Biome magneticDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() + .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xc9ffd1) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xedeef5) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xc5cbeb) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x607496) @@ -776,6 +779,7 @@ public static Biome magneticDefinition(boolean precipitation, float temperature, public static Biome arcticDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() + .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xbdf9ff) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xf3f0ff) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xe7e3fc) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x3e5082) @@ -794,6 +798,7 @@ public static Biome arcticDefinition(boolean precipitation, float temperature, f public static Biome irradiatedDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() + .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xffdd99) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xF0E8BE) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xfcebc5) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0xbccc81) diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIDataMaps.java b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIDataMaps.java index f338bb010b..f53487f566 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIDataMaps.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIDataMaps.java @@ -4,11 +4,9 @@ import com.aetherteam.aetherii.data.resources.maps.AmberHourglassFuel; import com.aetherteam.aetherii.data.resources.maps.BlockInfection; import com.aetherteam.aetherii.data.resources.maps.BucketReplacement; -import com.mojang.serialization.Codec; import net.minecraft.core.registries.Registries; import net.minecraft.resources.Identifier; import net.minecraft.world.item.Item; -import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; import net.neoforged.neoforge.registries.datamaps.DataMapType; import net.neoforged.neoforge.registries.datamaps.RegisterDataMapTypesEvent; @@ -29,15 +27,9 @@ public class AetherIIDataMaps { .synced(BlockInfection.BLOCK_CODEC, false) .build(); - // Don't sync, as we sync this manually with a packet - public static final DataMapType AETHER_GRASS_COLORS = DataMapType - .builder(Identifier.fromNamespaceAndPath(AetherII.MODID, "aether_grass_color"), Registries.BIOME, Codec.INT) - .build(); - public static void registerDataMaps(RegisterDataMapTypesEvent event) { event.register(AMBER_HOURGLASS_FUELS); event.register(BUCKET_REPLACEMENT); event.register(INFECTED_BLOCKS); - event.register(AETHER_GRASS_COLORS); } } \ No newline at end of file diff --git a/src/main/java/com/aetherteam/aetherii/network/packet/clientbound/GrassTintSyncPacket.java b/src/main/java/com/aetherteam/aetherii/network/packet/clientbound/GrassTintSyncPacket.java deleted file mode 100644 index 3950c5dd82..0000000000 --- a/src/main/java/com/aetherteam/aetherii/network/packet/clientbound/GrassTintSyncPacket.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.aetherteam.aetherii.network.packet.clientbound; - -import com.aetherteam.aetherii.AetherII; -import com.aetherteam.aetherii.client.event.hooks.BiomeHooks; -import net.minecraft.client.Minecraft; -import net.minecraft.core.registries.Registries; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.network.protocol.common.custom.CustomPacketPayload; -import net.minecraft.resources.Identifier; -import net.minecraft.resources.ResourceKey; -import net.minecraft.world.level.biome.Biome; -import net.neoforged.neoforge.network.handling.IPayloadContext; - -import java.util.Map; - -public record GrassTintSyncPacket(Map, Integer> types) implements CustomPacketPayload { - - public static final Type TYPE = new Type<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "sync_grass_tint")); - - public static final StreamCodec STREAM_CODEC = CustomPacketPayload.codec( - GrassTintSyncPacket::write, - GrassTintSyncPacket::decode); - - public void write(FriendlyByteBuf buf) { - buf.writeMap(types, FriendlyByteBuf::writeResourceKey, FriendlyByteBuf::writeInt); - } - - - public static GrassTintSyncPacket decode(FriendlyByteBuf buf) { - Map, Integer> map = buf.readMap(b1 -> b1.readResourceKey(Registries.BIOME), FriendlyByteBuf::readInt); - return new GrassTintSyncPacket(map); - } - - public static void execute(GrassTintSyncPacket packet, IPayloadContext context) { - if (Minecraft.getInstance().level != null) { - BiomeHooks.acceptColors(Minecraft.getInstance().level.registryAccess().lookupOrThrow(Registries.BIOME), packet.types); - } - } - - @Override - public Type type() { - return TYPE; - } -} diff --git a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java index f606c3c82d..5907e73260 100644 --- a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java +++ b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java @@ -18,6 +18,7 @@ public class AetherIIEnvironmentAttributes { public static final DeferredRegister> ENVIRONMENT_ATTRIBUTES = DeferredRegister.create(Registries.ENVIRONMENT_ATTRIBUTE, AetherII.MODID); + public static final DeferredHolder, EnvironmentAttribute> AETHER_GRASS_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/aether_grass_color", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0xb5ffd0).spatiallyInterpolated().syncable().build()); public static final DeferredHolder, EnvironmentAttribute> CLOUD_COVER_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/cloud_color_cover", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0).spatiallyInterpolated().syncable().build()); public static class Weather { From 7c47f95e7a1c6a3b6c8cb8e66ecef0ac54a91e5e Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 16 Aug 2026 16:07:03 -0700 Subject: [PATCH 3/5] improv: switch new sky color values to environment attributes --- .../renderer/AetherIIDimensionRenderers.java | 4 ++++ .../level/HolyIslesSkyboxRenderer.java | 21 ++++++++++++------- .../world/AetherIIEnvironmentAttributes.java | 2 ++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIDimensionRenderers.java b/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIDimensionRenderers.java index 260597f07a..ba8752be41 100644 --- a/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIDimensionRenderers.java +++ b/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIDimensionRenderers.java @@ -12,6 +12,8 @@ import net.neoforged.neoforge.client.event.RegisterCustomEnvironmentEffectRendererEvent; public class AetherIIDimensionRenderers { + public static final ContextKey DATA_BASE_SKY_COLOR_KEY = new ContextKey<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "base_sky_color")); + public static final ContextKey DATA_TOP_SKY_GRADIENT_COLOR_KEY = new ContextKey<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "top_sky_gradient_color")); public static final ContextKey DATA_CLOUD_COVER_COLOR_KEY = new ContextKey<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "cloud_cover_color")); public static final Identifier HOLY_ISLES_SKY_ID = Identifier.fromNamespaceAndPath(AetherII.MODID, "holy_isles_sky"); @@ -26,6 +28,8 @@ public static void registerDimensionEffect(RegisterCustomEnvironmentEffectRender public static void extractDimensionEffect(ExtractLevelRenderStateEvent event) { if (event.getLevel().dimensionTypeRegistration().is(AetherIIDimensions.AETHER_HOLY_ISLES_DIMENSION_TYPE)) { + event.getRenderState().setRenderData(DATA_BASE_SKY_COLOR_KEY, event.getCamera().attributeProbe().getValue(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), event.getDeltaTracker().getGameTimeDeltaPartialTick(false))); + event.getRenderState().setRenderData(DATA_TOP_SKY_GRADIENT_COLOR_KEY, event.getCamera().attributeProbe().getValue(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), event.getDeltaTracker().getGameTimeDeltaPartialTick(false))); event.getRenderState().setRenderData(DATA_CLOUD_COVER_COLOR_KEY, event.getCamera().attributeProbe().getValue(AetherIIEnvironmentAttributes.CLOUD_COVER_COLOR.get(), event.getDeltaTracker().getGameTimeDeltaPartialTick(false))); } } diff --git a/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java b/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java index ed8fa9c2f7..a7d20857ab 100644 --- a/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java +++ b/src/main/java/com/aetherteam/aetherii/client/renderer/level/HolyIslesSkyboxRenderer.java @@ -3,6 +3,7 @@ import com.aetherteam.aetherii.client.AetherIIRenderPipelines; import com.aetherteam.aetherii.client.renderer.AetherIIDimensionRenderers; import com.aetherteam.aetherii.mixin.mixins.client.accessor.LevelRendererAccessor; +import com.aetherteam.aetherii.world.AetherIIEnvironmentAttributes; import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.buffers.GpuBufferSlice; import com.mojang.blaze3d.systems.RenderPass; @@ -97,8 +98,8 @@ private GpuBuffer buildCloudCover() { public boolean renderSky(LevelRenderState levelRenderState, SkyRenderState skyRenderState, Matrix4fc modelViewMatrix, Runnable setupFog) { SkyRenderer skyRenderer = ((LevelRendererAccessor) Minecraft.getInstance().levelRenderer).aether_ii$getSkyRenderer(); PoseStack poseStack = new PoseStack(); - this.renderBaseSkyDisc(); - this.renderTopSkyGradientDisc(); + this.renderBaseSkyDisc(levelRenderState); + this.renderTopSkyGradientDisc(levelRenderState); skyRenderer.renderSunriseAndSunset(poseStack, skyRenderState.sunAngle, skyRenderState.sunriseAndSunsetColor); skyRenderer.renderSunMoonAndStars(poseStack, skyRenderState.sunAngle, skyRenderState.moonAngle, @@ -110,8 +111,11 @@ public boolean renderSky(LevelRenderState levelRenderState, SkyRenderState skyRe return true; } - public void renderBaseSkyDisc() { - GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), ARGB.vector4fFromARGB32(0xffC2C0E0), new Vector3f(), new Matrix4f()); //todo color as environment variable + public void renderBaseSkyDisc(LevelRenderState levelRenderState) { + int color = levelRenderState.getRenderDataOrDefault(AetherIIDimensionRenderers.DATA_BASE_SKY_COLOR_KEY, AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get().defaultValue()); + Vector3f colorVec = ARGB.vector3fFromRGB24(color); + + GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), new Vector4f(colorVec.x(), colorVec.y(), colorVec.z(), 1.0F), new Vector3f(), new Matrix4f()); GpuTextureView colorTexture = Minecraft.getInstance().getMainRenderTarget().getColorTextureView(); GpuTextureView depthTexture = Minecraft.getInstance().getMainRenderTarget().getDepthTextureView(); @@ -124,8 +128,11 @@ public void renderBaseSkyDisc() { } } - public void renderTopSkyGradientDisc() { - GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), ARGB.vector4fFromARGB32(0xff8A81CB), new Vector3f(), new Matrix4f()); //todo color as environment variable + public void renderTopSkyGradientDisc(LevelRenderState levelRenderState) { + int color = levelRenderState.getRenderDataOrDefault(AetherIIDimensionRenderers.DATA_TOP_SKY_GRADIENT_COLOR_KEY, AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get().defaultValue()); + Vector3f colorVec = ARGB.vector3fFromRGB24(color); + + GpuBufferSlice dynamicTransforms = RenderSystem.getDynamicUniforms().writeTransform(RenderSystem.getModelViewMatrix(), new Vector4f(colorVec.x(), colorVec.y(), colorVec.z(), 1.0F), new Vector3f(), new Matrix4f()); GpuTextureView colorTexture = Minecraft.getInstance().getMainRenderTarget().getColorTextureView(); GpuTextureView depthTexture = Minecraft.getInstance().getMainRenderTarget().getDepthTextureView(); @@ -139,7 +146,7 @@ public void renderTopSkyGradientDisc() { } public void renderCloudCoverDisc(LevelRenderState levelRenderState, PoseStack poseStack) { - int color = levelRenderState.getRenderDataOrDefault(AetherIIDimensionRenderers.DATA_CLOUD_COVER_COLOR_KEY, 0); + int color = levelRenderState.getRenderDataOrDefault(AetherIIDimensionRenderers.DATA_CLOUD_COVER_COLOR_KEY, AetherIIEnvironmentAttributes.CLOUD_COVER_COLOR.get().defaultValue()); Vector3f colorVec = ARGB.vector3fFromRGB24(color); poseStack.pushPose(); diff --git a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java index 5907e73260..7074f38e48 100644 --- a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java +++ b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java @@ -19,6 +19,8 @@ public class AetherIIEnvironmentAttributes { public static final DeferredRegister> ENVIRONMENT_ATTRIBUTES = DeferredRegister.create(Registries.ENVIRONMENT_ATTRIBUTE, AetherII.MODID); public static final DeferredHolder, EnvironmentAttribute> AETHER_GRASS_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/aether_grass_color", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0xb5ffd0).spatiallyInterpolated().syncable().build()); + public static final DeferredHolder, EnvironmentAttribute> BASE_SKY_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/base_sky_color", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0xC2C0E0).spatiallyInterpolated().syncable().build()); + public static final DeferredHolder, EnvironmentAttribute> TOP_SKY_GRADIENT_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/top_sky_gradient_color", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0x8A81CB).spatiallyInterpolated().syncable().build()); public static final DeferredHolder, EnvironmentAttribute> CLOUD_COVER_COLOR = ENVIRONMENT_ATTRIBUTES.register("visual/cloud_color_cover", () -> EnvironmentAttribute.builder(AttributeTypes.RGB_COLOR).defaultValue(0).spatiallyInterpolated().syncable().build()); public static class Weather { From 3ca4a00ec26311bb7adb2ca238d6972ccf417747 Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 16 Aug 2026 16:20:19 -0700 Subject: [PATCH 4/5] improv: make time and weather modify new sky color variables --- .../aether_ii/timeline/holy_isles_day.json | 42 +++++++++++++++++++ .../registries/AetherIITimelines.java | 16 +++++++ .../world/AetherIIEnvironmentAttributes.java | 4 ++ 3 files changed, 62 insertions(+) diff --git a/src/generated/resources/data/aether_ii/timeline/holy_isles_day.json b/src/generated/resources/data/aether_ii/timeline/holy_isles_day.json index f0ed82327d..57ecaefbbb 100644 --- a/src/generated/resources/data/aether_ii/timeline/holy_isles_day.json +++ b/src/generated/resources/data/aether_ii/timeline/holy_isles_day.json @@ -2,6 +2,27 @@ "clock": "minecraft:overworld", "period_ticks": 24000, "tracks": { + "aether_ii:visual/base_sky_color": { + "keyframes": [ + { + "ticks": 133, + "value": "#ffffff" + }, + { + "ticks": 11867, + "value": "#ffffff" + }, + { + "ticks": 13670, + "value": "#000000" + }, + { + "ticks": 22330, + "value": "#000000" + } + ], + "modifier": "multiply" + }, "aether_ii:visual/cloud_color_cover": { "keyframes": [ { @@ -134,6 +155,27 @@ } ] }, + "aether_ii:visual/top_sky_gradient_color": { + "keyframes": [ + { + "ticks": 133, + "value": "#ffffff" + }, + { + "ticks": 11867, + "value": "#ffffff" + }, + { + "ticks": 13670, + "value": "#000000" + }, + { + "ticks": 22330, + "value": "#000000" + } + ], + "modifier": "multiply" + }, "minecraft:audio/firefly_bush_sounds": { "keyframes": [ { diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIITimelines.java b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIITimelines.java index 4b7233074f..e3d3f70656 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIITimelines.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIITimelines.java @@ -69,6 +69,22 @@ public static void bootstrap(BootstrapContext context) { .addKeyframe(11867, -1) .addKeyframe(13670, -16777216) .addKeyframe(22330, -16777216) + ).addModifierTrack( + AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), + ColorModifier.MULTIPLY_RGB, + track -> track + .addKeyframe(133, -1) + .addKeyframe(11867, -1) + .addKeyframe(13670, -16777216) + .addKeyframe(22330, -16777216) + ).addModifierTrack( + AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), + ColorModifier.MULTIPLY_RGB, + track -> track + .addKeyframe(133, -1) + .addKeyframe(11867, -1) + .addKeyframe(13670, -16777216) + .addKeyframe(22330, -16777216) ).addModifierTrack( EnvironmentAttributes.SKY_LIGHT_COLOR, ColorModifier.MULTIPLY_RGB, diff --git a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java index 7074f38e48..752a3716f8 100644 --- a/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java +++ b/src/main/java/com/aetherteam/aetherii/world/AetherIIEnvironmentAttributes.java @@ -25,9 +25,13 @@ public class AetherIIEnvironmentAttributes { public static class Weather { public static final EnvironmentAttributeMap RAIN = EnvironmentAttributeMap.builder() + .modify(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), ColorModifier.BLEND_TO_GRAY, new ColorModifier.BlendToGray(0.6F, 0.75F)) + .modify(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), ColorModifier.BLEND_TO_GRAY, new ColorModifier.BlendToGray(0.6F, 0.75F)) .modify(AetherIIEnvironmentAttributes.CLOUD_COVER_COLOR.get(), ColorModifier.MULTIPLY_RGB, ARGB.colorFromFloat(1.0F, 0.76F, 0.77F, 0.92F)) .build(); public static final EnvironmentAttributeMap THUNDER = EnvironmentAttributeMap.builder() + .modify(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), ColorModifier.BLEND_TO_GRAY, new ColorModifier.BlendToGray(0.24F, 0.94F)) + .modify(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), ColorModifier.BLEND_TO_GRAY, new ColorModifier.BlendToGray(0.24F, 0.94F)) .modify(AetherIIEnvironmentAttributes.CLOUD_COVER_COLOR.get(), ColorModifier.MULTIPLY_RGB, ARGB.colorFromFloat(1.0F, 0.29F, 0.29F, 0.38F)) .build(); private static final Set> WEATHER_ATTRIBUTES = Sets.union(RAIN.keySet(), THUNDER.keySet()); From 7d18212a347dc1b9a80af1aa5b83265ed799bfcf Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 16 Aug 2026 16:23:34 -0700 Subject: [PATCH 5/5] improv: implement defaults into biome builders for later editing --- .../aether_ii/worldgen/biome/battleground_wastes.json | 2 ++ .../aether_ii/worldgen/biome/contaminated_jungle.json | 2 ++ .../data/aether_ii/worldgen/biome/enduring_woodland.json | 2 ++ .../resources/data/aether_ii/worldgen/biome/expanse.json | 2 ++ .../data/aether_ii/worldgen/biome/flourishing_field.json | 2 ++ .../data/aether_ii/worldgen/biome/frigid_sierra.json | 2 ++ .../data/aether_ii/worldgen/biome/frozen_lakes.json | 2 ++ .../data/aether_ii/worldgen/biome/glistening_swamp.json | 2 ++ .../data/aether_ii/worldgen/biome/hestveil_caverns.json | 2 ++ .../data/aether_ii/worldgen/biome/magnetic_scar.json | 2 ++ .../data/aether_ii/worldgen/biome/sheer_tundra.json | 2 ++ .../data/aether_ii/worldgen/biome/shimmering_basin.json | 2 ++ .../data/aether_ii/worldgen/biome/shrouded_forest.json | 2 ++ .../data/aether_ii/worldgen/biome/turquoise_forest.json | 2 ++ .../data/aether_ii/worldgen/biome/verdant_woods.json | 2 ++ .../data/aether_ii/worldgen/biome/violet_highwoods.json | 2 ++ .../worldgen/holyisles/HolyIslesBiomeBuilders.java | 8 ++++++++ 17 files changed, 40 insertions(+) diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json b/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json index ed77b680df..cf05d5e333 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/battleground_wastes.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#ffdd99", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json b/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json index e50c05a39c..8b3659fca0 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/contaminated_jungle.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#ffdd99", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json b/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json index 3de4c26757..8bb69b6356 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/enduring_woodland.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#bdf9ff", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json b/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json index 03c7f86292..301117604d 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/expanse.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json b/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json index 45e91fb4d1..9c5ef31c31 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/flourishing_field.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json b/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json index d36c7ed511..5c8bd94ef0 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/frigid_sierra.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#bdf9ff", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json b/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json index 4a92e09ac2..428f576ba2 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/frozen_lakes.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#bdf9ff", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json b/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json index 049846edb9..7621a8aa84 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/glistening_swamp.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#c9ffd1", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json b/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json index 91d0a85af2..22f4bbf0b9 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/hestveil_caverns.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json b/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json index 3854fa7882..49e091ba02 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/magnetic_scar.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#c9ffd1", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json b/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json index 3ab5c0a318..d328f69a95 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/sheer_tundra.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#bdf9ff", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json b/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json index c4dd338e14..1f29c12c23 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/shimmering_basin.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json b/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json index 90483a9468..1f4faaa49c 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/shrouded_forest.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json b/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json index 3a72501251..caeabf5dcd 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/turquoise_forest.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#c9ffd1", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json b/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json index 218f0ad5dc..7bac2cd0d4 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/verdant_woods.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#b5ffd0", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json b/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json index 6efd19e7c9..29565898ca 100644 --- a/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json +++ b/src/generated/resources/data/aether_ii/worldgen/biome/violet_highwoods.json @@ -1,6 +1,8 @@ { "attributes": { "aether_ii:visual/aether_grass_color": "#c9ffd1", + "aether_ii:visual/base_sky_color": "#c2c0e0", + "aether_ii:visual/top_sky_gradient_color": "#8a81cb", "minecraft:audio/background_music": { "default": { "max_delay": 10800, diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java b/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java index e6b4b846a6..cae9361fe1 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/builders/worldgen/holyisles/HolyIslesBiomeBuilders.java @@ -742,6 +742,8 @@ public static Biome makeHestveilCavernsBiome(HolderGetter placedF public static Biome highfieldsDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xb5ffd0) + .setAttribute(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), 0xC2C0E0) + .setAttribute(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), 0x8A81CB) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xecebfc) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xc9d1ff) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x55708a) @@ -761,6 +763,8 @@ public static Biome highfieldsDefinition(boolean precipitation, float temperatur public static Biome magneticDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xc9ffd1) + .setAttribute(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), 0xC2C0E0) + .setAttribute(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), 0x8A81CB) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xedeef5) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xc5cbeb) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x607496) @@ -780,6 +784,8 @@ public static Biome magneticDefinition(boolean precipitation, float temperature, public static Biome arcticDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xbdf9ff) + .setAttribute(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), 0xC2C0E0) + .setAttribute(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), 0x8A81CB) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xf3f0ff) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xe7e3fc) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0x3e5082) @@ -799,6 +805,8 @@ public static Biome arcticDefinition(boolean precipitation, float temperature, f public static Biome irradiatedDefinition(boolean precipitation, float temperature, float downfall, BiomeSpecialEffects effects, MobSpawnSettings spawnSettings, BiomeGenerationSettings generationSettings, Biome.TemperatureModifier temperatureModifier) { return new Biome.BiomeBuilder() .setAttribute(AetherIIEnvironmentAttributes.AETHER_GRASS_COLOR.get(), 0xffdd99) + .setAttribute(AetherIIEnvironmentAttributes.BASE_SKY_COLOR.get(), 0xC2C0E0) + .setAttribute(AetherIIEnvironmentAttributes.TOP_SKY_GRADIENT_COLOR.get(), 0x8A81CB) .setAttribute(EnvironmentAttributes.FOG_COLOR, 0xF0E8BE) .setAttribute(EnvironmentAttributes.SKY_COLOR, 0xfcebc5) .setAttribute(EnvironmentAttributes.WATER_FOG_COLOR, 0xbccc81)