#✅ | Anchors are dark magic

1 messages · Page 1 of 1 (latest)

wind dragon
#

Every time i try and anchor this background to the essentials paperdoll. every time i resize the window it gets messed up and everything i anchor it to doesnt change the sizing + position to be correct

cedar masonBOT
# wind dragon Every time i try and anchor this background to the essentials paperdoll. every t...

Anchors themselves aren’t magic, but they do work relative to the anchor point you pick, so if you anchor your background to the Essentials paperdoll element and then resize the window, the background will keep the distance to that anchor—but it won’t magically scale with the body unless you intentionally handle that in the layout.

What you probably want is to:

  1. Make sure both the paperdoll and the background are connected to the same anchor point (for example the top-left corner of the screen or the paperdoll itself). You can do that by dragging the element over the target anchor while holding it—this keeps their positions relative.
  2. If the background should always follow the paperdoll even when its size changes, enable Sticky Anchors on the background. That keeps the distance constant even if the anchor’s size shifts.
  3. For window resizing, consider forcing a GUI scale or enabling auto-scaling for that screen so Minecraft doesn’t stretch things unpredictably. Right-click the editor background and use GUI Scale / Auto-Scaling to keep the layout stable.
  4. If you need the background to stretch or shrink, you can also switch it to Advanced Sizing/Positioning and use placeholders (see the Advanced Positioning & Sizing doc) so you respond to guiwidth/guiheight.

More on how anchors and element positioning behave is in the Positioning Elements page—give that a read to ensure your anchor choices match the behavior you expect.

wind dragon
cedar masonBOT
# wind dragon the paperdoll is connected to vanilla and the background is set to the paperdoll...

Ah, got it—since the paperdoll is a vanilla element, its anchor is locked to the vanilla widget system, so moving it breaks anything you’ve attached. The trick is to avoid re-anchoring the paperdoll itself. Instead:

  1. Leave the paperdoll anchored where Minecraft already places it.
  2. Anchor the background (or any other custom element) to the paperdoll by dragging the background over the paperdoll until it “snaps” to that anchor—this keeps the background aligned without touching the vanilla anchor.
  3. If you need the background to stretch with window size changes, enable Sticky Anchors or use Advanced Positioning plus placeholders (guiwidth/guiheight) so it reacts smoothly when the window resizes.
  4. If resizing still looks off, consider forcing a GUI scale or enabling auto-scaling for that screen via the editor background menu so elements stay stable.

You can read more about how anchors work and how to keep custom elements synced with vanilla ones on the Positioning Elements page—especially the part about anchoring to other elements. Let me know if you want a step-by-step for Sticky Anchors or placeholder math!