Compare commits
3 Commits
cfccdd9b36
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c5db5baee | |||
| c85906aa49 | |||
| efb1b98868 |
@@ -16,6 +16,8 @@ out
|
||||
# gradle
|
||||
build
|
||||
.gradle
|
||||
.gradle-user-home
|
||||
mcmodsrepo
|
||||
|
||||
# other
|
||||
eclipse
|
||||
|
||||
+5
-5
@@ -135,19 +135,19 @@ repositories {
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
implementation fg.deobf("net.fretux.mindmotion:mindmotion:${mindmotion_version}")
|
||||
implementation fg.deobf("curse.maven:mind-motion-1386864:${mindmotion_file_id}")
|
||||
|
||||
// Skill Engine is an Ascend addon, so include it in development runs without
|
||||
// creating a circular mandatory dependency from Ascend back to Skill Engine.
|
||||
// Skill Engine is an Ascend addon, so include the locally published artifact
|
||||
// in development runs without creating a circular mandatory dependency.
|
||||
runtimeOnly fg.deobf("net.fretux.skillengine:SkillEngine:${skillengine_version}")
|
||||
|
||||
// Current Iron's Spellbooks releases are distributed through Curse Maven.
|
||||
compileOnly fg.deobf("curse.maven:irons-spells-n-spellbooks-855414:${irons_spells_file_id}")
|
||||
|
||||
// GECKOLIB — deobfuscated, full mod
|
||||
// GECKOLIB - deobfuscated, full mod
|
||||
implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${geckolib_version}")
|
||||
|
||||
// PLAYER ANIMATOR — deobf
|
||||
// PLAYER ANIMATOR - deobf
|
||||
implementation fg.deobf("dev.kosmx.player-anim:player-animation-lib-forge:${player_animator_version}")
|
||||
|
||||
// CAELUS
|
||||
|
||||
+3
-2
@@ -22,8 +22,9 @@ loader_version_range=[47,)
|
||||
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
|
||||
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
|
||||
#
|
||||
mindmotion_version=1.4.5
|
||||
skillengine_version=1.4.14
|
||||
mindmotion_version=1.4.7
|
||||
mindmotion_file_id=8726482
|
||||
skillengine_version=1.4.9
|
||||
irons_spells_version=1.20.1-3.16.2
|
||||
irons_spells_file_id=8364933
|
||||
caelus_version=3.2.0+1.20.1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.fretux.ascend.client.screen;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.fretux.ascend.compat.AscendMMCompat;
|
||||
import net.fretux.ascend.network.PacketHandler;
|
||||
import net.fretux.ascend.network.ServerboundShrineChoicePacket;
|
||||
import net.fretux.ascend.player.PlayerStatsProvider;
|
||||
@@ -11,12 +12,21 @@ import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
public class ShrineScreen extends Screen {
|
||||
private static final int WIDTH = 360;
|
||||
private static final int HEIGHT = 220;
|
||||
private static final int PADDING = 12;
|
||||
private static final int BACKGROUND = 0xFF121316;
|
||||
private static final int PANEL = 0xFF1C1E22;
|
||||
private static final int CARD = 0xFF25272D;
|
||||
private static final int BORDER = 0xFF45484F;
|
||||
private static final int PRIMARY_TEXT = 0xFFE4E4E4;
|
||||
private static final int SECONDARY_TEXT = 0xFF999DA5;
|
||||
private static final int ACCENT = 0xFFAAB6C2;
|
||||
private static final int PROGRESS = 0xFFD1A744;
|
||||
|
||||
private static final int WIDTH = 260;
|
||||
private static final int HEIGHT = 200;
|
||||
|
||||
private int leftPos;
|
||||
private int topPos;
|
||||
private float uiScale = 1.0F;
|
||||
private int uiLeft;
|
||||
private int uiTop;
|
||||
|
||||
private int dialogueStage = 0; // 0 = intro, 1 = offer, 2 = confirm
|
||||
private int playerKnowledge = 0;
|
||||
@@ -36,8 +46,10 @@ public class ShrineScreen extends Screen {
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
this.leftPos = (this.width - WIDTH) / 2;
|
||||
this.topPos = (this.height - HEIGHT) / 2;
|
||||
uiScale = Math.min(1.0F, Math.min((width - 12.0F) / WIDTH, (height - 12.0F) / HEIGHT));
|
||||
uiScale = Math.max(0.25F, uiScale);
|
||||
uiLeft = Math.round((width - WIDTH * uiScale) / 2.0F);
|
||||
uiTop = Math.round((height - HEIGHT * uiScale) / 2.0F);
|
||||
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.player != null) {
|
||||
@@ -50,126 +62,139 @@ public class ShrineScreen extends Screen {
|
||||
}
|
||||
|
||||
private void updateButtons() {
|
||||
this.clearWidgets();
|
||||
int buttonY = topPos + 85;
|
||||
clearWidgets();
|
||||
|
||||
// ESSENCE MODE — skip all dialogue, go straight to options
|
||||
if (essenceMode) {
|
||||
addRenderableWidget(Button.builder(Component.literal("FORGET"), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("forget"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, buttonY, WIDTH - 40, 20).build());
|
||||
|
||||
int y = buttonY + 25;
|
||||
|
||||
addRenderableWidget(Button.builder(Component.literal("UNDERSTAND"), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("understand"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build());
|
||||
y += 25;
|
||||
|
||||
addRenderableWidget(Button.builder(Component.literal("REST"), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("rest"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build());
|
||||
y += 25;
|
||||
|
||||
addRenderableWidget(Button.builder(Component.literal("LEAVE"), (btn) -> {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build());
|
||||
|
||||
addChoiceButton("FORGET", 84, () -> choose("forget"));
|
||||
addChoiceButton("UNDERSTAND", 109, () -> choose("understand"));
|
||||
addChoiceButton("REST", 134, () -> choose("rest"));
|
||||
addChoiceButton("LEAVE", 159, this::closeScreen);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (dialogueStage) {
|
||||
case 0 -> { // Intro
|
||||
Button engageButton = Button.builder(Component.literal("I WISH TO ENGAGE IN A DEAL."), (btn) -> {
|
||||
case 0 -> {
|
||||
addChoiceButton("I WISH TO ENGAGE IN A DEAL.", 104, () -> {
|
||||
dialogueStage = 1;
|
||||
updateButtons();
|
||||
}).bounds(leftPos + 20, buttonY, WIDTH - 40, 20).build();
|
||||
|
||||
Button leaveButton = Button.builder(Component.literal("LEAVE."), (btn) -> {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, buttonY + 25, WIDTH - 40, 20).build();
|
||||
|
||||
addRenderableWidget(engageButton);
|
||||
addRenderableWidget(leaveButton);
|
||||
});
|
||||
addChoiceButton("LEAVE.", 129, this::closeScreen);
|
||||
}
|
||||
|
||||
case 1 -> { // Shrine explains terms
|
||||
Button agreeButton = Button.builder(Component.literal("I AGREE."), (btn) -> {
|
||||
case 1 -> {
|
||||
addChoiceButton("I AGREE.", 104, () -> {
|
||||
dialogueStage = 2;
|
||||
updateButtons();
|
||||
}).bounds(leftPos + 20, buttonY, WIDTH - 40, 20).build();
|
||||
|
||||
Button leaveButton = Button.builder(Component.literal("LEAVE."), (btn) -> {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, buttonY + 25, WIDTH - 40, 20).build();
|
||||
|
||||
addRenderableWidget(agreeButton);
|
||||
addRenderableWidget(leaveButton);
|
||||
});
|
||||
addChoiceButton("LEAVE.", 129, this::closeScreen);
|
||||
}
|
||||
|
||||
case 2 -> {
|
||||
// Existing Ascend option
|
||||
Button forgetButton = Button.builder(Component.literal("I WISH TO FORGET."), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("forget"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, buttonY, WIDTH - 40, 20).build();
|
||||
addRenderableWidget(forgetButton);
|
||||
int y = buttonY + 25;
|
||||
if (net.fretux.ascend.compat.AscendMMCompat.isMindMotionPresent()) {
|
||||
Button understandButton = Button.builder(Component.literal("I WISH TO UNDERSTAND."), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("understand"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build();
|
||||
addRenderableWidget(understandButton);
|
||||
int y = 96;
|
||||
addChoiceButton("I WISH TO FORGET.", y, () -> choose("forget"));
|
||||
y += 25;
|
||||
if (AscendMMCompat.isMindMotionPresent()) {
|
||||
addChoiceButton("I WISH TO UNDERSTAND.", y, () -> choose("understand"));
|
||||
y += 25;
|
||||
Button restButton = Button.builder(Component.literal("I WISH TO REST."), (btn) -> {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket("rest"));
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build();
|
||||
addRenderableWidget(restButton);
|
||||
addChoiceButton("I WISH TO REST.", y, () -> choose("rest"));
|
||||
y += 25;
|
||||
}
|
||||
Button leaveButton = Button.builder(Component.literal("LEAVE."), (btn) -> {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}).bounds(leftPos + 20, y, WIDTH - 40, 20).build();
|
||||
addRenderableWidget(leaveButton);
|
||||
addChoiceButton("LEAVE.", y, this::closeScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addChoiceButton(String label, int y, Runnable action) {
|
||||
addRenderableWidget(Button.builder(Component.literal(label), button -> action.run())
|
||||
.bounds(20, y, WIDTH - 40, 20)
|
||||
.build());
|
||||
}
|
||||
|
||||
private void choose(String choice) {
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundShrineChoicePacket(choice));
|
||||
closeScreen();
|
||||
}
|
||||
|
||||
private void closeScreen() {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics gui, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(gui);
|
||||
renderBackground(gui);
|
||||
|
||||
int uiMouseX = (int) toUiX(mouseX);
|
||||
int uiMouseY = (int) toUiY(mouseY);
|
||||
|
||||
gui.pose().pushPose();
|
||||
gui.pose().translate(uiLeft, uiTop, 0.0F);
|
||||
gui.pose().scale(uiScale, uiScale, 1.0F);
|
||||
|
||||
drawWindow(gui);
|
||||
gui.drawCenteredString(font, title, WIDTH / 2, 6, PRIMARY_TEXT);
|
||||
gui.drawCenteredString(font, Component.translatable("ascend.stats.knowledge", playerKnowledge),
|
||||
WIDTH / 2, 36, PROGRESS);
|
||||
drawDialogue(gui);
|
||||
|
||||
super.render(gui, uiMouseX, uiMouseY, partialTicks);
|
||||
gui.pose().popPose();
|
||||
}
|
||||
|
||||
private void drawWindow(GuiGraphics gui) {
|
||||
RenderSystem.enableBlend();
|
||||
gui.fill(leftPos - 8, topPos - 8, leftPos + WIDTH + 8, topPos + HEIGHT + 8, 0xDD0D0B14);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + HEIGHT + 4, 0xE01A1424);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + 20, 0xFF2A1F3A);
|
||||
gui.fill(leftPos - 4, topPos + 20, leftPos + WIDTH + 4, topPos + 21, 0x66FFFFFF);
|
||||
gui.fill(-6, -6, WIDTH + 6, HEIGHT + 6, 0xCC090A0C);
|
||||
gui.fill(-3, -3, WIDTH + 3, HEIGHT + 3, BORDER);
|
||||
gui.fill(0, 0, WIDTH, HEIGHT, BACKGROUND);
|
||||
gui.fill(0, 0, WIDTH, 24, PANEL);
|
||||
gui.fill(0, 24, WIDTH, 25, BORDER);
|
||||
gui.fill(PADDING, 30, WIDTH - PADDING, 54, CARD);
|
||||
gui.fill(PADDING, 54, WIDTH - PADDING, 55, BORDER);
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
|
||||
int titleColor = 0xCDA1FF;
|
||||
gui.drawCenteredString(this.font, "Shrine of Remembrance", this.width / 2, topPos + 6, 0xFFFFFF);
|
||||
|
||||
gui.drawCenteredString(this.font, "Knowledge: " + playerKnowledge, this.width / 2, topPos + 28, 0x8FEBD2);
|
||||
private void drawDialogue(GuiGraphics gui) {
|
||||
if (essenceMode) {
|
||||
drawCentered(gui, "CHOOSE WHAT TO CHANGE.", 68, ACCENT);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (dialogueStage) {
|
||||
case 0 -> {
|
||||
gui.drawCenteredString(this.font, "SPEAK, LITTLE ONE.", this.width / 2, topPos + 46, titleColor);
|
||||
gui.drawCenteredString(this.font, "WHAT IS IT YOU SEEK TO UNMAKE?", this.width / 2, topPos + 62, titleColor);
|
||||
drawCentered(gui, "SPEAK, LITTLE ONE.", 66, ACCENT);
|
||||
drawCentered(gui, "WHAT IS IT YOU SEEK TO UNMAKE?", 82, SECONDARY_TEXT);
|
||||
}
|
||||
case 1 -> {
|
||||
gui.drawCenteredString(this.font, "THE TERMS ARE AS FOLLOWS:", this.width / 2, topPos + 46, titleColor);
|
||||
gui.drawCenteredString(this.font, "I WILL CONSUME YOUR KNOWLEDGE.", this.width / 2, topPos + 62, titleColor);
|
||||
gui.drawCenteredString(this.font, "YOU WILL REAP A BENEFIT.", this.width / 2, topPos + 78, titleColor);
|
||||
}
|
||||
case 2 -> {
|
||||
gui.drawCenteredString(this.font, "SPEAK YOUR DESIRE, FOOLISH ONE.", this.width / 2, topPos + 52, titleColor);
|
||||
drawCentered(gui, "THE TERMS ARE AS FOLLOWS:", 64, ACCENT);
|
||||
drawCentered(gui, "I WILL CONSUME YOUR KNOWLEDGE.", 78, SECONDARY_TEXT);
|
||||
drawCentered(gui, "YOU WILL REAP A BENEFIT.", 92, SECONDARY_TEXT);
|
||||
}
|
||||
case 2 -> drawCentered(gui, "SPEAK YOUR DESIRE, FOOLISH ONE.", 68, ACCENT);
|
||||
}
|
||||
}
|
||||
|
||||
super.render(gui, mouseX, mouseY, partialTicks);
|
||||
private void drawCentered(GuiGraphics gui, String text, int y, int color) {
|
||||
gui.drawCenteredString(font, text, WIDTH / 2, y, color);
|
||||
}
|
||||
|
||||
private double toUiX(double mouseX) {
|
||||
return (mouseX - uiLeft) / uiScale;
|
||||
}
|
||||
|
||||
private double toUiY(double mouseY) {
|
||||
return (mouseY - uiTop) / uiScale;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
return super.mouseClicked(toUiX(mouseX), toUiY(mouseY), button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseReleased(double mouseX, double mouseY, int button) {
|
||||
return super.mouseReleased(toUiX(mouseX), toUiY(mouseY), button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) {
|
||||
return super.mouseDragged(toUiX(mouseX), toUiY(mouseY), button, dragX / uiScale, dragY / uiScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,8 +57,9 @@ public class StatsScreen extends Screen {
|
||||
|
||||
private final Minecraft minecraft = Minecraft.getInstance();
|
||||
private final Map<String, Button> plusButtons = new HashMap<>();
|
||||
private int leftPos;
|
||||
private int topPos;
|
||||
private float uiScale = 1.0F;
|
||||
private int uiLeft;
|
||||
private int uiTop;
|
||||
private String hoveredAttributeKey;
|
||||
|
||||
public StatsScreen() {
|
||||
@@ -68,8 +69,10 @@ public class StatsScreen extends Screen {
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
leftPos = (width - WIDTH) / 2;
|
||||
topPos = (height - HEIGHT) / 2;
|
||||
uiScale = Math.min(1.0F, Math.min((width - 12.0F) / WIDTH, (height - 12.0F) / HEIGHT));
|
||||
uiScale = Math.max(0.25F, uiScale);
|
||||
uiLeft = Math.round((width - WIDTH * uiScale) / 2.0F);
|
||||
uiTop = Math.round((height - HEIGHT * uiScale) / 2.0F);
|
||||
plusButtons.clear();
|
||||
clearWidgets();
|
||||
|
||||
@@ -77,8 +80,8 @@ public class StatsScreen extends Screen {
|
||||
String attribute = ATTRIBUTES[index];
|
||||
int column = index % 2;
|
||||
int row = index / 2;
|
||||
int cardX = leftPos + PADDING + column * (CARD_WIDTH + COLUMN_GAP);
|
||||
int cardY = topPos + CARDS_TOP + row * (CARD_HEIGHT + CARD_GAP);
|
||||
int cardX = PADDING + column * (CARD_WIDTH + COLUMN_GAP);
|
||||
int cardY = CARDS_TOP + row * (CARD_HEIGHT + CARD_GAP);
|
||||
Button plus = Button.builder(Component.literal("+"), button ->
|
||||
PacketHandler.INSTANCE.sendToServer(new ServerboundSpendPointPacket(attribute)))
|
||||
.bounds(cardX + CARD_WIDTH - 30, cardY + 5, 22, 18)
|
||||
@@ -88,16 +91,23 @@ public class StatsScreen extends Screen {
|
||||
}
|
||||
|
||||
addRenderableWidget(Button.builder(Component.translatable("gui.done"), button -> onClose())
|
||||
.bounds(leftPos + WIDTH / 2 - 45, topPos + HEIGHT - 24, 90, 18)
|
||||
.bounds(WIDTH / 2 - 45, HEIGHT - 24, 90, 18)
|
||||
.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) {
|
||||
renderBackground(graphics);
|
||||
drawWindow(graphics);
|
||||
hoveredAttributeKey = null;
|
||||
|
||||
int uiMouseX = (int) toUiX(mouseX);
|
||||
int uiMouseY = (int) toUiY(mouseY);
|
||||
|
||||
graphics.pose().pushPose();
|
||||
graphics.pose().translate(uiLeft, uiTop, 0.0F);
|
||||
graphics.pose().scale(uiScale, uiScale, 1.0F);
|
||||
drawWindow(graphics);
|
||||
|
||||
if (minecraft.player != null) {
|
||||
minecraft.player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> {
|
||||
drawProgression(graphics, stats.getAscendLevel(), stats.getMaxAscendLevel(),
|
||||
@@ -107,11 +117,11 @@ public class StatsScreen extends Screen {
|
||||
String attribute = ATTRIBUTES[index];
|
||||
int column = index % 2;
|
||||
int row = index / 2;
|
||||
int cardX = leftPos + PADDING + column * (CARD_WIDTH + COLUMN_GAP);
|
||||
int cardY = topPos + CARDS_TOP + row * (CARD_HEIGHT + CARD_GAP);
|
||||
int cardX = PADDING + column * (CARD_WIDTH + COLUMN_GAP);
|
||||
int cardY = CARDS_TOP + row * (CARD_HEIGHT + CARD_GAP);
|
||||
int value = stats.getAttributeLevel(attribute);
|
||||
boolean hovered = mouseX >= cardX && mouseX < cardX + CARD_WIDTH
|
||||
&& mouseY >= cardY && mouseY < cardY + CARD_HEIGHT;
|
||||
boolean hovered = uiMouseX >= cardX && uiMouseX < cardX + CARD_WIDTH
|
||||
&& uiMouseY >= cardY && uiMouseY < cardY + CARD_HEIGHT;
|
||||
drawAttributeCard(graphics, attribute, value, stats.getMaxAttributePoints(), cardX, cardY, hovered);
|
||||
if (hovered) hoveredAttributeKey = attribute;
|
||||
|
||||
@@ -126,7 +136,8 @@ public class StatsScreen extends Screen {
|
||||
});
|
||||
}
|
||||
|
||||
super.render(graphics, mouseX, mouseY, partialTicks);
|
||||
super.render(graphics, uiMouseX, uiMouseY, partialTicks);
|
||||
graphics.pose().popPose();
|
||||
if (hoveredAttributeKey != null) {
|
||||
graphics.renderTooltip(font, ATTRIBUTE_TOOLTIPS.get(hoveredAttributeKey), mouseX, mouseY);
|
||||
}
|
||||
@@ -134,20 +145,20 @@ public class StatsScreen extends Screen {
|
||||
|
||||
private void drawWindow(GuiGraphics graphics) {
|
||||
RenderSystem.enableBlend();
|
||||
graphics.fill(leftPos - 6, topPos - 6, leftPos + WIDTH + 6, topPos + HEIGHT + 6, 0xCC090A0C);
|
||||
graphics.fill(leftPos - 3, topPos - 3, leftPos + WIDTH + 3, topPos + HEIGHT + 3, BORDER);
|
||||
graphics.fill(leftPos, topPos, leftPos + WIDTH, topPos + HEIGHT, BACKGROUND);
|
||||
graphics.fill(leftPos, topPos, leftPos + WIDTH, topPos + 20, PANEL);
|
||||
graphics.fill(leftPos, topPos + 20, leftPos + WIDTH, topPos + 21, BORDER);
|
||||
graphics.fill(-6, -6, WIDTH + 6, HEIGHT + 6, 0xCC090A0C);
|
||||
graphics.fill(-3, -3, WIDTH + 3, HEIGHT + 3, BORDER);
|
||||
graphics.fill(0, 0, WIDTH, HEIGHT, BACKGROUND);
|
||||
graphics.fill(0, 0, WIDTH, 20, PANEL);
|
||||
graphics.fill(0, 20, WIDTH, 21, BORDER);
|
||||
RenderSystem.disableBlend();
|
||||
|
||||
graphics.drawCenteredString(font, title, leftPos + WIDTH / 2, topPos + 6, PRIMARY_TEXT);
|
||||
graphics.drawCenteredString(font, title, WIDTH / 2, 6, PRIMARY_TEXT);
|
||||
}
|
||||
|
||||
private void drawProgression(GuiGraphics graphics, int level, int maxLevel, int xp, int xpNext,
|
||||
int knowledge, int unspent) {
|
||||
int panelX = leftPos + PADDING;
|
||||
int panelY = topPos + 26;
|
||||
int panelX = PADDING;
|
||||
int panelY = 26;
|
||||
int panelWidth = WIDTH - PADDING * 2;
|
||||
graphics.fill(panelX, panelY, panelX + panelWidth, panelY + 45, PANEL);
|
||||
|
||||
@@ -203,4 +214,27 @@ public class StatsScreen extends Screen {
|
||||
public boolean isPauseScreen() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private double toUiX(double mouseX) {
|
||||
return (mouseX - uiLeft) / uiScale;
|
||||
}
|
||||
|
||||
private double toUiY(double mouseY) {
|
||||
return (mouseY - uiTop) / uiScale;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
return super.mouseClicked(toUiX(mouseX), toUiY(mouseY), button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseReleased(double mouseX, double mouseY, int button) {
|
||||
return super.mouseReleased(toUiX(mouseX), toUiY(mouseY), button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) {
|
||||
return super.mouseDragged(toUiX(mouseX), toUiY(mouseY), button, dragX / uiScale, dragY / uiScale);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "ascend:block/shrine_of_remembrance"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@
|
||||
"advancements.ascend.level_5.description": "Reach Ascend level 5",
|
||||
"advancements.ascend.level_10.title": "Beyond Mortal Limits",
|
||||
"advancements.ascend.level_10.description": "Reach Ascend level 10",
|
||||
"advancements.ascend.max_level.title": "This is Ascend",
|
||||
"advancements.ascend.max_level.title": "Ascendant",
|
||||
"advancements.ascend.max_level.description": "Reach the maximum Ascend level",
|
||||
"advancements.ascend.max_attribute.title": "Fear Not the One-Trick",
|
||||
"advancements.ascend.max_attribute.description": "Max out any Ascend attribute",
|
||||
@@ -76,7 +76,7 @@
|
||||
"advancements.ascend.perfectly_balanced.title": "Perfectly Balanced",
|
||||
"advancements.ascend.perfectly_balanced.description": "Invest exactly the same number of points in all eight attributes",
|
||||
"advancements.ascend.indecisive_chosen_one.title": "Indecisive Chosen One",
|
||||
"advancements.ascend.indecisive_chosen_one.description": "Respec ten times on the same character",
|
||||
"advancements.ascend.indecisive_chosen_one.description": "Respec ten times in the same world",
|
||||
"advancements.ascend.config_enjoyer.title": "Config Enjoyer",
|
||||
"advancements.ascend.config_enjoyer.description": "Make the intended progression unrecognizable",
|
||||
"advancements.ascend.game_journalist_mode.title": "Game Journalist Mode",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "ascend:block/shrine_of_remembrance"
|
||||
}
|
||||
Reference in New Issue
Block a user