From 4b7e6b6cf4463799ae787f6a154d16372af04d95 Mon Sep 17 00:00:00 2001 From: Jack Papel Date: Mon, 7 Feb 2022 21:31:17 -0800 Subject: [PATCH] Remove shadowy skies --- .../aether/client/rendering/util/AetherMapColorUtil.java | 6 +++++- .../java/net/id/aether/mixin/item/FilledMapMixin.java | 9 ++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/id/aether/client/rendering/util/AetherMapColorUtil.java b/src/main/java/net/id/aether/client/rendering/util/AetherMapColorUtil.java index 9cb70e2c5..598d510b6 100644 --- a/src/main/java/net/id/aether/client/rendering/util/AetherMapColorUtil.java +++ b/src/main/java/net/id/aether/client/rendering/util/AetherMapColorUtil.java @@ -2,17 +2,21 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.id.aether.util.MapColorCreator; import net.minecraft.block.MapColor; @Environment(EnvType.CLIENT) public class AetherMapColorUtil { + public static final MapColor AETHER_BACKGROUND = MapColorCreator.createMapColor(62, 0xe3fffd); + public static int getColor(MapColor material, int shade) { int newColor = recolor(material.id) == -1 ? material.color : recolor(material.id); int value = 220; // From here on out, standard brightness and color calculations. - if (shade == 3) value = 135; + if (material == AETHER_BACKGROUND) value = 220; + else if (shade == 3) value = 135; else if (shade == 2) value = 255; else if (shade == 1) value = 220; else if (shade == 0) value = 180; diff --git a/src/main/java/net/id/aether/mixin/item/FilledMapMixin.java b/src/main/java/net/id/aether/mixin/item/FilledMapMixin.java index 66fb31e6c..a1dd479a7 100644 --- a/src/main/java/net/id/aether/mixin/item/FilledMapMixin.java +++ b/src/main/java/net/id/aether/mixin/item/FilledMapMixin.java @@ -1,6 +1,6 @@ package net.id.aether.mixin.item; -import net.id.aether.util.MapColorCreator; +import net.id.aether.client.rendering.util.AetherMapColorUtil; import net.id.aether.world.dimension.AetherDimension; import net.minecraft.block.*; import net.minecraft.item.FilledMapItem; @@ -9,17 +9,12 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Slice; @Mixin(FilledMapItem.class) public abstract class FilledMapMixin { - - @Unique - private final MapColor AETHER_BACKGROUND = MapColorCreator.createMapColor(62, 0xe3fffd); - /** * Changes the color of the aether void to a pleasant blue. * @author Jack Papel @@ -40,7 +35,7 @@ public abstract class FilledMapMixin { private MapColor fixAetherVoidColor(BlockState instance, BlockView world, BlockPos pos) { if (((World) world).getRegistryKey().equals(AetherDimension.AETHER_WORLD_KEY) && pos.equals(Vec3i.ZERO) && !world.getBlockState(pos).isOf(Blocks.BEDROCK)){ - return AETHER_BACKGROUND; + return AetherMapColorUtil.AETHER_BACKGROUND; } else return instance.getMapColor(world, pos); }