diff --git a/src/main/java/org/dimdev/dimdoors/client/DimensionalDoorsClientInitializer.java b/src/main/java/org/dimdev/dimdoors/client/DimensionalDoorsClientInitializer.java index 4bf20be6..efaa9921 100644 --- a/src/main/java/org/dimdev/dimdoors/client/DimensionalDoorsClientInitializer.java +++ b/src/main/java/org/dimdev/dimdoors/client/DimensionalDoorsClientInitializer.java @@ -11,6 +11,7 @@ import org.dimdev.dimdoors.client.ModEntityModelLayers; import org.dimdev.dimdoors.client.ModSkyRendering; import org.dimdev.dimdoors.entity.ModEntityTypes; import org.dimdev.dimdoors.fluid.ModFluids; +import org.dimdev.dimdoors.mixin.client.accessor.SkyPropertiesAccessor; import org.dimdev.dimdoors.network.client.ExtendedClientPlayNetworkHandler; import org.dimdev.dimdoors.particle.ModParticleTypes; @@ -18,6 +19,7 @@ import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry; +import org.dimdev.dimdoors.world.ModDimensions; @Environment(EnvType.CLIENT) public class DimensionalDoorsClientInitializer implements ClientModInitializer { @@ -36,6 +38,8 @@ public class DimensionalDoorsClientInitializer implements ClientModInitializer { ModParticleTypes.initClient(); registerListeners(); + + SkyPropertiesAccessor.getIdMap().put(ModDimensions.LIMBO_TYPE_KEY.getValue(), new LimboSkyProperties()); } private void registerListeners() { diff --git a/src/main/java/org/dimdev/dimdoors/client/LimboSkyProperties.java b/src/main/java/org/dimdev/dimdoors/client/LimboSkyProperties.java index 9c52f065..0381ed43 100644 --- a/src/main/java/org/dimdev/dimdoors/client/LimboSkyProperties.java +++ b/src/main/java/org/dimdev/dimdoors/client/LimboSkyProperties.java @@ -8,7 +8,7 @@ import net.minecraft.util.math.Vec3d; @Environment(EnvType.CLIENT) public class LimboSkyProperties extends SkyProperties { public LimboSkyProperties() { - super(Float.NaN, true, SkyType.NORMAL, true, true); + super(Float.NaN, true, SkyType.NONE, false, true); } @Override @@ -18,6 +18,6 @@ public class LimboSkyProperties extends SkyProperties { @Override public boolean useThickFog(int camX, int camY) { - return false; + return true; } } diff --git a/src/main/java/org/dimdev/dimdoors/mixin/client/accessor/SkyPropertiesAccessor.java b/src/main/java/org/dimdev/dimdoors/mixin/client/accessor/SkyPropertiesAccessor.java new file mode 100644 index 00000000..90f2630b --- /dev/null +++ b/src/main/java/org/dimdev/dimdoors/mixin/client/accessor/SkyPropertiesAccessor.java @@ -0,0 +1,18 @@ +package org.dimdev.dimdoors.mixin.client.accessor; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import net.minecraft.client.render.SkyProperties; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.RegistryKey; +import net.minecraft.world.biome.Biome; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(SkyProperties.class) +public interface SkyPropertiesAccessor { + @Accessor("BY_IDENTIFIER") + static Object2ObjectMap getIdMap() { + throw new AssertionError(); + } +} diff --git a/src/main/resources/dimdoors.mixins.json b/src/main/resources/dimdoors.mixins.json index cd933762..199fa842 100644 --- a/src/main/resources/dimdoors.mixins.json +++ b/src/main/resources/dimdoors.mixins.json @@ -35,7 +35,8 @@ "client.InGameHudMixin", "client.PostProcessShaderMixin", "client.WorldRendererMixin", - "client.accessor.RenderLayerAccessor" + "client.accessor.RenderLayerAccessor", + "client.accessor.SkyPropertiesAccessor" ], "injectors": { "defaultRequire": 1