diff --git a/src/main/java/com/teammoeg/frostedheart/bootstrap/common/FHItems.java b/src/main/java/com/teammoeg/frostedheart/bootstrap/common/FHItems.java index 03d07e3f3..26022b2fd 100644 --- a/src/main/java/com/teammoeg/frostedheart/bootstrap/common/FHItems.java +++ b/src/main/java/com/teammoeg/frostedheart/bootstrap/common/FHItems.java @@ -56,6 +56,7 @@ import net.minecraft.world.item.ArmorItem.Type; import net.minecraft.world.item.*; import net.minecraft.world.item.Item.Properties; +import net.minecraft.world.item.Items; import net.minecraftforge.common.ForgeSpawnEggItem; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/Tip.java b/src/main/java/com/teammoeg/frostedheart/content/tips/Tip.java index 422fc5905..2dce44804 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/Tip.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/Tip.java @@ -318,16 +318,16 @@ public Builder fromJson(JsonObject json) { if (json.has("id")) { this.id = json.get("id").getAsString(); } else { - error(ErrorType.OTHER, Lang.str("This tip has no id")); + error(ErrorType.LOAD, Lang.str("This tip cannot be loaded because there is no id in its file")); + id = "exception"; return this; } if (json.has("image")) { - Optional.ofNullable(ResourceLocation.tryParse(json.get("image").getAsString())).ifPresentOrElse(this::image, () -> error(ErrorType.OTHER, Lang.str("Invalid ResourceLocation"))); ResourceLocation image = ResourceLocation.tryParse(json.get("image").getAsString()); if (image != null) { this.image = image; } else { - error(ErrorType.OTHER, Lang.str("Invalid ResourceLocation")); + error(ErrorType.LOAD, Lang.str("The image ResourceLocation is invalid")); return this; } } @@ -350,7 +350,7 @@ private int tryGetColorOrElse(JsonObject json, String name, int defColor) { try { return Integer.parseUnsignedInt(json.get(name).getAsString(), 16); } catch (NumberFormatException e) { - error(ErrorType.OTHER, e); + error(ErrorType.LOAD, e, Lang.str("'" + name + "' is not a valid hexadecimal number")); return defColor; } } @@ -385,7 +385,6 @@ public enum ErrorType { SAVE("save"), EMPTY("empty"), INVALID("invalid"), - INVALID_IMAGE("invalid_image"), NOT_EXISTS("not_exists"); final String key; diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/TipManager.java b/src/main/java/com/teammoeg/frostedheart/content/tips/TipManager.java index a111bb758..5398ad443 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/TipManager.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/TipManager.java @@ -134,7 +134,7 @@ public void general(Tip tip) { if (tip.isOnceOnly() && manager.state.isUnlocked(tip)) return; // 渲染队列已有此 tip 时返回 - for (Tip queue : TipRenderer.renderQueue) { + for (Tip queue : TipRenderer.TIP_QUEUE) { if (queue.getId().equals(tip.getId())) return; } @@ -148,9 +148,9 @@ public void general(Tip tip) { if (tip.isPin()) { TipRenderer.removeCurrent(); - TipRenderer.renderQueue.add(0, tip); + TipRenderer.TIP_QUEUE.add(0, tip); } else { - TipRenderer.renderQueue.add(tip); + TipRenderer.TIP_QUEUE.add(tip); } } @@ -167,9 +167,9 @@ public void force(String id) { public void force(Tip tip) { if (tip.isPin()) { TipRenderer.removeCurrent(); - TipRenderer.renderQueue.add(0, tip); + TipRenderer.TIP_QUEUE.add(0, tip); } else { - TipRenderer.renderQueue.add(tip); + TipRenderer.TIP_QUEUE.add(tip); } } @@ -177,13 +177,13 @@ public void force(Tip tip) { * 使 tip 永久显示,即 {@code alwaysVisible = true} */ public void alwaysVisible(Tip tip) { - var list = TipRenderer.renderQueue; + var list = TipRenderer.TIP_QUEUE; if (list.size() <= 1 || list.get(0) == tip) return; for (int i = 0; i < list.size(); i++) { Tip t = list.get(i); if (t == tip) { Tip clone = Tip.builder("").copy(t).alwaysVisible(true).build(); - TipRenderer.renderQueue.set(i, clone); + TipRenderer.TIP_QUEUE.set(i, clone); return; } } @@ -193,7 +193,7 @@ public void alwaysVisible(Tip tip) { * 置顶 tip */ public void pin(String id) { - var list = TipRenderer.renderQueue; + var list = TipRenderer.TIP_QUEUE; if (list.size() <= 1 || list.get(0).getId().equals(id)) return; Iterator iterator = list.iterator(); while (iterator.hasNext()) { @@ -217,7 +217,7 @@ public void removeCurrent() { * 清除 tip 队列 */ public void clearRenderQueue() { - TipRenderer.renderQueue.clear(); + TipRenderer.TIP_QUEUE.clear(); TipRenderer.removeCurrent(); } } @@ -244,7 +244,7 @@ protected void loadFromFile() { // 文件存在但是无法正确读取 if (TIP_STATE_FILE.exists()) { String message = "The file '" + TIP_STATE_FILE + "' already exists but cannot be read correctly, it may be corrupted"; - manager.displayException(Tip.ErrorType.OTHER, new Exception(message)); + manager.displayException(Tip.ErrorType.LOAD, new Exception(message)); LOGGER.warn(message); } return; diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/TipRenderer.java b/src/main/java/com/teammoeg/frostedheart/content/tips/TipRenderer.java index 18f22cf6e..d6069a5b1 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/TipRenderer.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/TipRenderer.java @@ -4,7 +4,11 @@ import com.teammoeg.frostedheart.content.tips.client.gui.widget.TipWidget; import com.teammoeg.frostedheart.infrastructure.config.FHConfig; import com.teammoeg.frostedheart.util.client.ClientUtils; +import com.teammoeg.frostedheart.util.client.FHColorHelper; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.components.events.GuiEventListener; +import net.minecraft.client.gui.screens.ChatScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.inventory.CommandBlockEditScreen; import net.minecraftforge.api.distmarker.Dist; @@ -18,47 +22,69 @@ @Mod.EventBusSubscriber(modid = FHMain.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class TipRenderer { - public static final List renderQueue = new ArrayList<>(); + + /** + * TipWidget实例 + */ public static final TipWidget TIP_WIDGET = new TipWidget(); - // 不在GUI中渲染 - public static final List> GUI_BLACKLIST = new ArrayList<>(); + /** + * tip渲染队列 + */ + public static final List TIP_QUEUE = new ArrayList<>(); + /** + * screen黑名单 + */ + public static final List> SCREEN_BLACKLIST = new ArrayList<>(); static { - GUI_BLACKLIST.add(CommandBlockEditScreen.class); + SCREEN_BLACKLIST.add(CommandBlockEditScreen.class); } + /** + * @return 是否正在渲染tip + */ public static boolean isTipRendering() { return TIP_WIDGET.getState() != TipWidget.State.IDLE; } + /** + * 移除当前显示的tip + */ public static void removeCurrent() { - if (!renderQueue.isEmpty()) renderQueue.remove(0); - TIP_WIDGET.removeTip(); + if (!TIP_QUEUE.isEmpty()) TIP_QUEUE.remove(0); + TIP_WIDGET.setState(TipWidget.State.FADING_OUT); } @SubscribeEvent - public static void onGuiInit(ScreenEvent.Init.Pre event) { + public static void onGuiInit(ScreenEvent.Init event) { if (!FHConfig.CLIENT.renderTips.get()) return; - if (GUI_BLACKLIST.contains(event.getScreen().getClass())) + if (SCREEN_BLACKLIST.contains(event.getScreen().getClass())) return; - // TODO 兼容JEI + // 将TipWidget添加到当前screen中 if (!event.getListenersList().contains(TIP_WIDGET)) { event.addListener(TIP_WIDGET.closeButton); event.addListener(TIP_WIDGET.pinButton); event.addListener(TIP_WIDGET); - // 按钮由TipWidget渲染 + + // 原版的物品和tooltip顺序可能在screen渲染之后, + // 而我为了确保tip始终渲染在所有layout的最上层将 + // z轴偏移了+800,这导致了tip的半透明背景会因为渲 + // 染顺序而剔除这些元素 + // + // 将tipWidget和按钮从screen的渲染列表中移除 event.getScreen().renderables.remove(TIP_WIDGET.closeButton); event.getScreen().renderables.remove(TIP_WIDGET.pinButton); + event.getScreen().renderables.remove(TIP_WIDGET); } } @SubscribeEvent - public static void renderOnHUD(RenderGuiEvent.Post event) { - if (!FHConfig.CLIENT.renderTips.get() || renderQueue.isEmpty()) + public static void onHudRender(RenderGuiEvent.Post event) { + if (!FHConfig.CLIENT.renderTips.get() || TIP_QUEUE.isEmpty()) return; Minecraft MC = ClientUtils.mc(); - if (MC.screen != null && !GUI_BLACKLIST.contains(MC.screen.getClass())) + if (MC.screen != null && !SCREEN_BLACKLIST.contains(MC.screen.getClass())) return; // if (WIDGET_INSTANCE.getState() != TipWidget.State.IDLE) { @@ -79,20 +105,32 @@ public static void renderOnHUD(RenderGuiEvent.Post event) { } @SubscribeEvent - public static void onGuiRender(ScreenEvent.Render event) { - if (!FHConfig.CLIENT.renderTips.get() || renderQueue.isEmpty() || !event.getScreen().children().contains(TIP_WIDGET)) + public static void onGuiRender(ScreenEvent.Render.Post event) { + if (!FHConfig.CLIENT.renderTips.get() || TIP_QUEUE.isEmpty()) return; + if (!event.getScreen().children().contains(TIP_WIDGET)) + return; + + // 避免点击tip后聊天栏无法编辑 + if (event.getScreen() instanceof ChatScreen) { + for (GuiEventListener child : event.getScreen().children()) { + if (child instanceof EditBox e) { + event.getScreen().setFocused(e); + } + } + } + + TIP_WIDGET.renderWidget(event.getGuiGraphics(), event.getMouseX(), event.getMouseY(), event.getPartialTick()); update(); } private static void update() { if (TIP_WIDGET.getState() == TipWidget.State.IDLE) { - // 删除当前 - renderQueue.remove(TIP_WIDGET.getTip()); - TIP_WIDGET.removeTip(); + TIP_QUEUE.remove(TIP_WIDGET.lastTip); + TIP_WIDGET.lastTip = null; // 切换下一个 - if (!renderQueue.isEmpty()) { - TIP_WIDGET.setTip(renderQueue.get(0)); + if (!TIP_QUEUE.isEmpty()) { + TIP_WIDGET.setTip(TIP_QUEUE.get(0)); } } } diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipEditorScreen.java b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipEditorScreen.java index be7808b2e..f4b1f389c 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipEditorScreen.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipEditorScreen.java @@ -35,8 +35,8 @@ protected TipEditorScreen() { @Override protected void init() { addRenderableWidget(new IconButton(50, 50, IconButton.Icon.CHECK, FHColorHelper.CYAN, Component.translatable("gui.yes"), (b) -> { - if (!TipRenderer.renderQueue.isEmpty()) { - TipRenderer.renderQueue.get(0).saveAsFile(); + if (!TipRenderer.TIP_QUEUE.isEmpty()) { + TipRenderer.TIP_QUEUE.get(0).saveAsFile(); } })); } diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipListScreen.java b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipListScreen.java index 6c837525a..a29ec70b2 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipListScreen.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/TipListScreen.java @@ -1,21 +1,8 @@ package com.teammoeg.frostedheart.content.tips.client.gui; -import com.teammoeg.frostedheart.FHMain; import com.teammoeg.frostedheart.content.tips.Tip; -import com.teammoeg.frostedheart.content.tips.TipManager; -import com.teammoeg.frostedheart.content.tips.client.gui.widget.IconButton; -import com.teammoeg.frostedheart.util.client.AnimationUtil; -import com.teammoeg.frostedheart.util.client.ClientUtils; -import com.teammoeg.frostedheart.util.client.FHColorHelper; -import com.teammoeg.frostedheart.util.client.FHGuiHelper; -import com.teammoeg.frostedheart.util.client.RawMouseHelper; import com.teammoeg.frostedheart.util.lang.Lang; -import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.Screen; -import net.minecraft.client.resources.language.I18n; -import net.minecraft.network.chat.Component; -import net.minecraft.util.Mth; -import org.lwjgl.glfw.GLFW; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/widget/TipWidget.java b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/widget/TipWidget.java index 4ea31afe8..5c7e1a503 100644 --- a/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/widget/TipWidget.java +++ b/src/main/java/com/teammoeg/frostedheart/content/tips/client/gui/widget/TipWidget.java @@ -1,16 +1,14 @@ package com.teammoeg.frostedheart.content.tips.client.gui.widget; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.teammoeg.frostedheart.content.tips.Tip; -import com.teammoeg.frostedheart.content.tips.TipRenderer; import com.teammoeg.frostedheart.util.client.AnimationUtil; import com.teammoeg.frostedheart.util.client.ClientUtils; import com.teammoeg.frostedheart.util.client.FHColorHelper; import com.teammoeg.frostedheart.util.client.FHGuiHelper; +import com.teammoeg.frostedheart.util.lang.Lang; import lombok.Getter; import lombok.Setter; -import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractWidget; @@ -36,10 +34,7 @@ public class TipWidget extends AbstractWidget { private static final int MAX_WIDTH = 360; public final IconButton closeButton; public final IconButton pinButton; - /** - * -- SETTER -- - * 更改当前显示的 tip - */ + public Tip lastTip; @Setter @Getter @Nullable @@ -53,10 +48,10 @@ public class TipWidget extends AbstractWidget { public TipWidget() { super(ClientUtils.screenWidth(), ClientUtils.screenHeight(), 0, 0, Component.literal("tip")); - this.closeButton = new IconButton(0, 0, IconButton.Icon.CROSS, FHColorHelper.CYAN, Component.translatable("gui.close"), + this.closeButton = new IconButton(0, 0, IconButton.Icon.CROSS, FHColorHelper.CYAN, Lang.gui("close").component(), b -> state = State.FADING_OUT ); - this.pinButton = new IconButton(0, 0, IconButton.Icon.LOCK, FHColorHelper.CYAN, Component.translatable("gui.frostedheart.tip_list.pin"), + this.pinButton = new IconButton(0, 0, IconButton.Icon.LOCK, FHColorHelper.CYAN, Lang.gui("pin").component(), b -> this.alwaysVisibleOverride = true ); this.closeButton.visible = false; @@ -135,16 +130,10 @@ private void render(GuiGraphics graphics, int mouseX, int mouseY, float partialT setPosition((screenW - width - 8 + (int)yaw), ((int)(screenH * 0.3F) + (int)pitch)); PoseStack pose = graphics.pose(); pose.pushPose(); - pose.translate((yaw - (int)yaw), (pitch - (int)pitch), isGuiOpened() ? 800/*确保显示在最上层*/ : 0); + pose.translate((yaw - (int)yaw), (pitch - (int)pitch), 800); // 背景 - RenderSystem.enableBlend(); -// RenderSystem.blendFunc(770, 771); - RenderSystem.defaultBlendFunc(); - RenderSystem.disableDepthTest(); graphics.fill(getX()-BACKGROUND_BORDER, getY()-BACKGROUND_BORDER, getX()+width+BACKGROUND_BORDER, getY()+getHeight() + (contentLines.isEmpty() ? 1 : 6), backgroundColor); - RenderSystem.enableDepthTest(); - RenderSystem.disableBlend(); // 进度条 if (state != State.FADING_OUT) { @@ -164,11 +153,12 @@ private void render(GuiGraphics graphics, int mouseX, int mouseY, float partialT FHGuiHelper.drawStrings(graphics, ClientUtils.font(), contentLines, getX(), getY()+6 + (titleLines.size() * LINE_SPACE), fontColor, LINE_SPACE, false); // 按钮 + pose.translate(0, 0, 100); closeButton.color = fontColor; closeButton.visible = true; closeButton.setPosition(getX() + super.getWidth() - 10, getY()); closeButton.render(graphics, mouseX, mouseY, partialTick); - if (isGuiOpened() && !isAlwaysVisible()) { + if (isGuiOpened() && !isAlwaysVisible() && state != State.FADING_OUT) { pinButton.color = fontColor; pinButton.visible = true; pinButton.setPosition(getX() + super.getWidth() - 22, getY()); @@ -179,26 +169,6 @@ private void render(GuiGraphics graphics, int mouseX, int mouseY, float partialT pose.popPose(); } - @Override - public int getX() { - if (state == State.FADING_IN) - return super.getX() - FADE_OFFSET + (int)(FADE_OFFSET * AnimationUtil.getFadeIn(ANIMATION_FADE_NAME)); - if (state == State.FADING_OUT) - return super.getX() - (int)(FADE_OFFSET * AnimationUtil.getFadeOut(ANIMATION_FADE_NAME)); - - return super.getX(); - } - - @Override - public int getWidth() { - if (state == State.FADING_IN) - return super.getWidth() + FADE_OFFSET - (int)(FADE_OFFSET * AnimationUtil.getFadeIn(ANIMATION_FADE_NAME)); - if (state == State.FADING_OUT) - return super.getWidth() + (int)(FADE_OFFSET * AnimationUtil.getFadeOut(ANIMATION_FADE_NAME)); - - return super.getWidth(); - } - /** * 当前是否有打开 Gui */ @@ -207,24 +177,17 @@ public boolean isGuiOpened() { } /** - * 移除当前显示的 tip - */ - public void removeTip() { - tip = null; - } - - /** - * 重置状态,不移除当前 tip + * 重置状态 */ public void resetState() { - ClientUtils.getPlayer().sendSystemMessage(Component.literal("resetting, P: " + progress + ", mile: " + Util.getMillis())); - ClientUtils.getPlayer().sendSystemMessage(Component.literal( "size: " + TipRenderer.renderQueue.size() + ", next: " + (TipRenderer.renderQueue.isEmpty() ? "empty" : TipRenderer.renderQueue.get(0).getId()))); + lastTip = tip; + tip = null; progress = 0; state = State.IDLE; alwaysVisibleOverride = false; pinButton.visible = false; - pinButton.setFocused(false); closeButton.visible = false; + pinButton.setFocused(false); closeButton.setFocused(false); // 将位置设置到屏幕外避免影响屏幕内的元素 setPosition(ClientUtils.screenWidth(), ClientUtils.screenHeight()); @@ -243,6 +206,31 @@ public Rect2i getRect() { return new Rect2i(getX(), getY(), getWidth(), getHeight()); } + @Override + public int getX() { + if (state == State.FADING_IN) + return super.getX() - FADE_OFFSET + (int)(FADE_OFFSET * AnimationUtil.getFadeIn(ANIMATION_FADE_NAME)); + if (state == State.FADING_OUT) + return super.getX() - (int)(FADE_OFFSET * AnimationUtil.getFadeOut(ANIMATION_FADE_NAME)); + + return super.getX(); + } + + @Override + public int getWidth() { + if (state == State.FADING_IN) + return super.getWidth() + FADE_OFFSET - (int)(FADE_OFFSET * AnimationUtil.getFadeIn(ANIMATION_FADE_NAME)); + if (state == State.FADING_OUT) + return super.getWidth() + (int)(FADE_OFFSET * AnimationUtil.getFadeOut(ANIMATION_FADE_NAME)); + + return super.getWidth(); + } + + @Override + protected boolean isValidClickButton(int pButton) { + return false; + } + @Override protected void updateWidgetNarration(@NotNull NarrationElementOutput pNarrationElementOutput) { } diff --git a/src/main/java/com/teammoeg/frostedheart/infrastructure/command/TipCommand.java b/src/main/java/com/teammoeg/frostedheart/infrastructure/command/TipCommand.java index a0d3ca434..5d25c00d5 100644 --- a/src/main/java/com/teammoeg/frostedheart/infrastructure/command/TipCommand.java +++ b/src/main/java/com/teammoeg/frostedheart/infrastructure/command/TipCommand.java @@ -82,7 +82,8 @@ public static void register(RegisterCommandsEvent event) { return i; } )))))); -for (String string : new String[]{FHMain.MODID, FHMain.ALIAS, FHMain.TWRID}) { + + for (String string : new String[]{FHMain.MODID, FHMain.ALIAS, FHMain.TWRID}) { dispatcher.register(Commands.literal(string).requires(s -> s.hasPermission(2)).then(run)); } } diff --git a/src/main/resources/assets/frostedheart/lang/en_us/en_us.json b/src/main/resources/assets/frostedheart/lang/en_us/en_us.json index 822ea0327..70d0d82fa 100644 --- a/src/main/resources/assets/frostedheart/lang/en_us/en_us.json +++ b/src/main/resources/assets/frostedheart/lang/en_us/en_us.json @@ -122,9 +122,6 @@ "gui.frostedheart.save_update_needed": "Your save is outdated, Cannot auto update your save! Please exit world and delete %s to complete update!", "gui.frostedheart.save_updated": "Auto updated your save, old configuration backed-up at ", "gui.frostedheart.temperature.desc": "Average Temperature", - "gui.frostedheart.tip_editor.title": "Tip Editor", - "gui.frostedheart.tip_list.close": "Close", - "gui.frostedheart.tip_list.pin": "Pin this tip", "gui.frostedheart.trade.bad_relation": "Low relation", "gui.frostedheart.trade.bargain": "Bargain", "gui.frostedheart.trade.deal": "Deal!", @@ -365,26 +362,6 @@ "temperature_difficulty.frostedheart.hard": "Hard", "temperature_difficulty.frostedheart.normal": "Normal", "temperature_difficulty.frostedheart.hardcore": "Hardcore", - "tips.frostedheart.empty.title": "Oops, there's nothing here", - "tips.frostedheart.error.desc": "Please check if the Modpack is installed properly or report this issue", - "tips.frostedheart.error.empty": "[Error] No content to display", - "tips.frostedheart.error.invalid": "[Error] Invalid JSON file format", - "tips.frostedheart.error.load": "[Error] Unable to load file", - "tips.frostedheart.error.not_exists": "[Error] File does not exists", - "tips.frostedheart.error.save": "[Error] Unable to save file", - "tips.frostedheart.error.invalid_image": "[Error] Invalid image Resource Location", - "tips.frostedheart.error.save_desc": "An unknown error occurred while saving the file", - "tips.frostedheart.too_long": "This tip appears excessively long, please review the list of unlocked tips", - "tips.frostedheart.default.desc1": "Tips will appear here as you play, be sure to read them carefully!", - "tips.frostedheart.default.desc2": "To close, click the button in the top right corner. You can also use §6[TAB]§r and the mouse to select.", - "tips.frostedheart.default.title": "Welcome to The Winter Rescue!", - "tips.frostedheart.default2.desc1": "Open the chat screen, the button in the bottom right corner allows you to view all unlocked tips.", - "tips.frostedheart.default2.title": "Missed any tips?", - "tips.frostedheart.music_warning.desc1": "Turning off the music may affect your experience of the music we provide for The Winter Rescue.", - "tips.frostedheart.music_warning.desc2": "The vanilla music has already been disabled, If you want to re-enable it, please change it in the configuration file: '&7$configPath$\\frostedheart-client.toml&r'", - "tips.frostedheart.music_warning.title": "Wait!", - "tips.frostedheart.update.desc1": "Click the button on the left to visit CurseForge and download the update.", - "tips.frostedheart.update.title": "The Winter Rescue has a new update!", "tooltip.frostedheart.armor_heating": "Heating Rate: %s/s", "tooltip.frostedheart.armor_warm": "Warming Modifier: %s %%", "tooltip.frostedheart.block_temp": "Temperature Effect: %s", diff --git a/src/main/resources/assets/frostedheart/lang/en_us/tips.json b/src/main/resources/assets/frostedheart/lang/en_us/tips.json new file mode 100644 index 000000000..6ef05bf68 --- /dev/null +++ b/src/main/resources/assets/frostedheart/lang/en_us/tips.json @@ -0,0 +1,28 @@ +{ + "tips.frostedheart.empty.title": "Oops, there's nothing here", + "tips.frostedheart.error.desc": "Please check if the Modpack is installed properly or report this issue", + "tips.frostedheart.error.other": "[Error] An unknow error has occurred", + "tips.frostedheart.error.load": "[Error] Unable to load file", + "tips.frostedheart.error.save": "[Error] Unable to save file", + "tips.frostedheart.error.empty": "[Error] No content to display", + "tips.frostedheart.error.invalid": "[Error] Invalid JSON file format", + "tips.frostedheart.error.not_exists": "[Error] File does not exists", + + "gui.frostedheart.tip_editor.title": "Tip Editor", + "gui.frostedheart.close": "Close", + "gui.frostedheart.pin": "Pin", + + "tips.frostedheart.default.title": "Welcome to The Winter Rescue!", + "tips.frostedheart.default.desc1": "Tips will appear here as you play, be sure to read them carefully!", + "tips.frostedheart.default.desc2": "To close, click the button in the top right corner. You can also use §6[TAB]§r and the mouse to select.", + + "tips.frostedheart.default2.title": "Missed any tips?", + "tips.frostedheart.default2.desc1": "Open the chat screen, the button in the bottom right corner allows you to view all unlocked tips.", + + "tips.frostedheart.music_warning.title": "Wait!", + "tips.frostedheart.music_warning.desc1": "Turning off the music may affect your experience of the music we provide for The Winter Rescue.", + "tips.frostedheart.music_warning.desc2": "The vanilla music has already been disabled, If you want to re-enable it, please change it in the configuration file: '&7$configPath$\\frostedheart-client.toml&r'", + + "tips.frostedheart.update.title": "The Winter Rescue has a new update!", + "tips.frostedheart.update.desc1": "Click the button on the left to visit CurseForge and download the update." +} \ No newline at end of file diff --git a/src/main/resources/assets/frostedheart/lang/zh_cn/tips.json b/src/main/resources/assets/frostedheart/lang/zh_cn/tips.json new file mode 100644 index 000000000..45dbc89da --- /dev/null +++ b/src/main/resources/assets/frostedheart/lang/zh_cn/tips.json @@ -0,0 +1,28 @@ +{ + "tips.frostedheart.empty.title": "哎呀,这里什么都没有", + "tips.frostedheart.error.desc": "请检查整合包是否正确安装,或向我们报告这个bug", + "tips.frostedheart.error.other": "错误:未知", + "tips.frostedheart.error.load": "错误:无法加载文件", + "tips.frostedheart.error.save": "错误:无法保存文件", + "tips.frostedheart.error.empty": "错误:没有内容可供显示", + "tips.frostedheart.error.invalid": "错误:无效的Json文件格式", + "tips.frostedheart.error.not_exists": "错误:文件不存在", + + "gui.frostedheart.tip_editor.title": "提示编辑器", + "gui.frostedheart.close": "关闭", + "gui.frostedheart.pin": "固定", + + "tips.frostedheart.default.title": "欢迎来到冬季救援!", + "tips.frostedheart.default.desc1": "在你游玩时这里会显示各种提示,记得仔细阅读!", + "tips.frostedheart.default.desc2": "按下Tab键,或打开任意GUI后点击右上角按钮即可关闭该提示。", + + "tips.frostedheart.default2.title": "错过了一些提示?", + "tips.frostedheart.default2.desc1": "按下Tab键打开轮盘,选择“浏览所有提示”即可浏览所有已解锁的提示。", + + "tips.frostedheart.music_warning.title": "等一下!", + "tips.frostedheart.music_warning.desc1": "关闭音乐可能会错过我们为冬季救援准备的音乐", + "tips.frostedheart.music_warning.desc2": "原版音乐已经被禁用,如果你希望重新开启可以在我们的配置文件中设置: 'config\\frostedheart-client.toml&r'", + + "tips.frostedheart.update.title": "冬季救援有新更新!", + "tips.frostedheart.update.desc1": "点击“检查更新”按钮即可前往下载" +} \ No newline at end of file