diff --git a/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/PageElement.java b/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/PageElement.java index b7aea805..040f0343 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/PageElement.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/PageElement.java @@ -145,13 +145,14 @@ interface PageElement extends Drawable { record Stack (DynamicContent.Page page, IngredientWithSpell ingredient, Bounds bounds) implements PageElement { @Override public void compile(int y, IViewRoot container) { + int xx = 0, yy = 0; if (container instanceof SpellbookScreen book) { - bounds().left = book.getX(); - bounds().top = book.getY(); + xx = book.getX(); + yy = book.getY(); } IngredientTree tree = new IngredientTree( - bounds().left + page().getBounds().left, - bounds().top + page().getBounds().top + y + 10, + bounds().left + xx + page().getBounds().left, + bounds().top + yy + page().getBounds().top + y + 10, 30 ); tree.input(ingredient.getMatchingStacks());