mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fix formatting being lost when wrapping text
- move page headers outside the scrollable area, - fix text cut off at the bottom of the scroll region
This commit is contained in:
parent
a36aa10085
commit
e85bb4b3a5
12 changed files with 141 additions and 95 deletions
|
@ -2,7 +2,6 @@ package com.minelittlepony.unicopia.client.gui;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntFunction;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.TextHandler;
|
||||
|
@ -31,12 +30,18 @@ public class ParagraphWrappingVisitor implements StyledVisitor<Object> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Optional<Object> accept(Style style, String s) {
|
||||
public Optional<Object> accept(Style initialStyle, String s) {
|
||||
StyleBreakingVisitor visitor = new StyleBreakingVisitor(initialStyle, this::acceptFragment);
|
||||
TextVisitFactory.visitFormatted(s, 0, initialStyle, initialStyle, visitor);
|
||||
visitor.flush();
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
private Optional<Object> acceptFragment(Style inlineStyle, String s) {
|
||||
int remainingLength = (int)(pageWidth - currentLineCollectedLength);
|
||||
|
||||
while (!s.isEmpty()) {
|
||||
int trimmedLength = handler.getTrimmedLength(s, remainingLength, style);
|
||||
int trimmedLength = handler.getTrimmedLength(s, remainingLength, inlineStyle);
|
||||
int newline = s.indexOf('\n');
|
||||
|
||||
if (newline >= 0 && newline < trimmedLength) {
|
||||
|
@ -57,7 +62,7 @@ public class ParagraphWrappingVisitor implements StyledVisitor<Object> {
|
|||
trimmedLength = lastSpace > 0 ? Math.min(lastSpace, trimmedLength) : trimmedLength;
|
||||
}
|
||||
|
||||
Text fragment = Text.literal(s.substring(0, trimmedLength).trim()).setStyle(style);
|
||||
Text fragment = Text.literal(s.substring(0, trimmedLength).trim()).setStyle(inlineStyle);
|
||||
float grabbedWidth = handler.getWidth(fragment);
|
||||
|
||||
// advance if appending the next segment would cause an overflow
|
||||
|
@ -101,14 +106,42 @@ public class ParagraphWrappingVisitor implements StyledVisitor<Object> {
|
|||
}
|
||||
|
||||
public void advance() {
|
||||
line++;
|
||||
if (progressedNonEmpty || currentLineCollectedLength > 0) {
|
||||
progressedNonEmpty = true;
|
||||
lineConsumer.accept(currentLine, (++line) * font.fontHeight);
|
||||
lineConsumer.accept(currentLine, line * font.fontHeight);
|
||||
}
|
||||
pageWidth = widthSupplier.applyAsInt((++line) * font.fontHeight);
|
||||
pageWidth = widthSupplier.applyAsInt(line * font.fontHeight);
|
||||
currentLine = Text.empty();
|
||||
currentLineCollectedLength = 0;
|
||||
}
|
||||
|
||||
record StyledString (String string, Style style) {}
|
||||
static final class StyleBreakingVisitor implements CharacterVisitor {
|
||||
private final StyledVisitor<?> fragmentVisitor;
|
||||
private final StringBuilder collectedText = new StringBuilder();
|
||||
|
||||
private Style currentStyle;
|
||||
|
||||
public StyleBreakingVisitor(Style initialStyle, StyledVisitor<?> fragmentVisitor) {
|
||||
this.currentStyle = initialStyle;
|
||||
this.fragmentVisitor = fragmentVisitor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(int index, Style style, int codepoint) {
|
||||
if (!style.equals(currentStyle)) {
|
||||
flush();
|
||||
}
|
||||
currentStyle = style;
|
||||
collectedText.append((char)codepoint);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void flush() {
|
||||
if (collectedText.length() > 0) {
|
||||
fragmentVisitor.accept(currentStyle, collectedText.toString());
|
||||
collectedText.setLength(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -139,6 +139,19 @@ public class DynamicContent implements Content {
|
|||
compiled = false;
|
||||
}
|
||||
|
||||
public void drawHeader(DrawContext context, int mouseX, int mouseY) {
|
||||
|
||||
if (elements.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
boolean needsMoreXp = level < 0 || Pony.of(MinecraftClient.getInstance().player).getLevel().get() < level;
|
||||
int x = bounds.left;
|
||||
int y = bounds.top - 16;
|
||||
|
||||
DrawableUtil.drawScaledText(context, needsMoreXp ? UNKNOWN : title, x, y, 1.3F, headerColor);
|
||||
DrawableUtil.drawScaledText(context, Text.translatable("gui.unicopia.spellbook.page.level_requirement", level < 0 ? "???" : "" + (level + 1)).formatted(Formatting.DARK_GREEN), x, y + 12, 0.8F, headerColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(DrawContext context, int mouseX, int mouseY, IViewRoot container) {
|
||||
|
||||
|
@ -149,25 +162,24 @@ public class DynamicContent implements Content {
|
|||
if (!compiled) {
|
||||
compiled = true;
|
||||
int relativeY = 0;
|
||||
int textHeight = 0;
|
||||
for (PageElement element : elements.stream().filter(PageElement::isInline).toList()) {
|
||||
element.compile(relativeY, container);
|
||||
relativeY += element.bounds().height;
|
||||
if (element instanceof TextBlock) {
|
||||
textHeight += element.bounds().height;
|
||||
}
|
||||
}
|
||||
bounds.height = relativeY;
|
||||
bounds.height = textHeight == 0 ? 0 : relativeY;
|
||||
}
|
||||
|
||||
boolean needsMoreXp = level < 0 || Pony.of(MinecraftClient.getInstance().player).getLevel().get() < level;
|
||||
|
||||
MatrixStack matrices = context.getMatrices();
|
||||
DrawableUtil.drawScaledText(context, needsMoreXp ? UNKNOWN : title, bounds.left, bounds.top - 10, 1.3F, headerColor);
|
||||
DrawableUtil.drawScaledText(context, Text.translatable("gui.unicopia.spellbook.page.level_requirement", level < 0 ? "???" : "" + (level + 1)).formatted(Formatting.DARK_GREEN), bounds.left, bounds.top - 10 + 12, 0.8F, headerColor);
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(0, 16, 0);
|
||||
matrices.translate(0, -8, 0);
|
||||
elements.stream().filter(PageElement::isFloating).forEach(element -> {
|
||||
Bounds bounds = element.bounds();
|
||||
matrices.push();
|
||||
bounds.translate(matrices);
|
||||
element.bounds().translate(matrices);
|
||||
element.draw(context, mouseX, mouseY, container);
|
||||
matrices.pop();
|
||||
});
|
||||
|
|
|
@ -24,15 +24,16 @@ class Panel extends ScrollContainer {
|
|||
getContentPadding().top = 15;
|
||||
page = content.getPage(pageIndex);
|
||||
|
||||
margin.left = screen.getX() + 30;
|
||||
margin.top = screen.getY() + 15;
|
||||
margin.right = screen.width - screen.getBackgroundWidth() - screen.getX() + 20;
|
||||
int width = screen.getBackgroundWidth() / 2;
|
||||
margin.top = screen.getY() + 35;
|
||||
margin.bottom = screen.height - screen.getBackgroundHeight() - screen.getY() + 40;
|
||||
margin.left = screen.getX() + 30;
|
||||
|
||||
if (pageIndex % 2 == 1) {
|
||||
margin.left += screen.getBackgroundWidth() / 2 - 10;
|
||||
margin.left += screen.getBackgroundWidth() / 2 - 20;
|
||||
margin.right = screen.getX() + 20;
|
||||
} else {
|
||||
margin.right += screen.getBackgroundWidth() / 2;
|
||||
margin.right = screen.width - width - margin.left + 30;
|
||||
}
|
||||
init(() -> {});
|
||||
screen.addDrawable(this);
|
||||
|
@ -63,4 +64,15 @@ class Panel extends ScrollContainer {
|
|||
|
||||
@Override
|
||||
protected void drawDecorations(DrawContext context, int mouseX, int mouseY, float partialTicks) { }
|
||||
|
||||
@Override
|
||||
protected void drawOverlays(DrawContext context, int mouseX, int mouseY, float partialTicks) {
|
||||
context.getMatrices().push();
|
||||
this.getBounds().translate(context.getMatrices());
|
||||
page.ifPresent(p -> {
|
||||
p.drawHeader(context, mouseX, mouseY);
|
||||
});
|
||||
context.getMatrices().pop();
|
||||
super.drawOverlays(context, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ import com.minelittlepony.common.client.gui.IViewRoot;
|
|||
import com.minelittlepony.common.client.gui.dimension.Bounds;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.crafting.SpellbookRecipe;
|
||||
import com.minelittlepony.unicopia.client.gui.spellbook.IngredientTree;
|
||||
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookScreen;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
@ -13,18 +12,14 @@ import net.minecraft.util.Identifier;
|
|||
record Recipe (DynamicContent.Page page, Identifier id, Bounds bounds) implements PageElement {
|
||||
@Override
|
||||
public void compile(int y, IViewRoot container) {
|
||||
if (container instanceof SpellbookScreen book) {
|
||||
bounds().left = book.getX();
|
||||
bounds().top = book.getY();
|
||||
}
|
||||
MinecraftClient.getInstance().world.getRecipeManager().get(id).ifPresent(recipe -> {
|
||||
if (recipe instanceof SpellbookRecipe spellRecipe) {
|
||||
|
||||
boolean needsMoreXp = page.getLevel() < 0 || Pony.of(MinecraftClient.getInstance().player).getLevel().get() < page.getLevel();
|
||||
|
||||
IngredientTree tree = new IngredientTree(
|
||||
bounds().left + page().getBounds().left,
|
||||
bounds().top + page().getBounds().top + y + 10,
|
||||
bounds().left,
|
||||
bounds().top + y - 10,
|
||||
page().getBounds().width - 20
|
||||
).obfuscateResult(needsMoreXp);
|
||||
spellRecipe.buildCraftingTree(tree);
|
||||
|
|
|
@ -4,19 +4,13 @@ import com.minelittlepony.common.client.gui.IViewRoot;
|
|||
import com.minelittlepony.common.client.gui.dimension.Bounds;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.crafting.IngredientWithSpell;
|
||||
import com.minelittlepony.unicopia.client.gui.spellbook.IngredientTree;
|
||||
import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookScreen;
|
||||
|
||||
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) {
|
||||
xx = book.getX();
|
||||
yy = book.getY();
|
||||
}
|
||||
IngredientTree tree = new IngredientTree(
|
||||
bounds().left + xx + page().getBounds().left,
|
||||
bounds().top + yy + page().getBounds().top + y + 10,
|
||||
bounds().left + page().getBounds().left,
|
||||
bounds().top + page().getBounds().top + y - 10,
|
||||
30
|
||||
);
|
||||
tree.input(ingredient.getMatchingStacks());
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.air.p1.title",
|
||||
"level": 1,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/air_magic.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/air_magic.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -45,8 +45,8 @@
|
|||
"gui.unicopia.spellbook.chapter.air.p4.1.body",
|
||||
"gui.unicopia.spellbook.chapter.air.p4.2.body",
|
||||
"gui.unicopia.spellbook.chapter.air.p4.3.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -65,8 +65,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.air.catapult.1.body",
|
||||
"gui.unicopia.spellbook.chapter.air.catapult.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -91,8 +91,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.air.bubble.1.body",
|
||||
"gui.unicopia.spellbook.chapter.air.bubble.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/water.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/water.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -149,8 +149,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.air.feather_fall.1.body",
|
||||
"gui.unicopia.spellbook.chapter.air.feather_fall.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.artefacts.p1.title",
|
||||
"level": 0,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/crystal_heart.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/crystal_heart.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.dark_magic.p1.title",
|
||||
"level": 10,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -43,8 +43,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.vortex.1.body",
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.vortex.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/knowledge.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/air.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/knowledge.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -150,8 +150,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.transformation.1.body",
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.transformation.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/life.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/life.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -175,8 +175,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.reveal.1.body",
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.reveal.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -247,8 +247,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.arcane_protection.1.body",
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.arcane_protection.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -273,8 +273,8 @@
|
|||
"level": 17,
|
||||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.displacement.1.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -311,8 +311,8 @@
|
|||
"level": 17,
|
||||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.mimic.1.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -373,8 +373,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.dark_magic.p28.1.body",
|
||||
"gui.unicopia.spellbook.author1.name",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/kindness.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/kindness.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.fire.p1.title",
|
||||
"level": 0,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/fire_magic.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/fire_magic.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -27,8 +27,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.fire.scorch.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.scorch.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/fire.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/fire.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -50,8 +50,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.fire.flame.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.flame.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/fire.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/fire.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -85,8 +85,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.fire.p6.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.p6.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/focus.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/focus.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -114,8 +114,8 @@
|
|||
"gui.unicopia.spellbook.chapter.fire.fire_bolt.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.fire_bolt.2.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.fire_bolt.3.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/focus.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/focus.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -140,8 +140,8 @@
|
|||
"gui.unicopia.spellbook.chapter.fire.p10.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.p10.2.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.p10.3.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/strength.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/fire.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/strength.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -208,7 +208,7 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.fire.shield.1.body",
|
||||
"gui.unicopia.spellbook.chapter.fire.shield.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/strength.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/strength.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.ice.p1.title",
|
||||
"level": 0,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/ice_magic.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/ice_magic.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -27,8 +27,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.ice.frost.1.body",
|
||||
"gui.unicopia.spellbook.chapter.ice.frost.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "minecraft:textures/item/snowball.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "minecraft:textures/item/snowball.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -50,8 +50,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.ice.p4.1.body",
|
||||
"gui.unicopia.spellbook.chapter.ice.p4.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "minecraft:textures/item/oak_boat.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "minecraft:textures/item/oak_boat.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -109,8 +109,8 @@
|
|||
{ "count": 15, "trait": "unicopia:ice" }
|
||||
]
|
||||
},
|
||||
{ "x": 115, "y": -20, "width": 32, "height": 32, "texture": "minecraft:textures/item/snowball.png" },
|
||||
{ "x": 115, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
{ "x": 115, "y": -10, "width": 32, "height": 32, "texture": "minecraft:textures/item/snowball.png" },
|
||||
{ "x": 115, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -129,8 +129,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.ice.light.1.body",
|
||||
"gui.unicopia.spellbook.chapter.ice.light.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "minecraft:textures/item/light.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "minecraft:textures/item/light.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -274,8 +274,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.ice.hydrophobic.1.body",
|
||||
"gui.unicopia.spellbook.chapter.ice.hydrophobic.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/strength.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/strength.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/ice.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.introduction.p8.title",
|
||||
"level": 1,
|
||||
"elements": [
|
||||
{ "x": 127, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/item/botched_gem.png" },
|
||||
{ "x": 127, "y": 0, "width": 32, "height": 32, "texture": "unicopia:textures/item/botched_gem.png" },
|
||||
"gui.unicopia.spellbook.chapter.introduction.p8.1.body",
|
||||
"gui.unicopia.spellbook.chapter.introduction.p8.2.body",
|
||||
"gui.unicopia.spellbook.chapter.introduction.p8.3.body"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"title": "gui.unicopia.spellbook.chapter.otherworldly.p1.title",
|
||||
"level": 10,
|
||||
"elements": [
|
||||
{ "x": 15, "y": 0, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/the_otherworldly.png" }
|
||||
{ "x": 15, "y": -10, "width": 128, "height": 128, "texture": "unicopia:textures/gui/container/pages/the_otherworldly.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -25,8 +25,8 @@
|
|||
"level": 20,
|
||||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.siphoning.1.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/darkness.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/blood.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/darkness.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/blood.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -50,8 +50,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.necromancy.1.body",
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.necromancy.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/darkness.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/blood.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/darkness.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/blood.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -79,8 +79,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.dark_vortex.1.body",
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.dark_vortex.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/chaos.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/chaos.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/darkness.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -106,8 +106,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.portal.1.body",
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.portal.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/trait/knowledge.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -133,8 +133,8 @@
|
|||
"elements": [
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.mind_swap.1.body",
|
||||
"gui.unicopia.spellbook.chapter.otherworldly.mind_swap.2.body",
|
||||
{ "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
{ "x": 125, "y": -10, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" },
|
||||
{ "x": 125, "y": -10, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/chaos.png" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue