Added LimboSkyProperties
This commit is contained in:
parent
9d8d428a2d
commit
33652eb881
4 changed files with 26 additions and 3 deletions
|
@ -11,6 +11,7 @@ import org.dimdev.dimdoors.client.ModEntityModelLayers;
|
||||||
import org.dimdev.dimdoors.client.ModSkyRendering;
|
import org.dimdev.dimdoors.client.ModSkyRendering;
|
||||||
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
||||||
import org.dimdev.dimdoors.fluid.ModFluids;
|
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.network.client.ExtendedClientPlayNetworkHandler;
|
||||||
import org.dimdev.dimdoors.particle.ModParticleTypes;
|
import org.dimdev.dimdoors.particle.ModParticleTypes;
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ import net.fabricmc.api.ClientModInitializer;
|
||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
|
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
|
||||||
|
import org.dimdev.dimdoors.world.ModDimensions;
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
public class DimensionalDoorsClientInitializer implements ClientModInitializer {
|
public class DimensionalDoorsClientInitializer implements ClientModInitializer {
|
||||||
|
@ -36,6 +38,8 @@ public class DimensionalDoorsClientInitializer implements ClientModInitializer {
|
||||||
ModParticleTypes.initClient();
|
ModParticleTypes.initClient();
|
||||||
|
|
||||||
registerListeners();
|
registerListeners();
|
||||||
|
|
||||||
|
SkyPropertiesAccessor.getIdMap().put(ModDimensions.LIMBO_TYPE_KEY.getValue(), new LimboSkyProperties());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerListeners() {
|
private void registerListeners() {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.math.Vec3d;
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
public class LimboSkyProperties extends SkyProperties {
|
public class LimboSkyProperties extends SkyProperties {
|
||||||
public LimboSkyProperties() {
|
public LimboSkyProperties() {
|
||||||
super(Float.NaN, true, SkyType.NORMAL, true, true);
|
super(Float.NaN, true, SkyType.NONE, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -18,6 +18,6 @@ public class LimboSkyProperties extends SkyProperties {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean useThickFog(int camX, int camY) {
|
public boolean useThickFog(int camX, int camY) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,7 +35,8 @@
|
||||||
"client.InGameHudMixin",
|
"client.InGameHudMixin",
|
||||||
"client.PostProcessShaderMixin",
|
"client.PostProcessShaderMixin",
|
||||||
"client.WorldRendererMixin",
|
"client.WorldRendererMixin",
|
||||||
"client.accessor.RenderLayerAccessor"
|
"client.accessor.RenderLayerAccessor",
|
||||||
|
"client.accessor.SkyPropertiesAccessor"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|
Loading…
Reference in a new issue