Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +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,
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/aetherteam/aetherii/AetherII.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import net.neoforged.neoforge.client.event.RegisterCustomEnvironmentEffectRendererEvent;

public class AetherIIDimensionRenderers {
public static final ContextKey<Integer> DATA_BASE_SKY_COLOR_KEY = new ContextKey<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "base_sky_color"));
public static final ContextKey<Integer> DATA_TOP_SKY_GRADIENT_COLOR_KEY = new ContextKey<>(Identifier.fromNamespaceAndPath(AetherII.MODID, "top_sky_gradient_color"));
public static final ContextKey<Integer> 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");
Expand All @@ -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)));
}
}
Expand Down
Loading