Skip to content

Commit

Permalink
no fire overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
freebonsai committed Apr 28, 2024
1 parent 5fd0b7d commit 1fe5b1b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import net.minecraft.client.renderer.GlStateManager
import net.minecraft.network.play.server.S2APacketParticles
import net.minecraft.util.EnumParticleTypes
import net.minecraft.util.Vec3
import net.minecraftforge.client.event.EntityViewRenderEvent
import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.client.event.*
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

object NoDebuff : Module(
Expand All @@ -23,6 +22,7 @@ object NoDebuff : Module(
private val antiPortal: Boolean by BooleanSetting("No Portal Effect", false, description = "Disables the nether portal overlay.")
private val noShieldParticles: Boolean by BooleanSetting("No Shield Particle", false, description = "Removes purple particles and wither impact hearts.")
private val antiWaterFOV: Boolean by BooleanSetting("No Water FOV", false, description = "Disable FOV change in water.")
private val noFire: Boolean by BooleanSetting("No Fire Overlay", false, description = "Disable Fire overlay on screen.")

@SubscribeEvent
fun onRenderFog(event: EntityViewRenderEvent.FogDensity) {
Expand Down Expand Up @@ -55,6 +55,11 @@ object NoDebuff : Module(
@SubscribeEvent
fun onFOV(event: EntityViewRenderEvent.FOVModifier) {
if (!antiWaterFOV || event.block.material != Material.water) return
event.fov = event.fov * 70F / 60F
event.fov *= 70F / 60F
}

@SubscribeEvent
fun onFire(event: RenderBlockOverlayEvent) {
if (event.overlayType == RenderBlockOverlayEvent.OverlayType.FIRE && noFire) event.isCanceled = true
}
}

0 comments on commit 1fe5b1b

Please sign in to comment.