EffectiveScreenEffects

Client-side screen effects: full-screen camera fades and camera shake.

The fade is drawn with a bundled full-screen glyph shown via a title, so it needs the framework's resource pack enabled. Shake nudges the player's yaw/pitch over time with configurable easing.

A built-in /escreen <target> <fade|shake> … command triggers these effects in-game.

Types

Link copied to clipboard

Easing curve for camera shake intensity over its duration.

Properties

Link copied to clipboard

ru.hukm.effectiveSpigot.minecraft.resourcepack.EffectiveFontChar token bound to the full-screen fade texture in the resource pack.

Functions

Link copied to clipboard
fun runCameraFade(player: Player)

Plays a default full-screen fade (10/20/10 ticks) for player.

fun runCameraFade(player: Player, fadeIn: Int, stay: Int, fadeOut: Int)

Plays a full-screen fade with the given fade-in/stay/fade-out durations (in ticks).

fun runCameraFade(player: Player, fadeIn: Int, stay: Int, fadeOut: Int, fullCameraFadeRunnable: Runnable?)

Plays a full-screen fade and runs fullCameraFadeRunnable at the darkest point (after fadeIn + stay/2 ticks) — handy for teleporting/updating the world while hidden.

Link copied to clipboard
fun runCameraShake(player: Player, intensity: Float, duration: Int, type: EffectiveScreenEffects.ShakeType = ShakeType.CONSTANT)

Shakes player's camera at intensity for duration ticks with the given easing type.

fun runCameraShake(player: Player, intensity: Float, type: EffectiveScreenEffects.ShakeType = ShakeType.CONSTANT, shouldContinue: () -> Boolean)

Shakes player's camera indefinitely while shouldContinue returns true.

fun runCameraShake(player: Player, intensity: Float, duration: Int = -1, type: EffectiveScreenEffects.ShakeType = ShakeType.CONSTANT, shouldContinue: () -> Boolean? = null)

Shakes player's camera. Runs for duration ticks (-1 = until shouldContinue returns false).