background field on a root advancement controls what is drawn behind the advancement tree in the tab panel. In this version it is a plain resource location string, exactly as vanilla Minecraft expects. On top of that, Custom Advancements adds three optional display fields — largeBackground, shouldBgClip, and bgRatio — that switch the mod’s own renderer on and control how your image fills the panel.
background
string
required
Resource location of the texture drawn behind the advancement tree, in You can point at three kinds of texture:
namespace:path format including the file extension.- Your own image, placed in
customadvancements/data/textures/. It is registered ascustomadvancements:textures/<filename>— the filename must match exactly, including the extension. See Textures. - A vanilla texture, e.g.
minecraft:textures/gui/advancements/backgrounds/stone.png. - Any texture registered by another mod, using that mod’s namespace.
The mod only warns about a missing texture when the namespace is
customadvancements and no matching file was found in the textures folder. Resource locations in other namespaces are passed straight to Minecraft’s resource manager, so a typo there fails silently as a missing-texture placeholder rather than a log warning.[INSERT IMAGE: A root advancement tab showing the default tiled vanilla stone background for comparison]
largeBackground
boolean
default:"false"
The master switch for the mod’s own background renderer.When
false (the default), Minecraft renders the background the vanilla way: the texture is tiled across the panel at 16×16 pixel intervals. This looks correct for small, seamless patterns like the vanilla stone.png, and wrong for artwork or screenshots.When true, Custom Advancements takes over and draws the texture once, scaled to fill the entire tab panel instead of repeating it. Use this for any full-size background image.[INSERT IMAGE: The same tab with largeBackground set to true, showing the image drawn once across the whole panel instead of tiled]
shouldBgClip
boolean
default:"false"
Controls how the image is fitted to the panel when
largeBackground is true.When false, the image is stretched to the panel’s exact width and height. Nothing is cropped, but an image whose proportions differ from the panel will look distorted.When true, the image is scaled to the panel width while keeping the proportions given by bgRatio, then vertically centered and cropped to the panel height. Nothing is distorted, but the top and bottom of a tall image are trimmed away.[INSERT IMAGE: Side-by-side comparison of the same background with shouldBgClip false (stretched) and true (proportional, cropped)]
bgRatio
float
default:"1.0"
The aspect ratio of your image, expressed as width divided by height. It is used only when both Common values:
largeBackground and shouldBgClip are true, where it tells the renderer how tall the image is relative to the panel width so it can crop correctly.Setting a value that does not match your image’s real proportions is what causes a clipped background to look squashed or to crop more than you expect — divide the pixel width by the pixel height and use the result.
Worked Example
Theroot.json file shipped with the mod uses all four fields together. It points at the bundled screenshot.png, enables the mod renderer, and clips proportionally using the screenshot’s real aspect ratio.
root.json
largeBackground: true draws it once across the whole panel rather than tiling it; shouldBgClip: true keeps its proportions and crops the overflow; and bgRatio: 1.7208029197 is the screenshot’s own width-to-height ratio, so the crop lands where it should. Because the root completes on the first tick, show_toast and announce_to_chat are both false to keep it silent.
Placing Custom Texture Files
When you use your own image, place the file insidecustomadvancements/data/textures/. A file at customadvancements/data/textures/my_background.png is referenced as customadvancements:textures/my_background.png in the background field.
See Textures for supported file formats, naming rules, and sizing guidance.