Added LimboSkyProperties

This commit is contained in:
Waterpicker 2021-10-08 06:58:05 -05:00
parent 9d8d428a2d
commit 33652eb881
4 changed files with 26 additions and 3 deletions

View file

@ -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() {

View file

@ -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;
}
}

View file

@ -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<Identifier, SkyProperties> getIdMap() {
throw new AssertionError();
}
}

View file

@ -35,7 +35,8 @@
"client.InGameHudMixin",
"client.PostProcessShaderMixin",
"client.WorldRendererMixin",
"client.accessor.RenderLayerAccessor"
"client.accessor.RenderLayerAccessor",
"client.accessor.SkyPropertiesAccessor"
],
"injectors": {
"defaultRequire": 1