Framework layer (0.10.7+)
From 0.10.7+, conduit-fx grew from three legacy helpers into a presentation
framework. This page documents the framework-layer classes, the ones without a
dedicated page. Everything here lives under me.zlex.conduit.fx,
me.zlex.conduit.fx.anim, me.zlex.conduit.fx.hud, and me.zlex.conduit.fx.menu.
Titles, me.zlex.conduit.fx.Titles
Section titled “Titles, me.zlex.conduit.fx.Titles”Title / subtitle / action-bar packets for one player or a whole collection.
package me.zlex.conduit.fx;
public final class Titles { // Single player public static void show(ServerPlayer player, Component title, @Nullable Component subtitle, int fadeIn, int stay, int fadeOut); public static void show(ServerPlayer player, Component title, @Nullable Component subtitle); public static void show(ServerPlayer player, Component title); public static void actionBar(ServerPlayer player, Component text); public static void clear(ServerPlayer player);
// Collection public static void show(Collection<ServerPlayer> players, Component title, @Nullable Component subtitle, int fadeIn, int stay, int fadeOut); public static void show(Collection<ServerPlayer> players, Component title, @Nullable Component subtitle); public static void actionBar(Collection<ServerPlayer> players, Component text); public static void clear(Collection<ServerPlayer> players);}Sidebar, me.zlex.conduit.fx.Sidebar
Section titled “Sidebar, me.zlex.conduit.fx.Sidebar”A transient per-player scoreboard sidebar. It builds an Objective that is
never registered on the server scoreboard and ships it straight down each
player’s connection, so two lobbies running their own sidebars never collide.
package me.zlex.conduit.fx;
public final class Sidebar { public static void show(ServerPlayer player, String title, List<String> lines); public static void hide(ServerPlayer player); public static boolean isShowing(ServerPlayer player); public static void forget(UUID id); // engine-internal disconnect cleanup}isShowing(ServerPlayer)is handy for conditional update logic: skip a re-showif nothing changed.forget(UUID)is registered as aPlayerLifecycle.onLeavehandler byConduitFxMod; you normally don’t call it.- The per-player objective name is
cdt_sb_<up-to-8 hex of the UUID hashCode>, at most 15 chars, under the 16-char vanilla limit.
StartCountdown, me.zlex.conduit.fx.StartCountdown
Section titled “StartCountdown, me.zlex.conduit.fx.StartCountdown”A server-tick-driven lobby start countdown. Unlike chat.Countdown (which you
tick yourself), StartCountdown registers its own tick driver and fires
onComplete when the count reaches zero.
package me.zlex.conduit.fx;
public final class StartCountdown { public static void begin(MinecraftServer server, Collection<ServerPlayer> players, int seconds, Runnable onComplete);}Particles, me.zlex.conduit.fx.Particles
Section titled “Particles, me.zlex.conduit.fx.Particles”Low-level particle emission: bursts, rings, and per-player puffs.
package me.zlex.conduit.fx;
public final class Particles { public static void burst(ServerLevel level, Vec3 pos, ParticleOptions particle, int count, double spread); public static void ring(ServerLevel level, Vec3 center, double radius, int points, ParticleOptions particle); public static void puffAt(ServerPlayer player, ParticleOptions particle); public static void eliminationPuff(ServerPlayer player); public static void safeSparkle(ServerPlayer player);}FxPresets, me.zlex.conduit.fx.FxPresets
Section titled “FxPresets, me.zlex.conduit.fx.FxPresets”Composed, ready-to-use particle presets built on Particles.
package me.zlex.conduit.fx;
public final class FxPresets { public static void confetti(ServerLevel level, Vec3 pos); public static void winBurst(ServerLevel level, Vec3 center); public static void ringPulse(ServerLevel level, Vec3 center, double radius, ParticleOptions particle, int pulses);}SoundKit, me.zlex.conduit.fx.SoundKit
Section titled “SoundKit, me.zlex.conduit.fx.SoundKit”A UI sound palette for menus and HUD interactions. Distinct from Effects,
which covers round-event audio.
package me.zlex.conduit.fx;
public final class SoundKit { public static void confirm(ServerPlayer p); // note-block pling public static void deny(ServerPlayer p); // note-block bass (low) public static void select(ServerPlayer p); // note-block hat public static void open(ServerPlayer p); // note-block bell public static void close(ServerPlayer p); // note-block bass public static void eliminate(ServerPlayer p); // wither hurt public static void win(Collection<ServerPlayer> ps); public static void countdownTick(Collection<ServerPlayer> ps, int secondsLeft);}countdownTick(ps, secondsLeft) raises pitch as secondsLeft approaches zero;
secondsLeft <= 0 is the final “go” accent.
FxTimeline, me.zlex.conduit.fx.FxTimeline
Section titled “FxTimeline, me.zlex.conduit.fx.FxTimeline”A tick-scheduled FX sequencer. Build a sequence, then start() to register it
on the server tick loop.
package me.zlex.conduit.fx;
public final class FxTimeline { public static FxTimeline create(MinecraftServer server); public FxTimeline at(int tickOffset, Runnable run); // schedule at absolute tick public FxTimeline after(int delta, Runnable run); // schedule relative to a moving cursor public FxTimeline repeat(int every, int times, Runnable run); public void start();}EffectThrottle, me.zlex.conduit.fx.EffectThrottle
Section titled “EffectThrottle, me.zlex.conduit.fx.EffectThrottle”A per-key cooldown gate so spammy effects (hit flashes, particle puffs) don’t fire every tick.
package me.zlex.conduit.fx;
public final class EffectThrottle { public EffectThrottle(long cooldownMs); public boolean allow(Object key); // true if past cooldown (and arms it) public void run(Object key, Runnable effect); // runs effect only if allowed public void reset(Object key); public void clear();}ScoreBoardBinding, me.zlex.conduit.fx.ScoreBoardBinding
Section titled “ScoreBoardBinding, me.zlex.conduit.fx.ScoreBoardBinding”A live sidebar bound to a Supplier<List<String>>, call refresh() to re-pull
the lines and push them to the audience.
package me.zlex.conduit.fx;
public final class ScoreBoardBinding { public static ScoreBoardBinding attach(String title, Supplier<List<String>> lines, Collection<ServerPlayer> audience); public void refresh(); public void addViewer(ServerPlayer player); public void clear();}AchievementToast, me.zlex.conduit.fx.AchievementToast
Section titled “AchievementToast, me.zlex.conduit.fx.AchievementToast”The default presentation for conduit-core’s Achievements registry, a gold
toast plus chime. install() wires the handler (called by ConduitFxMod);
show(...) presents one directly.
package me.zlex.conduit.fx;
public final class AchievementToast { public static void show(ServerPlayer player, Achievement ach); // me.zlex.conduit.achievement.Achievement public static void install();}Tween / Ease / FloatConsumer, me.zlex.conduit.fx.anim
Section titled “Tween / Ease / FloatConsumer, me.zlex.conduit.fx.anim”The motion primitives behind transitions, toasts, and progress bars. Tween
runs on the engine Scheduler, applying an Ease curve and invoking
onUpdate each tick with the current value, then onDone once.
package me.zlex.conduit.fx.anim;
public final class Tween { public static Tween of(float from, float to, int durationTicks, Ease ease); public Tween onUpdate(FloatConsumer cb); public Tween onDone(Runnable cb); public Tween start(); public void cancel();}
@FunctionalInterfacepublic interface FloatConsumer { void accept(float value);}
public enum Ease { LINEAR, OUT_QUAD, OUT_CUBIC, IN_OUT_QUAD, OUT_BACK, OUT_ELASTIC, OUT_BOUNCE; public float apply(float t); // input clamped to [0,1] public float lerp(float a, float b, float t);}import me.zlex.conduit.fx.anim.Tween;import me.zlex.conduit.fx.anim.Ease;import me.zlex.conduit.fx.SoundKit;
Tween.of(0f, 1f, 6, Ease.OUT_CUBIC) // 6-tick (~0.3s) fade-in .onUpdate(a -> screen.setAlpha(a)) .onDone(() -> SoundKit.confirm(player)) // confirm(ServerPlayer) .start();Hud, me.zlex.conduit.fx.hud.Hud
Section titled “Hud, me.zlex.conduit.fx.hud.Hud”A high-level HUD facade composing the lower-level helpers, a bossbar countdown, a role-reveal title, and a sidebar.
package me.zlex.conduit.fx.hud;
public final class Hud { public static void countdownBar(List<ServerPlayer> players, int seconds, String titleMarkup); public static void countdownBar(List<ServerPlayer> players, int seconds, String titleMarkup, Runnable onComplete); public static void roleReveal(ServerPlayer player, Component title, Component subtitle); public static void roleReveal(List<ServerPlayer> players, Component title, Component subtitle); public static void sidebar(ServerPlayer player, String header, List<String> lines);}DebugOverlay, me.zlex.conduit.fx.hud.DebugOverlay
Section titled “DebugOverlay, me.zlex.conduit.fx.hud.DebugOverlay”A toggleable per-player overlay of named debug lines.
package me.zlex.conduit.fx.hud;
public final class DebugOverlay { public static void toggle(ServerPlayer player); public static void line(String name, Supplier<String> value);}Leaderboard, me.zlex.conduit.fx.hud.Leaderboard
Section titled “Leaderboard, me.zlex.conduit.fx.hud.Leaderboard”A world-anchored top-N hologram driven from conduit-render’s ProfileStore.
package me.zlex.conduit.fx.hud;
public final class Leaderboard { public static void show(MinecraftServer server, ResourceKey<Level> dimension, int id, Vec3 pos, Vec3 normal, String statKey, String title, int n); public static void hide(MinecraftServer server, int id);}The dimension is a ResourceKey<Level> (in the on-demand instance model these
are keys like conduit:rt-N), and id is a caller-chosen stable label id.
Menu, me.zlex.conduit.fx.menu.Menu
Section titled “Menu, me.zlex.conduit.fx.menu.Menu”A world-anchored button menu rendered through conduit-render’s screen system.
Build with the fluent API, then openFor(player) anchors the panel in front of
the player’s eye.
package me.zlex.conduit.fx.menu;
public final class Menu { public static Menu create(String title); // premium theme public static Menu create(String title, Theme theme); // me.zlex.conduit.screen.ui.Theme public Menu size(float w, float h); // panel size in world blocks public Menu distance(float blocks); // anchor distance from the eye public Menu onClose(Consumer<ServerPlayer> cb); public Menu button(String label, Consumer<ButtonSpec> spec); public void openFor(ServerPlayer player); public static void closeFor(ServerPlayer player);
public static final class ButtonSpec { public ButtonSpec primary(); public ButtonSpec danger(); public ButtonSpec icon(String textureId); public ButtonSpec onClick(Consumer<ServerPlayer> handler); }}import me.zlex.conduit.fx.menu.Menu;
Menu.create("Choose your kit") .size(3.4f, 2.8f) .distance(2.3f) .button("Archer", b -> b.primary().icon("conduit:icon/bow").onClick(p -> giveArcherKit(p))) .button("Cancel", b -> b.danger().onClick(p -> Menu.closeFor(p))) .onClose(p -> SoundKit.close(p)) .openFor(player);