Removed Darkness Effect (toggleable)
All checks were successful
build / build (push) Successful in 1m19s
All checks were successful
build / build (push) Successful in 1m19s
This commit is contained in:
@ -42,8 +42,11 @@ As a challenge I'm trying to make it as user-friendly as possible. (It ain't the
|
|||||||
- [x] Teleportation Angle Viewer for [this machine](https://www.youtube.com/watch?v=FnUE-ZaALLw)
|
- [x] Teleportation Angle Viewer for [this machine](https://www.youtube.com/watch?v=FnUE-ZaALLw)
|
||||||

|

|
||||||
- [x] Removed game fog (lava, water, etc.)
|
- [x] Removed game fog (lava, water, etc.)
|
||||||
- [ ] Made it toggleable
|
- [x] All types individually toggleable
|
||||||
- [ ] Mod Menu integration
|
- [x] Mod Menu integration
|
||||||
|
- [x] Automatic config adaption (currently booleans only)
|
||||||
|
- [x] Removed darkness effect
|
||||||
|
- [x] Toggleable
|
||||||
|
|
||||||
# Features to come
|
# Features to come
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package wtf.hak.survivalfabric;
|
|||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import wtf.hak.survivalfabric.config.client.ClientConfigManager;
|
import wtf.hak.survivalfabric.config.client.ClientConfigManager;
|
||||||
import wtf.hak.survivalfabric.features.AngleViewer;
|
import wtf.hak.survivalfabric.features.AngleViewer;
|
||||||
|
import wtf.hak.survivalfabric.features.RemoveDarknessEffect;
|
||||||
|
|
||||||
public class SurvivalFabricClient implements ClientModInitializer {
|
public class SurvivalFabricClient implements ClientModInitializer {
|
||||||
|
|
||||||
@ -10,5 +11,6 @@ public class SurvivalFabricClient implements ClientModInitializer {
|
|||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
ClientConfigManager.getConfig();
|
ClientConfigManager.getConfig();
|
||||||
AngleViewer.register();
|
AngleViewer.register();
|
||||||
|
RemoveDarknessEffect.register();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,4 +9,5 @@ public class ClientConfig {
|
|||||||
public boolean renderLavaFog = false;
|
public boolean renderLavaFog = false;
|
||||||
public boolean renderWaterFog = false;
|
public boolean renderWaterFog = false;
|
||||||
public boolean renderSnowFog = false;
|
public boolean renderSnowFog = false;
|
||||||
|
public boolean removeDarknessEffect = true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package wtf.hak.survivalfabric.features;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
|
import wtf.hak.survivalfabric.config.client.ClientConfigManager;
|
||||||
|
|
||||||
|
public class RemoveDarknessEffect {
|
||||||
|
|
||||||
|
public static void register() {
|
||||||
|
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||||
|
if(client.player != null && ClientConfigManager.getConfig().removeDarknessEffect){
|
||||||
|
StatusEffectInstance darknessEffect = client.player.getStatusEffect(StatusEffects.DARKNESS);
|
||||||
|
if(darknessEffect != null)
|
||||||
|
client.player.removeStatusEffect(darknessEffect.getEffectType());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user