# Resource Pack Overrides Every texture Lectern uses on the client is a normal resource-loader sprite, so any Minecraft resource pack can replace it. Drop your override into the matching path inside the pack and the client will pick it up on the next pack reload. --- ## Announcement Toasts The announcement toast (triggered server-side via `IUIManager.showToast`) draws at **162×70**, vertically centered at the **15% line of the screen height** (top-center), with a pop-in / pop-out animation. The backdrop is a **256×256 atlas** using the FancyToasts layout — *not* the vanilla Minecraft toast sprite. ### 1. The default backdrop atlas The bundled default is the FancyToasts "vanilla" preset, shipped at: ``` assets/lectern/textures/toast/vanilla.png ``` To restyle every Lectern toast with one pack, ship a replacement at the same path. Image format: **PNG, 256×256, RGBA**. Larger sizes (512×512, 1024×1024) are downsampled cleanly. ### Atlas layout Your replacement PNG must follow the same UV layout the renderer reads from. All measurements in atlas pixels: | Region | UV origin (u, v) | Size | Drawn at | Purpose | |---|---|---|---|---| | Body | `(0, 0)` | `162 × 40` | `(0, 20)` | Background panel below the banner | | Banner | `(0, 40)` | `162 × 14` | `(0, 5)` | Stripe across the top of the toast | | Plaque | `(0, 108)` | `9 × 14` | `(144, 56)` | Small badge bottom-right | | Icon frame | `(0, 82)` | `26 × 26` | `(68, 0)` | Frame around the centered item icon | Pixels outside these regions in the atlas are unused — feel free to leave them blank or use them for your own variants and reference the same atlas in custom backdrop calls. > [!info] This layout matches the FancyToasts mod's "task" colorway. The other rows on a FancyToasts-format atlas (banner rows at v=54 / v=68, frame columns at u=26 / u=52) are reserved for future banner-variant support; Lectern currently always uses the row at v=40 and column at u=0. ### 2. Per-toast custom backdrops The server can also send a `backdrop` field with its own atlas path: ```java Toast.withBackdrop("Welcome!", "Server joined.", "minecraft:diamond", "lectern:textures/toast/welcome.png"); ``` Place the matching file at: ``` assets/lectern/textures/toast/welcome.png ``` Same **256×256 atlas layout** as above. Servers may use any namespace — `assets/<my-server>/textures/toast/foo.png` works with `"<my-server>:textures/toast/foo.png"` as the `backdrop` value. ### 3. Toast icons (texture-path mode) The `icon` field accepts either an item ID (`minecraft:diamond`) or a texture path. Texture-path icons follow the standard resource-loader resolution and are drawn at **16×16** inside the icon frame at `(73, 5)` on the toast. ``` assets/<namespace>/textures/... ``` --- ## Animation + Position The pop-in / pop-out animation and the top-anchored position are built into the client — they are *not* resource-pack features and there is no JSON to override. The timeline: | Phase | Duration | Effect | |---|---|---| | Pop-in | 220 ms | Scale 0.6 → 1.0 (ease-out cubic), opacity 0 → 1, slide-down from −16 px | | Hold | duration − 440 ms | Static at 15% screen-height, horizontally centered | | Pop-out | 220 ms | Scale 1.0 → 0.9, opacity 1 → 0 | Total duration defaults to **5000 ms** and is overridable per-toast via the `displayTimeMs` field on the API. --- ## Other Lectern textures These follow the same resource-pack rules. Use a pack to restyle them server-wide. | Asset | Default path | Notes | |---|---|---| | Toast icon presets | `assets/lectern/textures/toast/icons/{looking,success}.png` | 16×16 source PNGs. | | Explosion shockwave ring | `assets/lectern/textures/particle/explosion_shockwave.png` | 64×64 ring sprite, white-on-transparent (the effect tints in code). | | Explosion spark | `assets/lectern/textures/particle/explosion_spark.png` | 16×16 radial dot. | | Explosion smoke | `assets/lectern/textures/particle/explosion_smoke.png` | 32×32 radial blob. | --- ## Reloading After dropping new files into your pack, run: ``` /reloadclient ``` or use Minecraft's `F3 + T` shortcut to reload all client resources. Lectern textures pick up changes immediately — no restart needed. --- ## Related - [[Configuration]] - [[Overview]]