Fixed limbo sky color and made vignette stronger in limbo
Changes to be committed: new file: src/main/java/org/dimdev/dimdoors/mixin/InGameHudMixin.java modified: src/main/java/org/dimdev/dimdoors/world/limbo/LimboBiome.java modified: src/main/resources/dimdoors.mixins.json
This commit is contained in:
parent
76e3c0ddb2
commit
43e8c1eb2c
3 changed files with 37 additions and 0 deletions
25
src/main/java/org/dimdev/dimdoors/mixin/InGameHudMixin.java
Normal file
25
src/main/java/org/dimdev/dimdoors/mixin/InGameHudMixin.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import org.dimdev.dimdoors.world.limbo.LimboBiome;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.gui.hud.InGameHud;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Mixin(InGameHud.class)
|
||||
public class InGameHudMixin {
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;getTextureManager()Lnet/minecraft/client/texture/TextureManager;"), method = "renderVignetteOverlay(Lnet/minecraft/entity/Entity;)V")
|
||||
public void renderVignetteOverlay(Entity entity, CallbackInfo info) {
|
||||
if(entity.getEntityWorld().getBiome(entity.getBlockPos()) instanceof LimboBiome) {
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package org.dimdev.dimdoors.world.limbo;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
||||
|
@ -10,6 +12,9 @@ import net.minecraft.world.biome.BiomeEffects;
|
|||
import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
public class LimboBiome extends Biome {
|
||||
public LimboBiome() {
|
||||
super(new Biome.Settings()
|
||||
|
@ -39,4 +44,10 @@ public class LimboBiome extends Biome {
|
|||
.noises(ImmutableList.of(new Biome.MixedNoisePoint(0.0F, 0.0F, 0.0F, -0.5F, 1.0F))));
|
||||
this.addSpawn(SpawnGroup.MONSTER, new Biome.SpawnEntry(ModEntityTypes.MONOLITH, 1, 0, 1));
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override
|
||||
public int getSkyColor() {
|
||||
return 0x404040;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"package": "org.dimdev.dimdoors.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"InGameHudMixin"
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue