diff --git a/README.md b/README.md index 1245c648..fa3dc64f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Create Railways Navigator (Minecraft Create Mod Addon) -![Logo](https://github.com/MisterJulsen/Create-Train-Navigator/blob/1.18.2-Multiloader/icon_256px.png) +![Logo](https://github.com/MisterJulsen/Create-Train-Navigator/blob/1.20.1/icon_256px.png) Get a list possible train connections in your world from one station to another using the Create Railways Navigator. @@ -18,6 +18,7 @@ This mod adds a new item, the Create Railways Navigator, which is inspired by th - German (100%) - Dutch (100%) (by TheSatanicFlame) - Polish (100%) (by Slasherss) +- French (100%) (by GeoffreyGx) ## **Please note!** To protect your world from damage, you should always create a backup of your world before installing an update of this mod. Alpha versions in particular may contain critical bugs! diff --git a/build.gradle b/build.gradle index 8d45b82b..35a8b71c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false + id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false } architectury { @@ -16,9 +16,11 @@ subprojects { dependencies { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" + // The following line declares the mojmap mappings, you may use other mappings as well + mappings loom.layered() { officialMojangMappings() - parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchmentmc_version}@zip") + parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") } } } @@ -56,7 +58,27 @@ allprojects { includeGroup "curse.maven" } } - maven { url "https://maven.parchmentmc.org/"} + + + maven { // Create Forge and Registrate Forge + url = "https://maven.tterrag.com/" + content { + includeGroup("com.tterrag.registrate") + includeGroup("com.simibubi.create") + } + } + + maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI + maven { url = "https://maven.blamejared.com/" } // JEI + maven { url = "https://maven.parchmentmc.org" } // Parchment mappings + maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings + maven { url = "https://api.modrinth.com/maven" } // LazyDFU + maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu + maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate + maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API Port + maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes + maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM + maven { url = "https://maven.tterrag.com/" } // Flywheel } tasks.withType(JavaCompile) { @@ -64,7 +86,17 @@ allprojects { options.release = 17 } +publishing { + repositories { + maven { + name "GitHub" + url "file://${System.getProperty('user.home')}/.m2/github/modsrepo/maven" + } + } +} + java { withSourcesJar() + withJavadocJar() } } diff --git a/common/build.gradle b/common/build.gradle index 83568dac..cf067487 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -6,25 +6,14 @@ loom { accessWidenerPath = file("src/main/resources/createrailwaysnavigator.accesswidener") } -repositories { - maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI - maven { url = "https://maven.blamejared.com/" } // JEI - maven { url = "https://maven.parchmentmc.org" } // Parchment mappings - maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings - maven { url = "https://api.modrinth.com/maven" } // LazyDFU - maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu - maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate - maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API Port - maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes - maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM - maven { url = "https://maven.tterrag.com/" } // Flywheel -} - dependencies { + // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies + // Do NOT use other classes from fabric loader modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" - modApi(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) - + + modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) modCompileOnly("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}") + } publishing { @@ -35,6 +24,8 @@ publishing { } } + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { + // Add repositories to publish to here. } } diff --git a/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java b/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java index 858a4f19..78b42895 100644 --- a/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java +++ b/common/src/main/java/de/mrjulsen/crn/CreateRailwaysNavigator.java @@ -30,6 +30,7 @@ import de.mrjulsen.crn.network.packets.stc.TrainDataResponsePacket; import de.mrjulsen.crn.registry.ModBlockEntities; import de.mrjulsen.crn.registry.ModBlocks; +import de.mrjulsen.crn.registry.ModCreativeModeTab; import de.mrjulsen.crn.registry.ModExtras; import de.mrjulsen.crn.registry.ModItems; import de.mrjulsen.mcdragonlib.net.NetworkManagerBase; @@ -77,6 +78,7 @@ public static void load() {} public static void init() { + ModCreativeModeTab.setup(); ModBlocks.register(); ModItems.register(); ModBlockEntities.register(); diff --git a/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java b/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java index d60fa14c..b18541fd 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java +++ b/common/src/main/java/de/mrjulsen/crn/block/AbstractAdvancedDisplayBlock.java @@ -2,7 +2,6 @@ import java.util.Collection; import java.util.List; -import java.util.Random; import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.content.kinetics.base.KineticBlockEntity; @@ -23,6 +22,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -211,7 +211,7 @@ public void updateNeighbours(BlockState pState, Level pLevel, BlockPos pPos) { } @Override - public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, Random pRandom) { + public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) { if (pState.getBlock() != this) return; BlockPos belowPos = pPos.relative(Direction.fromAxisAndDirection(getConnectionAxis(pState), AxisDirection.NEGATIVE)); @@ -307,7 +307,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla if (dye != null) { pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F); blockEntity.applyToAll(be -> { - be.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMaterialColor().col); + be.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMapColor().col); be.notifyUpdate(); }); diff --git a/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java b/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java index d0726a36..acee2cb9 100644 --- a/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java +++ b/common/src/main/java/de/mrjulsen/crn/block/TrainStationClockBlock.java @@ -62,7 +62,7 @@ public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Pla DyeColor dye = dyeItem.getDyeColor(); if (dye != null) { pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F); - blockEntity.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMaterialColor().col); + blockEntity.setColor(dye == DyeColor.ORANGE ? 0xFF9900 : dye.getMapColor().col); if (pLevel.isClientSide) { blockEntity.getRenderer().update(pLevel, pPos, pState, blockEntity, EUpdateReason.BLOCK_CHANGED); diff --git a/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java b/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java index 4b01ea3e..5efabcf1 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ClientWrapper.java @@ -16,6 +16,7 @@ import de.mrjulsen.crn.data.GlobalSettingsManager; import de.mrjulsen.crn.network.packets.stc.ServerErrorPacket; import de.mrjulsen.mcdragonlib.client.gui.DLScreen; +import de.mrjulsen.mcdragonlib.util.TextUtils; import dev.architectury.networking.NetworkManager.PacketContext; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.toasts.SystemToast; @@ -23,7 +24,6 @@ import net.minecraft.client.resources.language.ClientLanguage; import net.minecraft.client.resources.language.LanguageInfo; import net.minecraft.locale.Language; -import net.minecraft.network.chat.TextComponent; import net.minecraft.world.level.Level; public class ClientWrapper { @@ -45,7 +45,7 @@ public static void showRouteOverlaySettingsGui(RouteDetailsOverlayScreen overlay } public static void handleErrorMessagePacket(ServerErrorPacket packet, Supplier ctx) { - Minecraft.getInstance().getToasts().addToast(new SystemToast(SystemToastIds.PERIODIC_NOTIFICATION, Constants.TEXT_SERVER_ERROR, new TextComponent(packet.message))); + Minecraft.getInstance().getToasts().addToast(new SystemToast(SystemToastIds.PERIODIC_NOTIFICATION, Constants.TEXT_SERVER_ERROR, TextUtils.text(packet.message))); } public static void showAdvancedDisplaySettingsScreen(AdvancedDisplayBlockEntity blockEntity) { @@ -59,11 +59,11 @@ public static void updateLanguage(ELanguage lang, boolean force) { LanguageInfo info = lang == ELanguage.DEFAULT ? null : Minecraft.getInstance().getLanguageManager().getLanguage(lang.getCode()); if (info == null) { - info = Minecraft.getInstance().getLanguageManager().getSelected(); + info = Minecraft.getInstance().getLanguageManager().getLanguage(Minecraft.getInstance().getLanguageManager().getSelected()); } currentLanguage = lang; - currentClientLanguage = ClientLanguage.loadFrom(Minecraft.getInstance().getResourceManager(), List.of(info)); - CreateRailwaysNavigator.LOGGER.info("Updated custom language to: " + (info == null ? null : info.getName())); + currentClientLanguage = ClientLanguage.loadFrom(Minecraft.getInstance().getResourceManager(), List.of(lang == ELanguage.DEFAULT ? Minecraft.getInstance().getLanguageManager().getSelected() : lang.getCode()), false); + CreateRailwaysNavigator.LOGGER.info("Updated custom language to: " + (info == null ? null : info.name())); } public static Language getCurrentClientLanguage() { diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java b/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java index 6c2230f7..1738821d 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/AdvancedDisplayRenderInstance.java @@ -8,7 +8,7 @@ import java.util.function.Supplier; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.mrjulsen.crn.block.AbstractAdvancedDisplayBlock; import de.mrjulsen.crn.block.AbstractAdvancedSidedDisplayBlock; @@ -115,9 +115,9 @@ public void render(BlockEntityRendererContext context, AdvancedDisplayBlockEntit pPoseStack.pushPose(); pPoseStack.translate(offset.getFirst(), offset.getSecond(), zOffset.getFirst()); - pPoseStack.mulPose(Vector3f.XP.rotationDegrees(rotation.getFirst())); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(rotation.getSecond())); - pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(rotation.getThird())); + pPoseStack.mulPose(Axis.XP.rotationDegrees(rotation.getFirst())); + pPoseStack.mulPose(Axis.YP.rotationDegrees(rotation.getSecond())); + pPoseStack.mulPose(Axis.ZP.rotationDegrees(rotation.getThird())); pPoseStack.scale(scale, scale, 1); renderSubtype.renderAdditional(context, pBlockEntity, this, pPartialTicks, pPoseStack, pBufferSource, light, pOverlay, false); labels.forEach(x -> x.render(pPoseStack, pBufferSource, light)); @@ -125,12 +125,12 @@ public void render(BlockEntityRendererContext context, AdvancedDisplayBlockEntit if (!(pBlockEntity.getBlockState().getBlock() instanceof AbstractAdvancedSidedDisplayBlock) || pBlockEntity.getBlockState().getValue(AbstractAdvancedSidedDisplayBlock.SIDE) == ESide.BOTH) { pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180)); + pPoseStack.mulPose(Axis.YP.rotationDegrees(180)); pPoseStack.translate(-pBlockEntity.getXSize() * 16, 0, -16); pPoseStack.translate(offset.getFirst(), offset.getSecond(), zOffset.getSecond()); - pPoseStack.mulPose(Vector3f.XP.rotationDegrees(rotation.getFirst())); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(rotation.getSecond())); - pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(rotation.getThird())); + pPoseStack.mulPose(Axis.XP.rotationDegrees(rotation.getFirst())); + pPoseStack.mulPose(Axis.YP.rotationDegrees(rotation.getSecond())); + pPoseStack.mulPose(Axis.ZP.rotationDegrees(rotation.getThird())); pPoseStack.scale(scale, scale, 1); renderSubtype.renderAdditional(context, pBlockEntity, this, pPartialTicks, pPoseStack, pBufferSource, light, pOverlay, true); labels.forEach(x -> x.render(pPoseStack, pBufferSource, light)); diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java b/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java index b5d00876..16c41188 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/TrainStationClockRenderer.java @@ -1,7 +1,7 @@ package de.mrjulsen.crn.client.ber; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.be.TrainStationClockBlockEntity; @@ -32,30 +32,30 @@ public void render(BlockEntityRendererContext context, TrainStationClockBlockEnt context.renderUtils().renderTexture(DIAL_TEXTURE, pBufferSource, pBlockEntity, pPoseStack, !pBlockEntity.isGlowing(), -7, -7, -0.2f, 14, 14, 0, 0, 1, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), (0xFF << 24) | (pBlockEntity.getColor()), pBlockEntity.isGlowing() ? LightTexture.FULL_BRIGHT : pPackedLight); pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); + pPoseStack.mulPose(Axis.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF191919, pPoseStack, -0.5f, -0.5f, 0, 6, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight); pPoseStack.popPose(); pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); + pPoseStack.mulPose(Axis.ZP.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF222222, pPoseStack, -0.5f, -0.5f, 0.1f, 7, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight); pPoseStack.popPose(); pPoseStack.translate(0, 0, -z * 2); pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180)); + pPoseStack.mulPose(Axis.YP.rotationDegrees(180)); context.renderUtils().renderTexture(DIAL_TEXTURE, pBufferSource, pBlockEntity, pPoseStack, !pBlockEntity.isGlowing(), -7, -7, -0.2f, 14, 14, 0, 0, 1, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING).getOpposite(), (0xFF << 24) | (pBlockEntity.getColor()), pBlockEntity.isGlowing() ? LightTexture.FULL_BRIGHT : pPackedLight); pPoseStack.popPose(); pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180)); + pPoseStack.mulPose(Axis.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 12000))); + pPoseStack.mulPose(Axis.YP.rotationDegrees(180)); context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF191919, pPoseStack, -0.5f, -0.5f, 0, 6, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight); pPoseStack.popPose(); pPoseStack.pushPose(); - pPoseStack.mulPose(Vector3f.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); - pPoseStack.mulPose(Vector3f.YP.rotationDegrees(180)); + pPoseStack.mulPose(Axis.ZN.rotationDegrees(-90 + ModUtils.clockHandDegrees(pBlockEntity.getLevel().getDayTime() + DragonLib.DAYTIME_SHIFT, 1000))); + pPoseStack.mulPose(Axis.YP.rotationDegrees(180)); context.renderUtils().fillColor(pBufferSource, pBlockEntity, 0xFF222222, pPoseStack, -0.5f, -0.5f, 0.1f, 7, 1, pBlockEntity.getBlockState().getValue(HorizontalDirectionalBlock.FACING), pPackedLight); pPoseStack.popPose(); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/ber/base/BERText.java b/common/src/main/java/de/mrjulsen/crn/client/ber/base/BERText.java index 6376f0c6..a982c025 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/ber/base/BERText.java +++ b/common/src/main/java/de/mrjulsen/crn/client/ber/base/BERText.java @@ -253,7 +253,7 @@ private void renderTextInBounds(PoseStack pPoseStack, FontUtils fontUtils, Multi for (int i = 0; i < text.getString().length(); i++) { int charCode = text.getString().charAt(i); - GlyphInfo info = fontUtils.fontSet.getGlyphInfo(charCode); + GlyphInfo info = fontUtils.fontSet.getGlyphInfo(charCode, false); float glyphWidth = info.getAdvance(text.getStyle().isBold()); float oldX = newX; newX += glyphWidth; diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/ModGuiIcons.java b/common/src/main/java/de/mrjulsen/crn/client/gui/ModGuiIcons.java index 002b24c0..c7a94be1 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/ModGuiIcons.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/ModGuiIcons.java @@ -7,7 +7,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.mcdragonlib.client.util.Graphics; -import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; public enum ModGuiIcons { @@ -90,19 +90,29 @@ public AllIcons getAsCreateIcon() { } public void render(Graphics graphics, int x, int y) { - GuiUtils.drawTexture(ModGuiIcons.ICON_LOCATION, graphics, x, y, getU(), getV(), ICON_SIZE, ICON_SIZE); + graphics.graphics().blit(ModGuiIcons.ICON_LOCATION, x, y, getU(), getV(), ICON_SIZE, ICON_SIZE); } public static class ModAllIcons extends AllIcons { + int u, v; + public ModAllIcons(int x, int y) { super(x, y); + this.u = x * ICON_SIZE; + this.v = y * ICON_SIZE; + } + + + + @Override + public void render(GuiGraphics graphics, int x, int y) { + graphics.blit(ICON_LOCATION, x, y, 0, u, v, ICON_SIZE, ICON_SIZE, 256, 256); } @Override public void bind() { RenderSystem.setShaderTexture(0, ICON_LOCATION); - } - + } } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/NavigatorToast.java b/common/src/main/java/de/mrjulsen/crn/client/gui/NavigatorToast.java index 5698e9e8..8800b9b5 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/NavigatorToast.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/NavigatorToast.java @@ -6,7 +6,6 @@ import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.mcdragonlib.client.util.Graphics; @@ -14,6 +13,7 @@ import de.mrjulsen.mcdragonlib.core.EAlignment; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.toasts.Toast; import net.minecraft.client.gui.components.toasts.ToastComponent; import net.minecraft.network.chat.Component; @@ -69,13 +69,13 @@ public int width() { * @param pTimeSinceLastVisible time in milliseconds */ @SuppressWarnings("resource") - public Toast.Visibility render(PoseStack pPoseStack, ToastComponent pToastComponent, long pTimeSinceLastVisible) { + public Toast.Visibility render(GuiGraphics guiGraphics, ToastComponent pToastComponent, long pTimeSinceLastVisible) { if (this.changed) { this.lastChanged = pTimeSinceLastVisible; this.changed = false; } - Graphics graphics = new Graphics(pPoseStack); + Graphics graphics = new Graphics(guiGraphics, guiGraphics.pose()); RenderSystem.setShaderTexture(0, TEXTURE); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); @@ -97,8 +97,8 @@ public Toast.Visibility render(PoseStack pPoseStack, ToastComponent pToastCompon //pToastComponent.getMinecraft().font.draw(pPoseStack, this.title, 40, 7.0F, -256); for (int i = 0; i < this.messageLines.size(); ++i) { - //GuiUtils.drawString(graphics, pToastComponent.getMinecraft().font, 40, (20 + i * lineHeight), this.messageLines.get(i), -1, EAlignment.LEFT, false); - pToastComponent.getMinecraft().font.draw(pPoseStack, this.messageLines.get(i), 40, (float) (20 + i * lineHeight), -1); + //GuiUtils.drawString(graphics, pToastComponent.getMinecraft().font, 40, 7, title, -256, EAlignment.LEFT, false); + graphics.graphics().drawString(Minecraft.getInstance().font, this.messageLines.get(i), 40, (20 + i * lineHeight), -1, false); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/RouteDetailsOverlayScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/RouteDetailsOverlayScreen.java index af7e8ebc..22a712c2 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/RouteDetailsOverlayScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/overlay/RouteDetailsOverlayScreen.java @@ -7,6 +7,7 @@ import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.text2speech.Narrator; import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import com.simibubi.create.foundation.gui.UIRenderHelper; import com.simibubi.create.foundation.utility.animation.LerpedFloat; @@ -52,11 +53,9 @@ import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.chat.NarratorChatListener; import net.minecraft.client.gui.components.MultiLineLabel; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.KeybindComponent; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; @@ -329,7 +328,7 @@ private void journeyInterrupt(JourneyInterruptData data) { private void narratorAnnouncement(String text) { if (ModClientConfig.ROUTE_NARRATOR.get()) { - NarratorChatListener.INSTANCE.narrator.say(text, true); + Narrator.getNarrator().say(text, true); } } @@ -482,6 +481,8 @@ public void render(Graphics graphics, float partialTicks, int width, int height) graphics.poseStack().popPose(); tickSlidingText(2 * Minecraft.getInstance().getDeltaFrameTime()); + + GuiUtils.setTint(1, 1, 1, 1); } private void renderInternal(Graphics graphics, int x, int y, int width, int height, float partialTicks) { @@ -495,7 +496,7 @@ private void renderInternal(Graphics graphics, int x, int y, int width, int heig GuiUtils.drawTexture(GUI, graphics, x, y, GUI_WIDTH, GUI_HEIGHT, 0, getListener().getCurrentState().important() ? 138 : 0, 256, 256); GuiUtils.drawString(graphics, shadowlessFont, x + 6, y + 4, title, 0x4F4F4F, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, shadowlessFont, x + 6, y + GUI_HEIGHT - 2 - shadowlessFont.lineHeight, TextUtils.translate(keyOptionsText, TextUtils.translate(InputConstants.getKey(Minecraft.ON_OSX ? InputConstants.KEY_LWIN : InputConstants.KEY_LCONTROL, 0).getName()).append(" + ").append(new KeybindComponent(keyKeybindOptions)).withStyle(ChatFormatting.BOLD)), 0x4F4F4F, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, x + 6, y + GUI_HEIGHT - 2 - shadowlessFont.lineHeight, TextUtils.translate(keyOptionsText, TextUtils.translate(InputConstants.getKey(Minecraft.ON_OSX ? InputConstants.KEY_LWIN : InputConstants.KEY_LCONTROL, 0).getName()).append(" + ").append(TextUtils.keybind(keyKeybindOptions)).withStyle(ChatFormatting.BOLD)), 0x4F4F4F, EAlignment.LEFT, false); String timeString = TimeUtils.parseTime((int)((level.getDayTime() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()); GuiUtils.drawString(graphics, shadowlessFont, x + GUI_WIDTH - 4 - shadowlessFont.width(timeString), y + 4, timeString, 0x4F4F4F, EAlignment.LEFT, false); @@ -751,7 +752,7 @@ public void renderPageTransfer(Graphics graphics, int x, int y, float alphaPerce y += 5 + ModGuiIcons.ICON_SIZE; // Details - this.messageLabel.renderLeftAligned(graphics.poseStack(), x + 15 + ModGuiIcons.ICON_SIZE, y, 12, 0xDBDBDB | fontAlpha); + this.messageLabel.renderLeftAligned(graphics.graphics(), x + 15 + ModGuiIcons.ICON_SIZE, y, 12, 0xDBDBDB | fontAlpha); } public void renderPageJourneyInterrupted(Graphics graphics, int x, int y, float alphaPercentage, int fontAlpha) { @@ -761,7 +762,7 @@ public void renderPageJourneyInterrupted(Graphics graphics, int x, int y, float y += 5 + ModGuiIcons.ICON_SIZE; // Details - this.messageLabel.renderLeftAligned(graphics.poseStack(), x + 10, y, 10, 0xDBDBDB | fontAlpha); + this.messageLabel.renderLeftAligned(graphics.graphics(), x + 10, y, 10, 0xDBDBDB | fontAlpha); } public void renderPageJourneyCompleted(Graphics graphics, int x, int y, float alphaPercentage, int fontAlpha) { @@ -771,7 +772,7 @@ public void renderPageJourneyCompleted(Graphics graphics, int x, int y, float al y += 5 + ModGuiIcons.ICON_SIZE; // Details - this.messageLabel.renderLeftAligned(graphics.poseStack(), x + 10, y, 10, 0xDBDBDB | fontAlpha); + this.messageLabel.renderLeftAligned(graphics.graphics(), x + 10, y, 10, 0xDBDBDB | fontAlpha); } //#endregion diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractBlacklistScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractBlacklistScreen.java index 1230317a..30882bb8 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractBlacklistScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractBlacklistScreen.java @@ -172,7 +172,7 @@ protected void updateEditorSubwidgets(DLEditBox field) { clearSuggestions(); - suggestions = new ModStationSuggestions(minecraft, this, field, minecraft.font, getViableStations(field), field.getHeight() + 2 + field.y); + suggestions = new ModStationSuggestions(minecraft, this, field, minecraft.font, getViableStations(field), field.getHeight() + 2 + field.getY()); suggestions.setAllowSuggestions(true); suggestions.updateCommandInfo(); } @@ -280,7 +280,7 @@ public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float pa if (suggestions != null) { graphics.poseStack().pushPose(); graphics.poseStack().translate(0, 0, 500); - suggestions.render(graphics.poseStack(), mouseX, mouseY); + suggestions.render(graphics.graphics(), mouseX, mouseY); graphics.poseStack().popPose(); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractEntryListSettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractEntryListSettingsScreen.java index 343f763f..d35e5987 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractEntryListSettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AbstractEntryListSettingsScreen.java @@ -246,7 +246,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p widget.setYPos(currentY); widget.calcHeight(); if (currentY < guiTop + AREA_Y + AREA_H - scrollOffset && currentY + widget.getHeight() > guiTop + AREA_Y - scrollOffset) { - widget.render(graphics.poseStack(), pMouseX, (int)(pMouseY - scrollOffset), pPartialTick); + widget.render(graphics.graphics(), pMouseX, (int)(pMouseY - scrollOffset), pPartialTick); } currentY += widget.getHeight() + ENTRY_SPACING; } @@ -280,7 +280,7 @@ public void renderFrontLayer(Graphics graphics, int pMouseX, int pMouseY, float if (pMouseX > guiLeft + AREA_X && pMouseX < guiLeft + AREA_X + AREA_W && pMouseY > guiTop + AREA_Y && pMouseY < guiTop + AREA_Y + AREA_H) { x.renderFrontLayer(graphics, pMouseX, pMouseY, pPartialTicks); } - x.renderSuggestions(graphics.poseStack(), pMouseX, pMouseY, pPartialTicks); + x.renderSuggestions(graphics, pMouseX, pMouseY, pPartialTicks); }); super.renderFrontLayer(graphics, pMouseX, pMouseY, pPartialTicks); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java index e4fbd1e4..7401433f 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/AdvancedDisplaySettingsScreen.java @@ -35,7 +35,7 @@ import de.mrjulsen.mcdragonlib.util.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.components.Widget; +import net.minecraft.client.gui.components.Renderable; import net.minecraft.client.gui.screens.Screen; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; @@ -180,7 +180,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p GuiGameElement.of(renderedItem).at(guiLeft + GUI_WIDTH, guiTop + GUI_HEIGHT - 48, -200) .scale(4f) - .render(graphics.poseStack()); + .render(graphics.graphics()); type.getIcon().render(graphics, guiLeft + 22, guiTop + 24); info.getIcon().render(graphics, guiLeft + 22, guiTop + 46); @@ -192,15 +192,15 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p @Override public void renderFrontLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { super.renderFrontLayer(graphics, pMouseX, pMouseY, pPartialTick); - for (Widget widget : renderables) { + for (Renderable widget : renderables) { if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused() && simiWidget.visible) { List tooltip = simiWidget.getToolTip(); if (tooltip.isEmpty()) continue; - int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.x; - int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.y; - renderComponentTooltip(graphics.poseStack(), tooltip, ttx, tty); + int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.getX(); + int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.getY(); + graphics.graphics().renderComponentTooltip(font, tooltip, ttx, tty); } } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/CustomIconScreenElement.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/CustomIconScreenElement.java index 672a5930..75561251 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/CustomIconScreenElement.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/CustomIconScreenElement.java @@ -1,10 +1,10 @@ package de.mrjulsen.crn.client.gui.screen; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.foundation.gui.element.ScreenElement; import de.mrjulsen.mcdragonlib.client.util.Graphics; import de.mrjulsen.mcdragonlib.client.util.GuiUtils; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; public class CustomIconScreenElement implements ScreenElement { @@ -28,8 +28,8 @@ public CustomIconScreenElement(int u, int v, int uW, int vH, int texW, int texH, } @Override - public void render(PoseStack poseStack, int x, int y) { - GuiUtils.drawTexture(texture, new Graphics(poseStack), x, y, u, v, uW, vH, texW, texH); + public void render(GuiGraphics graphics, int x, int y) { + GuiUtils.drawTexture(texture, new Graphics(graphics, graphics.pose()), x, y, u, v, uW, vH, texW, texH); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/LoadingScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/LoadingScreen.java index d03b0065..002dd35f 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/LoadingScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/LoadingScreen.java @@ -40,6 +40,6 @@ public void renderMainLayer(Graphics graphics, int mouseX, int mouseY, float par double offsetY = Math.cos(Math.toRadians(angle)) * 5; GuiUtils.drawString(graphics, font, width / 2, height / 2, title, 0xFFFFFF, EAlignment.CENTER, true); - AllIcons.I_MTD_SCAN.render(graphics.poseStack(), (int)(width / 2 + offsetX), (int)(height / 2 - 50 + offsetY)); + AllIcons.I_MTD_SCAN.render(graphics.graphics(), (int)(width / 2 + offsetX), (int)(height / 2 - 50 + offsetY)); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java index d571c410..cc7ce6fe 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/NavigatorScreen.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL30; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.utility.animation.LerpedFloat; @@ -43,6 +42,7 @@ import de.mrjulsen.mcdragonlib.util.TimeUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.components.toasts.SystemToast; import net.minecraft.client.gui.components.toasts.SystemToast.SystemToastIds; @@ -300,7 +300,7 @@ public void onClick(double mouseX, double mouseY) { protected void updateEditorSubwidgets(DLEditBox field) { clearSuggestions(); - destinationSuggestions = new ModDestinationSuggestions(this.minecraft, this, field, this.font, getViableStations(field), field.getHeight() + 2 + field.y); + destinationSuggestions = new ModDestinationSuggestions(this.minecraft, this, field, this.font, getViableStations(field), field.getHeight() + 2 + field.getY()); destinationSuggestions.setAllowSuggestions(true); destinationSuggestions.updateCommandInfo(); } @@ -340,7 +340,7 @@ public void tick() { super.tick(); } - protected void startStencil(PoseStack matrixStack, float x, float y, float w, float h) { + protected void startStencil(GuiGraphics graphics, float x, float y, float w, float h) { RenderSystem.clear(GL30.GL_STENCIL_BUFFER_BIT | GL30.GL_DEPTH_BUFFER_BIT, Minecraft.ON_OSX); GL11.glDisable(GL11.GL_STENCIL_TEST); @@ -351,11 +351,11 @@ protected void startStencil(PoseStack matrixStack, float x, float y, float w, fl RenderSystem.stencilMask(0xFF); RenderSystem.stencilFunc(GL11.GL_NEVER, 1, 0xFF); - matrixStack.pushPose(); - matrixStack.translate(x, y, 0); - matrixStack.scale(w, h, 1); - io.github.fabricators_of_create.porting_lib.util.client.GuiUtils.drawGradientRect(matrixStack.last().pose(), -100, 0, 0, 1, 1, 0xff000000, 0xff000000); - matrixStack.popPose(); + graphics.pose().pushPose(); + graphics.pose().translate(x, y, 0); + graphics.pose().scale(w, h, 1); + graphics.fillGradient(0, 0, 1, 1, -100, 0xff000000, 0xff000000); + graphics.pose().popPose(); GL11.glEnable(GL11.GL_STENCIL_TEST); RenderSystem.stencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP); @@ -387,7 +387,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p ModGuiIcons.INFO.render(graphics, (int)(guiLeft + GUI_WIDTH / 2 - 8), (int)(guiTop + GUI_HEIGHT / 2)); } else if (routes.length <= 0) { GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH / 2, guiTop + 32 + GUI_HEIGHT / 2, noConnectionsText, 0xFFFFFF, EAlignment.CENTER, false); - AllIcons.I_ACTIVE.render(graphics.poseStack(), (int)(guiLeft + GUI_WIDTH / 2 - 8), (int)(guiTop + GUI_HEIGHT / 2)); + AllIcons.I_ACTIVE.render(graphics.graphics(), (int)(guiLeft + GUI_WIDTH / 2 - 8), (int)(guiTop + GUI_HEIGHT / 2)); } else { //GuiUtils.swapAndBlitColor(minecraft.getMainRenderTarget(), GuiUtils.getFramebuffer()); //GuiUtils.startStencil(graphics, guiLeft + AREA_X, guiTop + AREA_Y, AREA_W, AREA_H); @@ -401,7 +401,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p int start = (int)(Math.abs(scrollOffset + ENTRIES_START_Y_OFFSET) / (ENTRY_SPACING + RouteEntryOverviewWidget.HEIGHT)); int end = Math.min(routesCollection.components.size(), start + 2 + (int)(AREA_H / (ENTRY_SPACING + RouteEntryOverviewWidget.HEIGHT))); for (int i = start; i < end; i++) { - routesCollection.components.get(i).render(graphics.poseStack(), (int)(pMouseX), (int)(pMouseY - scrollOffset), pPartialTick); + routesCollection.components.get(i).render(graphics.graphics(), (int)(pMouseX), (int)(pMouseY - scrollOffset), pPartialTick); } //graphics.poseStack().popPose(); @@ -428,7 +428,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p double offsetY = Math.cos(Math.toRadians(angle)) * 5; GuiUtils.drawString(graphics, font, guiLeft + GUI_WIDTH / 2, guiTop + 32 + GUI_HEIGHT / 2, searchingText, 0xFFFFFF, EAlignment.CENTER, false); - AllIcons.I_MTD_SCAN.render(graphics.poseStack(), (int)(guiLeft + GUI_WIDTH / 2 - 8 + offsetX), (int)(guiTop + GUI_HEIGHT / 2 + offsetY)); + AllIcons.I_MTD_SCAN.render(graphics.graphics(), (int)(guiLeft + GUI_WIDTH / 2 - 8 + offsetX), (int)(guiTop + GUI_HEIGHT / 2 + offsetY)); } if (switchButtonsArea.isInBounds(pMouseX, pMouseY)) { @@ -441,7 +441,7 @@ public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float pa if (destinationSuggestions != null) { graphics.poseStack().pushPose(); graphics.poseStack().translate(0, 0, 500); - destinationSuggestions.render(graphics.poseStack(), mouseX, mouseY); + destinationSuggestions.render(graphics.graphics(), mouseX, mouseY); graphics.poseStack().popPose(); } super.renderFrontLayer(graphics, mouseX, mouseY, partialTicks); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java index 8d5bb394..9d8c0f16 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteDetailsScreen.java @@ -223,7 +223,7 @@ private int renderTrainDetails(Graphics graphics, int x, int y, SimpleRoutePart final float mul = 1 / scale; GuiUtils.drawTexture(Constants.GUI_WIDGETS, graphics, x, y, 0, V, ENTRY_WIDTH, HEIGHT); - part.getTrainIcon().render(TrainIconType.ENGINE, graphics.poseStack(), x + ENTRY_DEST_X, y + 7); + part.getTrainIcon().render(TrainIconType.ENGINE, graphics.graphics(), x + ENTRY_DEST_X, y + 7); graphics.poseStack().pushPose(); graphics.poseStack().scale(scale, scale, scale); @@ -398,10 +398,10 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p btn.active = part.getStopovers().size() > 0; if (btn.active) { - btn.x = guiLeft + 78; - btn.y = yOffs - 14; + btn.setX(guiLeft + 78); + btn.setY(yOffs - 14); - btn.render(graphics.poseStack(), pMouseX, (int)(pMouseY - scrollOffset), pPartialTick); + btn.render(graphics.graphics(), pMouseX, (int)(pMouseY - scrollOffset), pPartialTick); } if (btn.isExpanded()) { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteOverlaySettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteOverlaySettingsScreen.java index e8da0f3b..f39d3d78 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteOverlaySettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/RouteOverlaySettingsScreen.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; +import com.mojang.text2speech.Narrator; import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.element.GuiGameElement; @@ -37,7 +38,6 @@ import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.chat.NarratorChatListener; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; @@ -158,9 +158,9 @@ protected void init() { ModClientConfig.ROUTE_NARRATOR.set(!ModClientConfig.ROUTE_NARRATOR.get()); if (ModClientConfig.ROUTE_NARRATOR.get()) { - NarratorChatListener.INSTANCE.narrator.say(narratorOn.getString(), true); + Narrator.getNarrator().say(narratorOn.getString(), true); } else { - NarratorChatListener.INSTANCE.narrator.say(narratorOff.getString(), true); + Narrator.getNarrator().say(narratorOff.getString(), true); } }); buttons.add(soundButton); @@ -230,7 +230,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p GuiGameElement.of(renderedItem).at(guiLeft + GUI_WIDTH, guiTop + GUI_HEIGHT - 48, -200) .scale(5) - .render(graphics.poseStack()); + .render(graphics.graphics()); CreateDynamicWidgets.renderTextBox(graphics, guiLeft + 63, guiTop + 23, 43); @@ -242,13 +242,13 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p @Override public void renderFrontLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { buttons.performForEach(widget -> { - if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused()) { + if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHovered()) { List tooltip = simiWidget.getToolTip(); if (tooltip.isEmpty()) return; - int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.x; - int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.y; - renderComponentTooltip(graphics.poseStack(), tooltip, ttx, tty); + int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.getX(); + int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.getY(); + graphics.graphics().renderComponentTooltip(font, tooltip, ttx, tty); } }); super.renderFrontLayer(graphics, pMouseX, pMouseY, pPartialTick); diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/SearchSettingsScreen.java b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/SearchSettingsScreen.java index d9068104..62cd8615 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/screen/SearchSettingsScreen.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/screen/SearchSettingsScreen.java @@ -36,7 +36,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.components.MultiLineLabel; -import net.minecraft.client.gui.components.Widget; +import net.minecraft.client.gui.components.Renderable; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; @@ -186,7 +186,7 @@ private void renderDefaultOptionWidget(Graphics graphics, int x, int y, String t graphics.poseStack().pushPose(); GuiUtils.drawString(graphics, shadowlessFont, x + 25, y + 6, TextUtils.text(text), 0xFFFFFF, EAlignment.LEFT, false); graphics.poseStack().scale(0.75f, 0.75f, 0.75f); - label.renderLeftAligned(graphics.poseStack(), (int)((x + 25) / 0.75f), (int)((y + 19) / 0.75f), 10, 0xDBDBDB); + label.renderLeftAligned(graphics.graphics(), (int)((x + 25) / 0.75f), (int)((y + 19) / 0.75f), 10, 0xDBDBDB); graphics.poseStack().popPose(); } @@ -271,7 +271,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p CreateDynamicWidgets.renderTextSlotOverlay(graphics, wX + 6, dY + (i * ARRAY_ENTRY_HEIGHT) + 1, 16, ARRAY_ENTRY_HEIGHT - 2); if (ModClientConfig.TRAIN_GROUP_FILTER_BLACKLIST.get().stream().noneMatch(x -> x.equals(group.getGroupName()))) { - AllIcons.I_CONFIRM.render(graphics.poseStack(), wX + 6, dY + (i * ARRAY_ENTRY_HEIGHT) + 2); + AllIcons.I_CONFIRM.render(graphics.graphics(), wX + 6, dY + (i * ARRAY_ENTRY_HEIGHT) + 2); } if (workingArea.isInBounds(pMouseX, pMouseY) && area.isInBounds(pMouseX, pMouseY - scrollOffset)) { @@ -300,7 +300,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p trainGroupResetButton.setXOffset(wX + defaultWidth - 2 - 32); trainGroupResetButton.setYOffset(wY + defaultDescriptionHeight / 2 - 7); - AllIcons.I_REFRESH.render(graphics.poseStack(), trainGroupResetButton.getX(), trainGroupResetButton.getY()); + AllIcons.I_REFRESH.render(graphics.graphics(), trainGroupResetButton.getX(), trainGroupResetButton.getY()); if (trainGroupsExpanded) { ModGuiIcons.COLLAPSE.render(graphics, trainGroupExpandButton.getX(), trainGroupExpandButton.getY()); } else { @@ -323,7 +323,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p GuiUtils.fillGradient(graphics, guiLeft + AREA_X, guiTop + AREA_Y + AREA_H - 10, 0, AREA_W, 10, 0x00000000, 0x77000000); // widgets y offset - transferTimeInput.y = (int)(transferTimeInputInitialY + scrollOffset); + transferTimeInput.setY((int)(transferTimeInputInitialY + scrollOffset)); // set scrollbar values maxY = wY - AREA_H; @@ -354,15 +354,15 @@ public void renderFrontLayer(Graphics graphics, int pMouseX, int pMouseY, float GuiUtils.renderTooltipWithOffset(this, trainGroupResetButton, List.of(tooltipTrainGroupsReset), width, graphics, pMouseX, pMouseY, 0, scrollOffset); } - for (Widget widget : renderables) { + for (Renderable widget : renderables) { if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused() && simiWidget.visible) { List tooltip = simiWidget.getToolTip(); if (tooltip.isEmpty()) continue; - int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.x; - int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.y; - renderComponentTooltip(graphics.poseStack(), tooltip, ttx, tty); + int ttx = simiWidget.lockedTooltipX == -1 ? pMouseX : simiWidget.lockedTooltipX + simiWidget.getX(); + int tty = simiWidget.lockedTooltipY == -1 ? pMouseY : simiWidget.lockedTooltipY + simiWidget.getY(); + graphics.graphics().renderComponentTooltip(font, tooltip, ttx, tty); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AliasEntryWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AliasEntryWidget.java index 2fa32994..4f6864b5 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AliasEntryWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/AliasEntryWidget.java @@ -5,7 +5,6 @@ import java.util.HashMap; import java.util.Map.Entry; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import de.mrjulsen.crn.Constants; @@ -159,7 +158,7 @@ public void setYPos(int y) { deleteButton = new GuiAreaDefinition(x + 165, y + 6, 16, 16); expandButton = new GuiAreaDefinition(x + 182, y + 6, 16, 16); addButton = new GuiAreaDefinition(x + 165, y + 26 + (alias.getAllStationNames().size() * STATION_ENTRY_HEIGHT) + 2, 16, 16); - titleBox.y = y + 10; + titleBox.setY(y + 10); initStationDeleteButtons(); } @@ -217,9 +216,9 @@ private void addStation(String name, StationInfo info) { }); newEntryBox.setValue(""); - newEntryBox.setFocus(false); + newEntryBox.setFocused(false); newEntryPlatformBox.setValue(""); - newEntryPlatformBox.setFocus(false); + newEntryPlatformBox.setFocused(false); } private boolean setAliasName(String name) { @@ -273,10 +272,10 @@ private void editStationInfo(String stationName, GuiAreaDefinition buttonArea) { selectedStationName = stationName; editAliasPlatform.setValue(alias.getInfoForStation(selectedStationName).platform()); - editAliasPlatform.x = buttonArea.getLeft() + 1; - editAliasPlatform.y = buttonArea.getTop() + 1; + editAliasPlatform.setX(buttonArea.getLeft() + 1); + editAliasPlatform.setY(buttonArea.getTop() + 1); editAliasPlatform.visible = true; - editAliasPlatform.setFocus(true); + editAliasPlatform.setFocused(true); } @Override @@ -289,8 +288,8 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p if (expanded) { Map names = alias.getAllStations(); GuiUtils.drawTexture(GUI_WIDGETS, graphics, x + 25, y + 5, 0, 92, 139, 18); // textbox - newEntryBox.y = y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6; - newEntryPlatformBox.y = y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6; + newEntryBox.setY(y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6); + newEntryPlatformBox.setY(y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6); for (int i = 0; i < names.size(); i++) { GuiUtils.drawTexture(GUI_WIDGETS, graphics, x, y + 26 + (i * STATION_ENTRY_HEIGHT), 0, 48, 200, STATION_ENTRY_HEIGHT); @@ -404,12 +403,12 @@ public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float pa } @Override - public void renderSuggestions(PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { + public void renderSuggestions(Graphics graphics, int mouseX, int mouseY, float partialTicks) { if (destinationSuggestions != null) { - matrixStack.pushPose(); - matrixStack.translate(0, -parent.getScrollOffset(partialTicks), 500); - destinationSuggestions.render(matrixStack, mouseX, mouseY + parent.getScrollOffset(partialTicks)); - matrixStack.popPose(); + graphics.poseStack().pushPose(); + graphics.poseStack().translate(0, -parent.getScrollOffset(partialTicks), 500); + destinationSuggestions.render(graphics.graphics(), mouseX, mouseY + parent.getScrollOffset(partialTicks)); + graphics.poseStack().popPose(); } } @@ -435,7 +434,7 @@ public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { } } - editAliasPlatform.setFocus(false); + editAliasPlatform.setFocused(false); if (deleteButton.isInBounds(pMouseX, pMouseY)) { deleteAlias(); @@ -477,7 +476,7 @@ private void clearSuggestions() { protected void updateEditorSubwidgets(DLEditBox field) { clearSuggestions(); - destinationSuggestions = new ModStationSuggestions(minecraft, parent, field, minecraft.font, getViableStations(field), field.getHeight() + 2 + field.y); + destinationSuggestions = new ModStationSuggestions(minecraft, parent, field, minecraft.font, getViableStations(field), field.getHeight() + 2 + field.getY()); destinationSuggestions.setAllowSuggestions(true); destinationSuggestions.updateCommandInfo(); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIconButton.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIconButton.java index 581f8e59..15f7df95 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIconButton.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIconButton.java @@ -38,15 +38,5 @@ public boolean isMouseSelected() { public void setMouseSelected(boolean selected) { this.mouseSelected = selected; } - - @Override - public int getX() { - return x; - } - - @Override - public int getY() { - return y; - } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIndicator.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIndicator.java index ef086b2e..152bc50f 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIndicator.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateIndicator.java @@ -33,16 +33,6 @@ public boolean isMouseSelected() { @Override public void setMouseSelected(boolean selected) { this.mouseSelected = selected; - } - - @Override - public int getX() { - return x; - } - - @Override - public int getY() { - return y; - } + } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateLabel.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateLabel.java index b9643fd3..a9ece070 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateLabel.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateLabel.java @@ -34,15 +34,5 @@ public boolean isMouseSelected() { public void setMouseSelected(boolean selected) { this.mouseSelected = selected; } - - @Override - public int getX() { - return x; - } - - @Override - public int getY() { - return y; - } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java index c54605b8..99e35a73 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/DLCreateSelectionScrollInput.java @@ -33,15 +33,5 @@ public boolean isMouseSelected() { public void setMouseSelected(boolean selected) { this.mouseSelected = selected; } - - @Override - public int getX() { - return x; - } - - @Override - public int getY() { - return y; - } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ExpandButton.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ExpandButton.java index 2518f7b5..45d74930 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ExpandButton.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ExpandButton.java @@ -45,10 +45,10 @@ public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { @Override public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { if (isMouseOver(pMouseX, pMouseY)) { - GuiUtils.fill(graphics, x, y, width, height, 0x1AFFFFFF); - GuiUtils.drawString(graphics, font, x + width / 2, y + height / 2 - font.lineHeight / 2, expanded ? TextUtils.text(collapseText).withStyle(ChatFormatting.UNDERLINE) : TextUtils.text(expandText).withStyle(ChatFormatting.UNDERLINE), 0xFFFFFF, EAlignment.CENTER, true); + GuiUtils.fill(graphics, getX(), getY(), width, height, 0x1AFFFFFF); + GuiUtils.drawString(graphics, font, getX() + width / 2, getY() + height / 2 - font.lineHeight / 2, expanded ? TextUtils.text(collapseText).withStyle(ChatFormatting.UNDERLINE) : TextUtils.text(expandText).withStyle(ChatFormatting.UNDERLINE), 0xFFFFFF, EAlignment.CENTER, true); } else { - GuiUtils.drawString(graphics, font, x + width / 2, y + height / 2 - font.lineHeight / 2, expanded ? TextUtils.text(collapseText) : TextUtils.text(expandText), 0xFFFFFF, EAlignment.CENTER, true); + GuiUtils.drawString(graphics, font, getX() + width / 2, getY() + height / 2 - font.lineHeight / 2, expanded ? TextUtils.text(collapseText) : TextUtils.text(expandText), 0xFFFFFF, EAlignment.CENTER, true); } } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IEntryListSettingsOption.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IEntryListSettingsOption.java index ccc91eab..1d60da4e 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IEntryListSettingsOption.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/IEntryListSettingsOption.java @@ -1,12 +1,12 @@ package de.mrjulsen.crn.client.gui.widgets; -import com.mojang.blaze3d.vertex.PoseStack; +import de.mrjulsen.mcdragonlib.client.util.Graphics; public interface IEntryListSettingsOption { void setYPos(int y); void tick(); int calcHeight(); - void renderSuggestions(PoseStack poseStack, int mouseX, int mouseY, float partialTicks); + void renderSuggestions(Graphics graphics, int mouseX, int mouseY, float partialTicks); /** * This method is always called, even if the used clicked outside the working area of the container window. * This additional method should fix the usage of the suggestions popup, which can be rendered outside of the working area. diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ModCommandSuggestions.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ModCommandSuggestions.java index 4664093d..7d1e36a6 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ModCommandSuggestions.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/ModCommandSuggestions.java @@ -3,7 +3,6 @@ import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.Message; import com.mojang.brigadier.ParseResults; @@ -17,6 +16,9 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder; import com.mojang.brigadier.tree.CommandNode; import com.mojang.brigadier.tree.LiteralCommandNode; + +import de.mrjulsen.mcdragonlib.util.TextUtils; + import java.util.Collection; import java.util.List; import java.util.Locale; @@ -30,8 +32,7 @@ import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.GuiComponent; -import net.minecraft.client.gui.chat.NarratorChatListener; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.renderer.Rect2i; @@ -40,7 +41,6 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; import net.minecraft.world.phys.Vec2; @@ -69,7 +69,6 @@ public class ModCommandSuggestions { private CompletableFuture pendingSuggestions; @Nullable protected ModCommandSuggestions.SuggestionsList suggestions; - private boolean allowSuggestions; boolean keepSuggestions; public ModCommandSuggestions(Minecraft pMinecraft, Screen pScreen, EditBox pInput, Font pFont, boolean pCommandsOnly, boolean pOnlyShowIfCursorPastError, int pLineStartOffset, int pSuggestionLineLimit, boolean pAnchorToBottom, int pFillColor) { @@ -87,7 +86,6 @@ public ModCommandSuggestions(Minecraft pMinecraft, Screen pScreen, EditBox pInpu } public void setAllowSuggestions(boolean pAutoSuggest) { - this.allowSuggestions = pAutoSuggest; if (!pAutoSuggest) { this.suggestions = null; } @@ -210,7 +208,7 @@ private static int getLastWordIndex(String pText) { private static FormattedCharSequence getExceptionMessage(CommandSyntaxException pException) { Component component = ComponentUtils.fromMessage(pException.getRawMessage()); String s = pException.getContext(); - return s == null ? component.getVisualOrderText() : (new TranslatableComponent("command.context.parse_error", component, pException.getCursor(), s)).getVisualOrderText(); + return s == null ? component.getVisualOrderText() : (TextUtils.translate("command.context.parse_error", component, pException.getCursor(), s)).getVisualOrderText(); } private void updateUsageInfo() { @@ -242,10 +240,6 @@ private void updateUsageInfo() { } this.suggestions = null; - if (this.allowSuggestions && this.minecraft.options.autoSuggestions) { - this.showSuggestions(false); - } - } private void fillNodeUsage(ChatFormatting pFormatting) { @@ -319,22 +313,33 @@ private static FormattedCharSequence formatText(ParseResults pSuggestionList, boolean pNarrateFirstSuggestion) { int i = pXPos - 1; int j = ModCommandSuggestions.this.anchorToBottom ? pYPos - 3 - Math.min(pSuggestionList.size(), ModCommandSuggestions.this.suggestionLineLimit) * 12 : pYPos; this.rect = new Rect2i(i, j, pWidth + 1, Math.min(pSuggestionList.size(), ModCommandSuggestions.this.suggestionLineLimit) * 12); this.originalContents = ModCommandSuggestions.this.input.getValue(); - this.lastNarratedEntry = pNarrateFirstSuggestion ? -1 : 0; this.suggestionList = pSuggestionList; this.select(0); } - public void render(PoseStack pPoseStack, int pMouseX, int pMouseY) { - int i = Math.min(this.suggestionList.size(), ModCommandSuggestions.this.suggestionLineLimit); + public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) { + int i = Math.min(this.suggestionList.size(), suggestionLineLimit); boolean flag = this.offset > 0; boolean flag1 = this.suggestionList.size() > this.offset + i; boolean flag2 = flag || flag1; @@ -370,12 +373,12 @@ public void render(PoseStack pPoseStack, int pMouseX, int pMouseY) { } if (flag2) { - GuiComponent.fill(pPoseStack, this.rect.getX(), this.rect.getY() - 1, this.rect.getX() + this.rect.getWidth(), this.rect.getY(), ModCommandSuggestions.this.fillColor); - GuiComponent.fill(pPoseStack, this.rect.getX(), this.rect.getY() + this.rect.getHeight(), this.rect.getX() + this.rect.getWidth(), this.rect.getY() + this.rect.getHeight() + 1, ModCommandSuggestions.this.fillColor); + pGuiGraphics.fill(this.rect.getX(), this.rect.getY() - 1, this.rect.getX() + this.rect.getWidth(), this.rect.getY(), fillColor); + pGuiGraphics.fill(this.rect.getX(), this.rect.getY() + this.rect.getHeight(), this.rect.getX() + this.rect.getWidth(), this.rect.getY() + this.rect.getHeight() + 1, fillColor); if (flag) { for(int k = 0; k < this.rect.getWidth(); ++k) { if (k % 2 == 0) { - GuiComponent.fill(pPoseStack, this.rect.getX() + k, this.rect.getY() - 1, this.rect.getX() + k + 1, this.rect.getY(), -1); + pGuiGraphics.fill(this.rect.getX() + k, this.rect.getY() - 1, this.rect.getX() + k + 1, this.rect.getY(), -1); } } } @@ -383,7 +386,7 @@ public void render(PoseStack pPoseStack, int pMouseX, int pMouseY) { if (flag1) { for(int i1 = 0; i1 < this.rect.getWidth(); ++i1) { if (i1 % 2 == 0) { - GuiComponent.fill(pPoseStack, this.rect.getX() + i1, this.rect.getY() + this.rect.getHeight(), this.rect.getX() + i1 + 1, this.rect.getY() + this.rect.getHeight() + 1, -1); + pGuiGraphics.fill(this.rect.getX() + i1, this.rect.getY() + this.rect.getHeight(), this.rect.getX() + i1 + 1, this.rect.getY() + this.rect.getHeight() + 1, -1); } } } @@ -393,7 +396,7 @@ public void render(PoseStack pPoseStack, int pMouseX, int pMouseY) { for(int l = 0; l < i; ++l) { Suggestion suggestion = this.suggestionList.get(l + this.offset); - GuiComponent.fill(pPoseStack, this.rect.getX(), this.rect.getY() + 12 * l, this.rect.getX() + this.rect.getWidth(), this.rect.getY() + 12 * l + 12, ModCommandSuggestions.this.fillColor); + pGuiGraphics.fill(this.rect.getX(), this.rect.getY() + 12 * l, this.rect.getX() + this.rect.getWidth(), this.rect.getY() + 12 * l + 12, fillColor); if (pMouseX > this.rect.getX() && pMouseX < this.rect.getX() + this.rect.getWidth() && pMouseY > this.rect.getY() + 12 * l && pMouseY < this.rect.getY() + 12 * l + 12) { if (flag3) { this.select(l + this.offset); @@ -402,13 +405,13 @@ public void render(PoseStack pPoseStack, int pMouseX, int pMouseY) { flag4 = true; } - ModCommandSuggestions.this.font.drawShadow(pPoseStack, suggestion.getText(), (float)(this.rect.getX() + 1), (float)(this.rect.getY() + 2 + 12 * l), l + this.offset == this.current ? -256 : -5592406); + pGuiGraphics.drawString(font, suggestion.getText(), this.rect.getX() + 1, this.rect.getY() + 2 + 12 * l, l + this.offset == this.current ? -256 : -5592406); } if (flag4) { Message message = this.suggestionList.get(this.current).getTooltip(); if (message != null) { - ModCommandSuggestions.this.screen.renderTooltip(pPoseStack, ComponentUtils.fromMessage(message), pMouseX, pMouseY); + pGuiGraphics.renderTooltip(font, ComponentUtils.fromMessage(message), pMouseX, pMouseY); } } @@ -485,9 +488,7 @@ public void select(int pIndex) { Suggestion suggestion = this.suggestionList.get(this.current); ModCommandSuggestions.this.input.setSuggestion(ModCommandSuggestions.calculateSuggestionSuffix(ModCommandSuggestions.this.input.getValue(), suggestion.apply(this.originalContents))); - if (this.lastNarratedEntry != this.current) { - NarratorChatListener.INSTANCE.sayNow(this.getNarrationMessage()); - } + } @@ -504,10 +505,9 @@ public void useSuggestion() { } Component getNarrationMessage() { - this.lastNarratedEntry = this.current; Suggestion suggestion = this.suggestionList.get(this.current); Message message = suggestion.getTooltip(); - return message != null ? new TranslatableComponent("narration.suggestion.tooltip", this.current + 1, this.suggestionList.size(), suggestion.getText(), message) : new TranslatableComponent("narration.suggestion", this.current + 1, this.suggestionList.size(), suggestion.getText()); + return message != null ? TextUtils.translate("narration.suggestion.tooltip", this.current + 1, this.suggestionList.size(), suggestion.getText(), message) : TextUtils.translate("narration.suggestion", this.current + 1, this.suggestionList.size(), suggestion.getText()); } public void hide() { diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteEntryOverviewWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteEntryOverviewWidget.java index 3a966afa..8e7d96b0 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteEntryOverviewWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/RouteEntryOverviewWidget.java @@ -74,8 +74,8 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p if (!beforeJourney) { color = ColorUtils.applyTint(color, 0x663300); } - CreateDynamicWidgets.renderSingleShadeWidget(graphics, x, y, WIDTH, HEIGHT, color); - CreateDynamicWidgets.renderHorizontalSeparator(graphics, x + 6, y + 22, 188); + CreateDynamicWidgets.renderSingleShadeWidget(graphics, getX(), getY(), WIDTH, HEIGHT, color); + CreateDynamicWidgets.renderHorizontalSeparator(graphics, getX() + 6, getY() + 22, 188); Minecraft minecraft = Minecraft.getInstance(); SimpleRoutePart[] parts = route.getParts().toArray(SimpleRoutePart[]::new); @@ -100,7 +100,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p float localScale = shadowlessFont.width(line) > WIDTH - 12 ? scale : 1; graphics.poseStack().pushPose(); graphics.poseStack().scale(localScale, 1, 1); - GuiUtils.drawString(graphics, minecraft.font, (int)((x + 6) / localScale), y + 5, line, 0xFFFFFF, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, minecraft.font, (int)((getX() + 6) / localScale), getY() + 5, line, 0xFFFFFF, EAlignment.LEFT, false); graphics.poseStack().popPose(); int routePartWidth = DISPLAY_WIDTH / parts.length; @@ -108,32 +108,32 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p int textW = shadowlessFont.width(end); for (int i = 0; i < parts.length; i++) { - GuiUtils.fill(graphics, x + 5 + (i * routePartWidth) + 1, y + 27, routePartWidth - 2, 11, 0xFF393939); + GuiUtils.fill(graphics, getX() + 5 + (i * routePartWidth) + 1, getY() + 27, routePartWidth - 2, 11, 0xFF393939); } graphics.poseStack().pushPose(); graphics.poseStack().scale(scale, scale, scale); if (route.getStartStation().shouldRenderRealtime()) { - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + 6 + shadowlessFont.width(timeStart) * localScale / 2.0f) / scale) - shadowlessFont.width(timeStart) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)(route.getStartStation().getEstimatedTimeWithThreshold() % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getStartStation().isDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + 6 + shadowlessFont.width(timeStart) * localScale / 2.0f) / scale) - shadowlessFont.width(timeStart) / 2, (int)((getY() + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)(route.getStartStation().getEstimatedTimeWithThreshold() % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getStartStation().isDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } if (route.getEndStation().shouldRenderRealtime()) { - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + 6 + shadowlessFont.width(timeEnd) * localScale * 1.5f + (shadowlessFont.width(dash)) * localScale) / scale) - shadowlessFont.width(timeEnd) / 2, (int)((y + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)(route.getEndStation().getEstimatedTimeWithThreshold() % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getEndStation().isDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + 6 + shadowlessFont.width(timeEnd) * localScale * 1.5f + (shadowlessFont.width(dash)) * localScale) / scale) - shadowlessFont.width(timeEnd) / 2, (int)((getY() + 15) / scale), TextUtils.text(TimeUtils.parseTime((int)(route.getEndStation().getEstimatedTimeWithThreshold() % 24000 + DragonLib.DAYTIME_SHIFT), ModClientConfig.TIME_FORMAT.get())), route.getEndStation().isDelayed() ? Constants.COLOR_DELAYED : Constants.COLOR_ON_TIME, EAlignment.LEFT, false); } if (!route.isValid()) { - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + WIDTH - 5) / scale) - shadowlessFont.width(trainCanceled), (int)((y + 15) / scale), trainCanceled, Constants.COLOR_DELAYED, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + WIDTH - 5) / scale) - shadowlessFont.width(trainCanceled), (int)((getY() + 15) / scale), trainCanceled, Constants.COLOR_DELAYED, EAlignment.LEFT, false); } else if (!beforeJourney) { - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + WIDTH - 5) / scale) - shadowlessFont.width(connectionInPast), (int)((y + 15) / scale), connectionInPast, Constants.COLOR_DELAYED, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + WIDTH - 5) / scale) - shadowlessFont.width(connectionInPast), (int)((getY() + 15) / scale), connectionInPast, Constants.COLOR_DELAYED, EAlignment.LEFT, false); } for (int i = 0; i < parts.length; i++) { - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + 5 + (i * routePartWidth) + (routePartWidth / 2)) / 0.75f), (int)((y + 30) / 0.75f), TextUtils.text(parts[i].getTrainName()), 0xFFFFFF, EAlignment.CENTER, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + 5 + (i * routePartWidth) + (routePartWidth / 2)) / 0.75f), (int)((getY() + 30) / 0.75f), TextUtils.text(parts[i].getTrainName()), 0xFFFFFF, EAlignment.CENTER, false); } - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + 6) / scale), (int)((y + 43) / scale), TextUtils.text(route.getStartStation().getStationName()), 0xDBDBDB, EAlignment.LEFT, false); - GuiUtils.drawString(graphics, shadowlessFont, (int)((x + WIDTH - 6) / scale) - textW, (int)((y + 43) / scale), TextUtils.text(end), 0xDBDBDB, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + 6) / scale), (int)((getY() + 43) / scale), TextUtils.text(route.getStartStation().getStationName()), 0xDBDBDB, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, (int)((getX() + WIDTH - 6) / scale) - textW, (int)((getY() + 43) / scale), TextUtils.text(end), 0xDBDBDB, EAlignment.LEFT, false); graphics.poseStack().popPose(); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SettingsOptionWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SettingsOptionWidget.java index 408a1afe..62e6cb87 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SettingsOptionWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/SettingsOptionWidget.java @@ -48,13 +48,14 @@ public SettingsOptionWidget(Screen parent, int pX, int pY, Component title, Comp public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float pPartialTick) { float l = isMouseOver(pMouseX, pMouseY) && isHovered ? 0.2f : 0; GuiUtils.setTint(1 + l, 1 + l, 1 + l, 1); - GuiUtils.drawTexture(Constants.GUI_WIDGETS, graphics, x, y, 0, 0, WIDTH, HEIGHT); + GuiUtils.drawTexture(Constants.GUI_WIDGETS, graphics, getX(), getY(), 0, 0, WIDTH, HEIGHT); - GuiUtils.drawString(graphics, shadowlessFont, x + 6, y + 5, getMessage(), 0xFFFFFF, EAlignment.LEFT, false); + GuiUtils.drawString(graphics, shadowlessFont, getX() + 6, getY() + 5, getMessage(), 0xFFFFFF, EAlignment.LEFT, false); graphics.poseStack().scale(0.75f, 0.75f, 0.75f); - this.messageLabel.renderLeftAligned(graphics.poseStack(), (int)((x + 6) / 0.75f), (int)((y + 20) / 0.75f), 10, 0xDBDBDB); + this.messageLabel.renderLeftAligned(graphics.graphics(), (int)((getX() + 6) / 0.75f), (int)((getY() + 20) / 0.75f), 10, 0xDBDBDB); float s = 1 / 0.75f; graphics.poseStack().scale(s, s, s); + GuiUtils.setTint(1, 1, 1, 1); } @Override diff --git a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainGroupEntryWidget.java b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainGroupEntryWidget.java index e0a17fe7..5c9d9172 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainGroupEntryWidget.java +++ b/common/src/main/java/de/mrjulsen/crn/client/gui/widgets/TrainGroupEntryWidget.java @@ -6,7 +6,6 @@ import java.util.HashMap; import java.util.Map.Entry; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import com.simibubi.create.content.trains.station.NoShadowFontWrapper; import de.mrjulsen.crn.Constants; @@ -166,7 +165,7 @@ private void addTrain(String name) { }); newEntryBox.setValue(""); - newEntryBox.setFocus(false); + newEntryBox.setFocused(false); } private boolean setGroupName(String name) { @@ -218,18 +217,19 @@ public void setYPos(int y) { deleteButton = new GuiAreaDefinition(x + 165, y + 6, 16, 16); expandButton = new GuiAreaDefinition(x + 182, y + 6, 16, 16); addButton = new GuiAreaDefinition(x + 165, y + 26 + (trainGroup.getTrainNames().size() * STATION_ENTRY_HEIGHT) + 2, 16, 16); - titleBox.y = y + 10; + titleBox.setY(y + 10); initStationDeleteButtons(); } @Override - public void renderSuggestions(PoseStack poseStack, int mouseX, int mouseY, float partialTicks) { + public void renderSuggestions(Graphics graphics, int mouseX, int mouseY, float partialTicks) { if (suggestions != null) { - poseStack.pushPose(); - poseStack.translate(0, -parent.getScrollOffset(partialTicks), 500); - suggestions.render(poseStack, mouseX, mouseY + parent.getScrollOffset(partialTicks)); - poseStack.popPose(); + graphics.poseStack().pushPose(); + graphics.poseStack().translate(0, -parent.getScrollOffset(partialTicks), 500); + suggestions.render(graphics.graphics(), mouseX, mouseY + parent.getScrollOffset(partialTicks)); + graphics.poseStack().popPose(); } + } @Override @@ -243,7 +243,7 @@ public void renderMainLayer(Graphics graphics, int pMouseX, int pMouseY, float p if (expanded) { Set names = trainGroup.getTrainNames(); GuiUtils.drawTexture(GUI_WIDGETS, graphics, x + 25, y + 5, 0, 92, 139, 18); // textbox - newEntryBox.y = y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6; + newEntryBox.setY(y + 26 + (names.size() * STATION_ENTRY_HEIGHT) + 6); for (int i = 0; i < names.size(); i++) { GuiUtils.drawTexture(GUI_WIDGETS, graphics, x, y + 26 + (i * STATION_ENTRY_HEIGHT), 0, 48, 200, STATION_ENTRY_HEIGHT); @@ -303,7 +303,7 @@ public void renderFrontLayer(Graphics graphics, int mouseX, int mouseY, float pa if (suggestions != null) { graphics.poseStack().pushPose(); graphics.poseStack().translate(0, -parent.getScrollOffset(partialTicks), 500); - suggestions.render(graphics.poseStack(), mouseX, mouseY + parent.getScrollOffset(partialTicks)); + suggestions.render(graphics.graphics(), mouseX, mouseY + parent.getScrollOffset(partialTicks)); graphics.poseStack().popPose(); } @@ -383,7 +383,7 @@ private void clearSuggestions() { protected void updateEditorSubwidgets(DLEditBox field) { clearSuggestions(); - suggestions = new ModStationSuggestions(minecraft, parent, field, minecraft.font, getViableTrains(field), field.getHeight() + 2 + field.y); + suggestions = new ModStationSuggestions(minecraft, parent, field, minecraft.font, getViableTrains(field), field.getHeight() + 2 + field.getY()); suggestions.setAllowSuggestions(true); suggestions.updateCommandInfo(); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java b/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java index ba0d40ac..c349b507 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java +++ b/common/src/main/java/de/mrjulsen/crn/client/lang/ELanguage.java @@ -40,7 +40,7 @@ public static ELanguage getByCode(String code) { public static MutableComponent translate(String key) { if (Platform.getEnv() == EnvType.CLIENT) { - ModTranslatableComponent comp = new ModTranslatableComponent(key); + MutableComponent comp = MutableComponent.create(new ModTranslatableComponent(key, TextUtils.translate(key).getString(), ModTranslatableComponent.NO_ARGS)); if (comp.getString().equals(key)) { return TextUtils.translate(key); } @@ -52,7 +52,7 @@ public static MutableComponent translate(String key) { public static MutableComponent translate(String key, Object... args) { if (Platform.getEnv() == EnvType.CLIENT) { - ModTranslatableComponent comp = new ModTranslatableComponent(key, args); + MutableComponent comp = MutableComponent.create(new ModTranslatableComponent(key, TextUtils.translate(key).getString(), args)); if (comp.getString().equals(key)) { return TextUtils.translate(key); } diff --git a/common/src/main/java/de/mrjulsen/crn/client/lang/ModTranslatableComponent.java b/common/src/main/java/de/mrjulsen/crn/client/lang/ModTranslatableComponent.java index 5437d3e9..69a4ed58 100644 --- a/common/src/main/java/de/mrjulsen/crn/client/lang/ModTranslatableComponent.java +++ b/common/src/main/java/de/mrjulsen/crn/client/lang/ModTranslatableComponent.java @@ -13,204 +13,204 @@ import java.util.function.Consumer; import java.util.regex.Matcher; import java.util.regex.Pattern; + import net.minecraft.commands.CommandSourceStack; import net.minecraft.locale.Language; -import net.minecraft.network.chat.BaseComponent; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.ComponentContents; import net.minecraft.network.chat.ComponentUtils; -import net.minecraft.network.chat.ContextAwareComponent; import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TranslatableFormatException; +import net.minecraft.network.chat.contents.TranslatableFormatException; import net.minecraft.world.entity.Entity; import org.jetbrains.annotations.Nullable; @SuppressWarnings("all") -public class ModTranslatableComponent extends BaseComponent implements ContextAwareComponent { - private static final Object[] NO_ARGS = new Object[0]; - private static final FormattedText TEXT_PERCENT = FormattedText.of("%"); - private static final FormattedText TEXT_NULL = FormattedText.of("null"); - private final String key; - private final Object[] args; - @Nullable - private Language decomposedWith; - private List decomposedParts = ImmutableList.of(); - private static final Pattern FORMAT_PATTERN = Pattern.compile("%(?:(\\d+)\\$)?([A-Za-z%]|$)"); - - public ModTranslatableComponent(String key) { - this.key = key; - this.args = NO_ARGS; - } - - public ModTranslatableComponent(String key, Object... args) { - this.key = key; - this.args = args; - } - - private void decompose() { - Language language = ClientWrapper.getCurrentClientLanguage(); - if (language != this.decomposedWith) { - this.decomposedWith = language; - String string = language.getOrDefault(this.key); - - try { - ImmutableList.Builder builder = ImmutableList.builder(); - Objects.requireNonNull(builder); - this.decomposeTemplate(string, builder::add); - this.decomposedParts = builder.build(); - } catch (TranslatableFormatException var4) { - this.decomposedParts = ImmutableList.of(FormattedText.of(string)); - } - - } - } - - private void decomposeTemplate(String formatTemplate, Consumer consumer) { - Matcher matcher = FORMAT_PATTERN.matcher(formatTemplate); - - int i = 0; - - int j; - int l; - for (j = 0; matcher.find(j); j = l) { - int k = matcher.start(); - l = matcher.end(); - String string; - if (k > j) { - string = formatTemplate.substring(j, k); - if (string.indexOf(37) != -1) { - throw new IllegalArgumentException(); - } - - consumer.accept(FormattedText.of(string)); - } - - string = matcher.group(2); - String string2 = formatTemplate.substring(k, l); - if ("%".equals(string) && "%%".equals(string2)) { - consumer.accept(TEXT_PERCENT); - } else { - if (!"s".equals(string)) { - throw new IllegalArgumentException("Unsupported format: '" + string2 + "'"); - } - - String string3 = matcher.group(1); - int m = string3 != null ? Integer.parseInt(string3) - 1 : i++; - if (m < this.args.length) { - consumer.accept(this.getArgument(m)); - } - } - } - - if (j < formatTemplate.length()) { - String string4 = formatTemplate.substring(j); - if (string4.indexOf(37) != -1) { - throw new IllegalArgumentException(); +public class ModTranslatableComponent implements ComponentContents { + public static final Object[] NO_ARGS = new Object[0]; + private static final FormattedText TEXT_PERCENT = FormattedText.of("%"); + private static final FormattedText TEXT_NULL = FormattedText.of("null"); + private final String key; + @Nullable + private final String fallback; + private final Object[] args; + @Nullable + private Language decomposedWith; + private List decomposedParts = ImmutableList.of(); + private static final Pattern FORMAT_PATTERN = Pattern.compile("%(?:(\\d+)\\$)?([A-Za-z%]|$)"); + + public ModTranslatableComponent(String key, @Nullable String fallback, Object[] args) { + this.key = key; + this.fallback = fallback; + this.args = args; + } + + private void decompose() { + Language language = ClientWrapper.getCurrentClientLanguage(); + if (language != this.decomposedWith) { + this.decomposedWith = language; + String string = this.fallback != null ? language.getOrDefault(this.key, this.fallback) : language.getOrDefault(this.key); + + try { + ImmutableList.Builder builder = ImmutableList.builder(); + Objects.requireNonNull(builder); + this.decomposeTemplate(string, builder::add); + this.decomposedParts = builder.build(); + } catch (TranslatableFormatException var4) { + this.decomposedParts = ImmutableList.of(FormattedText.of(string)); + } + + } + } + + private void decomposeTemplate(String formatTemplate, Consumer consumer) { + Matcher matcher = FORMAT_PATTERN.matcher(formatTemplate); + + int i = 0; + + int j; + int l; + for(j = 0; matcher.find(j); j = l) { + int k = matcher.start(); + l = matcher.end(); + String string; + if (k > j) { + string = formatTemplate.substring(j, k); + if (string.indexOf(37) != -1) { + throw new IllegalArgumentException(); } - consumer.accept(FormattedText.of(string4)); - } - } - - private FormattedText getArgument(int index) { - if (index >= this.args.length) { - throw new IllegalArgumentException(this + ", " + index); - } else { - Object object = this.args[index]; - if (object instanceof Component) { - return (Component) object; - } else { - return object == null ? TEXT_NULL : FormattedText.of(object.toString()); - } - } - } - - public ModTranslatableComponent plainCopy() { - return new ModTranslatableComponent(this.key, this.args); - } - - public Optional visitSelf(FormattedText.StyledContentConsumer consumer, Style style) { - this.decompose(); - Iterator var3 = this.decomposedParts.iterator(); + consumer.accept(FormattedText.of(string)); + } - Optional optional; - do { - if (!var3.hasNext()) { - return Optional.empty(); + string = matcher.group(2); + String string2 = formatTemplate.substring(k, l); + if ("%".equals(string) && "%%".equals(string2)) { + consumer.accept(TEXT_PERCENT); + } else { + if (!"s".equals(string)) { + throw new IllegalArgumentException("Unsupported format: '" + string2 + "'"); } - FormattedText formattedText = (FormattedText) var3.next(); - optional = formattedText.visit(consumer, style); - } while (!optional.isPresent()); - - return optional; - } - - public Optional visitSelf(FormattedText.ContentConsumer consumer) { - this.decompose(); - Iterator var2 = this.decomposedParts.iterator(); - - Optional optional; - do { - if (!var2.hasNext()) { - return Optional.empty(); - } - - FormattedText formattedText = (FormattedText) var2.next(); - optional = formattedText.visit(consumer); - } while (!optional.isPresent()); - - return optional; - } - - public MutableComponent resolve(@Nullable CommandSourceStack commandSourceStack, @Nullable Entity entity, - int recursionDepth) throws CommandSyntaxException { - Object[] objects = new Object[this.args.length]; - - for (int i = 0; i < objects.length; ++i) { - Object object = this.args[i]; - if (object instanceof Component) { - objects[i] = ComponentUtils.updateForEntity(commandSourceStack, (Component) object, entity, - recursionDepth); - } else { - objects[i] = object; + String string3 = matcher.group(1); + int m = string3 != null ? Integer.parseInt(string3) - 1 : i++; + consumer.accept(this.getArgument(m)); + } + } + + if (j < formatTemplate.length()) { + String string4 = formatTemplate.substring(j); + if (string4.indexOf(37) != -1) { + throw new IllegalArgumentException(); + } + + consumer.accept(FormattedText.of(string4)); + } + } + + public final FormattedText getArgument(int index) { + if (index >= 0 && index < this.args.length) { + Object object = this.args[index]; + if (object instanceof Component) { + return (Component)object; + } else { + return object == null ? TEXT_NULL : FormattedText.of(object.toString()); + } + } else { + throw new IllegalArgumentException(this.toString()); + } + } + + public Optional visit(FormattedText.StyledContentConsumer styledContentConsumer, Style style) { + this.decompose(); + Iterator var3 = this.decomposedParts.iterator(); + + Optional optional; + do { + if (!var3.hasNext()) { + return Optional.empty(); + } + + FormattedText formattedText = (FormattedText)var3.next(); + optional = formattedText.visit(styledContentConsumer, style); + } while(!optional.isPresent()); + + return optional; + } + + public Optional visit(FormattedText.ContentConsumer contentConsumer) { + this.decompose(); + Iterator var2 = this.decomposedParts.iterator(); + + Optional optional; + do { + if (!var2.hasNext()) { + return Optional.empty(); + } + + FormattedText formattedText = (FormattedText)var2.next(); + optional = formattedText.visit(contentConsumer); + } while(!optional.isPresent()); + + return optional; + } + + public MutableComponent resolve(@Nullable CommandSourceStack nbtPathPattern, @Nullable Entity entity, int recursionDepth) throws CommandSyntaxException { + Object[] objects = new Object[this.args.length]; + + for(int i = 0; i < objects.length; ++i) { + Object object = this.args[i]; + if (object instanceof Component) { + objects[i] = ComponentUtils.updateForEntity(nbtPathPattern, (Component)object, entity, recursionDepth); + } else { + objects[i] = object; + } + } + + return MutableComponent.create(new ModTranslatableComponent(this.key, this.fallback, objects)); + } + + public boolean equals(Object object) { + if (this == object) { + return true; + } else { + boolean var10000; + if (object instanceof ModTranslatableComponent) { + ModTranslatableComponent translatableContents = (ModTranslatableComponent)object; + if (Objects.equals(this.key, translatableContents.key) && Objects.equals(this.fallback, translatableContents.fallback) && Arrays.equals(this.args, translatableContents.args)) { + var10000 = true; + return var10000; } - } - - return new ModTranslatableComponent(this.key, objects); - } - - public boolean equals(Object object) { - if (this == object) { - return true; - } else if (!(object instanceof ModTranslatableComponent)) { - return false; - } else { - ModTranslatableComponent ModTranslatableComponent = (ModTranslatableComponent) object; - return Arrays.equals(this.args, ModTranslatableComponent.args) && this.key.equals(ModTranslatableComponent.key) - && super.equals(object); - } - } - - public int hashCode() { - int i = super.hashCode(); - i = 31 * i + this.key.hashCode(); - i = 31 * i + Arrays.hashCode(this.args); - return i; - } - - public String toString() { - String var10000 = this.key; - return "ModTranslatableComponent{key='" + var10000 + "', args=" + Arrays.toString(this.args) + ", siblings=" - + this.siblings + ", style=" + this.getStyle() + "}"; - } - - public String getKey() { - return this.key; - } - - public Object[] getArgs() { - return this.args; - } + } + + var10000 = false; + return var10000; + } + } + + public int hashCode() { + int i = Objects.hashCode(this.key); + i = 31 * i + Objects.hashCode(this.fallback); + i = 31 * i + Arrays.hashCode(this.args); + return i; + } + + public String toString() { + String var10000 = this.key; + return "translation{key='" + var10000 + "'" + (this.fallback != null ? ", fallback='" + this.fallback + "'" : "") + ", args=" + Arrays.toString(this.args) + "}"; + } + + public String getKey() { + return this.key; + } + + @Nullable + public String getFallback() { + return this.fallback; + } + + public Object[] getArgs() { + return this.args; + } } diff --git a/common/src/main/java/de/mrjulsen/crn/event/listeners/JourneyListener.java b/common/src/main/java/de/mrjulsen/crn/event/listeners/JourneyListener.java index ceae7ef1..6c3d59c4 100644 --- a/common/src/main/java/de/mrjulsen/crn/event/listeners/JourneyListener.java +++ b/common/src/main/java/de/mrjulsen/crn/event/listeners/JourneyListener.java @@ -27,7 +27,6 @@ import de.mrjulsen.mcdragonlib.util.TimeUtils; import net.minecraft.client.Minecraft; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.KeybindComponent; public class JourneyListener { @@ -123,7 +122,7 @@ public JourneyListener start() { TimeUtils.parseTime((int)((currentStation().getEstimatedTimeWithThreshold() + DragonLib.DAYTIME_SHIFT) % DragonLib.TICKS_PER_DAY), ModClientConfig.TIME_FORMAT.get()), currentStation().getInfo().platform() ); - String narratorText = text.getString() + ". " + ELanguage.translate(keyOptionsText, new KeybindComponent(keyKeybindOptions)).getString(); + String narratorText = text.getString() + ". " + ELanguage.translate(keyOptionsText, TextUtils.keybind(keyKeybindOptions)).getString(); onJourneyBegin.values().forEach(x -> { if (x.isPresent()) { diff --git a/common/src/main/java/de/mrjulsen/crn/mixin/MountedStorageManagerMixin.java b/common/src/main/java/de/mrjulsen/crn/mixin/MountedStorageManagerMixin.java index bb359108..2d37d40a 100644 --- a/common/src/main/java/de/mrjulsen/crn/mixin/MountedStorageManagerMixin.java +++ b/common/src/main/java/de/mrjulsen/crn/mixin/MountedStorageManagerMixin.java @@ -25,7 +25,7 @@ public class MountedStorageManagerMixin { for (BlockEntity be : beList) { if (be instanceof IContraptionBlockEntity tile) { - tile.contraptionTick(entity.level, be.getBlockPos(), be.getBlockState(), entity.getContraption()); + tile.contraptionTick(entity.level(), be.getBlockPos(), be.getBlockState(), entity.getContraption()); } } diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java index ea031060..8daf099d 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/AdvancedDisplayUpdatePacket.java @@ -78,7 +78,7 @@ public void handle(AdvancedDisplayUpdatePacket packet, Supplier c contextSupplier.get().queue(() -> { Player player = contextSupplier.get().getPlayer(); if (player != null) { - Level level = player.getLevel(); + Level level = player.level(); apply(level, packet); } }); diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NavigationRequestPacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NavigationRequestPacket.java index 5e3b7d4a..7acf9108 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NavigationRequestPacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NavigationRequestPacket.java @@ -60,7 +60,7 @@ public void handle(NavigationRequestPacket packet, Supplier conte contextSupplier.get().queue(() -> { Thread navigationThread = new Thread(() -> { List routes = new ArrayList<>(); - final long updateTime = contextSupplier.get().getPlayer().level.getDayTime(); + final long updateTime = contextSupplier.get().getPlayer().level().getDayTime(); final long startTime = System.currentTimeMillis(); try { @@ -71,7 +71,7 @@ public void handle(NavigationRequestPacket packet, Supplier conte return; } - Graph graph = new Graph(contextSupplier.get().getPlayer().getLevel(), packet.filterSettings); + Graph graph = new Graph(contextSupplier.get().getPlayer().level(), packet.filterSettings); routes.addAll(graph.navigate(startAlias, endAlias, true)); } catch (Exception e) { CreateRailwaysNavigator.LOGGER.error("Navigation error: ", e); diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NearestStationRequestPacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NearestStationRequestPacket.java index 56c9b980..5a8b553a 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NearestStationRequestPacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NearestStationRequestPacket.java @@ -22,7 +22,7 @@ public class NearestStationRequestPacket implements IPacketBase c Thread navigationThread = new Thread(() -> { NearestTrackStationResult result = NearestTrackStationResult.empty(); try { - result = TrainUtils.getNearestTrackStation(contextSupplier.get().getPlayer().getLevel(), packet.pos); + result = TrainUtils.getNearestTrackStation(contextSupplier.get().getPlayer().level(), packet.pos); } catch (Exception e) { CreateRailwaysNavigator.LOGGER.error("Error while trying to find nearest track station ", e); CreateRailwaysNavigator.net().CHANNEL.sendToPlayer((ServerPlayer)contextSupplier.get().getPlayer(), new ServerErrorPacket(e.getMessage())); diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NextConnectionsRequestPacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NextConnectionsRequestPacket.java index 9199d9ea..beb6a549 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NextConnectionsRequestPacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/NextConnectionsRequestPacket.java @@ -49,7 +49,7 @@ public NextConnectionsRequestPacket decode(FriendlyByteBuf buffer) { public void handle(NextConnectionsRequestPacket packet, Supplier contextSupplier) { contextSupplier.get().queue(() -> { new Thread(() -> { - final long updateTime = contextSupplier.get().getPlayer().getLevel().getDayTime(); + final long updateTime = contextSupplier.get().getPlayer().level().getDayTime(); CreateRailwaysNavigator.net().CHANNEL.sendToPlayer((ServerPlayer)contextSupplier.get().getPlayer(), new NextConnectionsResponsePacket(packet.requestId, TrainUtils.getConnectionsAt(packet.currentStationName, packet.trainId, (int)packet.ticksToNextStop), updateTime)); }, "Connections Loader").run(); }); diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/RealtimeRequestPacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/RealtimeRequestPacket.java index f624853a..d23b0b9a 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/RealtimeRequestPacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/RealtimeRequestPacket.java @@ -52,7 +52,7 @@ public RealtimeRequestPacket decode(FriendlyByteBuf buffer) { @Override public void handle(RealtimeRequestPacket packet, Supplier contextSupplier) { contextSupplier.get().queue(() -> { - final Level level = contextSupplier.get().getPlayer().getLevel(); + final Level level = contextSupplier.get().getPlayer().level(); new Thread(() -> { final long updateTime = level.getDayTime(); Collection predictions = new ArrayList<>(); @@ -61,7 +61,7 @@ public void handle(RealtimeRequestPacket packet, Supplier context return; } - predictions.addAll(TrainUtils.getTrainDeparturePredictions(x, contextSupplier.get().getPlayer().getLevel()).stream().map(a -> a.simplify()).filter(a -> !GlobalSettingsManager.getInstance().getSettingsData().isBlacklisted(a.stationName())).sorted(Comparator.comparingInt(a -> a.departureTicks())).toList()); + predictions.addAll(TrainUtils.getTrainDeparturePredictions(x, contextSupplier.get().getPlayer().level()).stream().map(a -> a.simplify()).filter(a -> !GlobalSettingsManager.getInstance().getSettingsData().isBlacklisted(a.stationName())).sorted(Comparator.comparingInt(a -> a.departureTicks())).toList()); }); CreateRailwaysNavigator.net().CHANNEL.sendToPlayer((ServerPlayer)contextSupplier.get().getPlayer(), (new RealtimeResponsePacket(packet.requestId, predictions, updateTime))); }, "Realtime Provider").run(); diff --git a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/TrainDataRequestPacket.java b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/TrainDataRequestPacket.java index 4c04489c..dba0c104 100644 --- a/common/src/main/java/de/mrjulsen/crn/network/packets/cts/TrainDataRequestPacket.java +++ b/common/src/main/java/de/mrjulsen/crn/network/packets/cts/TrainDataRequestPacket.java @@ -63,7 +63,7 @@ public TrainDataRequestPacket decode(FriendlyByteBuf buffer) { @Override public void handle(TrainDataRequestPacket packet, Supplier contextSupplier) { contextSupplier.get().queue(() -> { - final Level level = contextSupplier.get().getPlayer().getLevel(); + final Level level = contextSupplier.get().getPlayer().level(); final long updateTime = level.getDayTime(); Train train = TrainUtils.getTrain(packet.trainId); List departurePredictions = new ArrayList<>(); diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java b/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java index b8a80ab3..82a322b2 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModBlocks.java @@ -28,7 +28,7 @@ public class ModBlocks { static { - CreateRailwaysNavigator.REGISTRATE.creativeModeTab(() -> ModCreativeModeTab.MAIN); + //CreateRailwaysNavigator.REGISTRATE.setCreativeTab(ModCreativeModeTab.MAIN_TAB.getKey()); } public static final BlockEntry ADVANCED_DISPLAY_BLOCK = CreateRailwaysNavigator.REGISTRATE.block("advanced_display_block", AdvancedDisplayBlock::new) @@ -38,6 +38,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -48,6 +49,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -58,6 +60,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -68,6 +71,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -78,6 +82,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -88,6 +93,7 @@ public class ModBlocks { .transform(TagGen.pickaxeOnly()) .onRegister(AllDisplayBehaviours.assignDataBehaviour(new AdvancedDisplayTarget())) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); @@ -96,6 +102,7 @@ public class ModBlocks { .initialProperties(SharedProperties::softMetal) .transform(TagGen.pickaxeOnly()) .item() + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .build() .register(); diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModCreativeModeTab.java b/common/src/main/java/de/mrjulsen/crn/registry/ModCreativeModeTab.java index 9fb3d59b..7246a799 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModCreativeModeTab.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModCreativeModeTab.java @@ -1,16 +1,27 @@ package de.mrjulsen.crn.registry; import de.mrjulsen.crn.CreateRailwaysNavigator; +import de.mrjulsen.mcdragonlib.util.TextUtils; import dev.architectury.registry.CreativeTabRegistry; -import net.minecraft.resources.ResourceLocation; +import dev.architectury.registry.registries.DeferredRegister; +import dev.architectury.registry.registries.RegistrySupplier; +import net.minecraft.core.registries.Registries; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; public class ModCreativeModeTab { - public static final CreativeModeTab MAIN = CreativeTabRegistry.create( - new ResourceLocation(CreateRailwaysNavigator.MOD_ID, "tab"), - () -> new ItemStack(ModItems.NAVIGATOR.get()) + + public static final DeferredRegister CREATIVE_MODE_TABS = DeferredRegister.create(CreateRailwaysNavigator.MOD_ID, Registries.CREATIVE_MODE_TAB); + + public static final RegistrySupplier MAIN_TAB = CREATIVE_MODE_TABS.register( + "createrailwaysnavigatortab", // Tab ID + () -> CreativeTabRegistry.create( + TextUtils.translate("itemGroup.createrailwaysnavigator.tab"), // Tab Name + () -> new ItemStack(ModItems.NAVIGATOR.get()) // Icon + ) ); - public static void setup() {} + public static void setup() { + CREATIVE_MODE_TABS.register(); + } } \ No newline at end of file diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModExtras.java b/common/src/main/java/de/mrjulsen/crn/registry/ModExtras.java index 2f4b5653..3d805d52 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModExtras.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModExtras.java @@ -6,7 +6,7 @@ import de.mrjulsen.crn.CreateRailwaysNavigator; import de.mrjulsen.crn.block.display.AdvancedDisplaySource; -import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -26,7 +26,7 @@ public static void register() { maybeRegistered = null; } - Create.REGISTRATE.addRegisterCallback("track_station", Registry.BLOCK_REGISTRY, ModExtras::addDisplaySource); + Create.REGISTRATE.addRegisterCallback("track_station", Registries.BLOCK, ModExtras::addDisplaySource); if (maybeRegistered != null) { addDisplaySource(maybeRegistered); } diff --git a/common/src/main/java/de/mrjulsen/crn/registry/ModItems.java b/common/src/main/java/de/mrjulsen/crn/registry/ModItems.java index def3fb7a..2e906206 100644 --- a/common/src/main/java/de/mrjulsen/crn/registry/ModItems.java +++ b/common/src/main/java/de/mrjulsen/crn/registry/ModItems.java @@ -8,11 +8,12 @@ public class ModItems { static { - CreateRailwaysNavigator.REGISTRATE.creativeModeTab(() -> ModCreativeModeTab.MAIN); + //CreateRailwaysNavigator.REGISTRATE.setCreativeTab(ModCreativeModeTab.MAIN_TAB.getKey()); } public static final ItemEntry NAVIGATOR = CreateRailwaysNavigator.REGISTRATE.item("navigator", NavigatorItem::new) .properties(p -> p.stacksTo(1)) + .tab(ModCreativeModeTab.MAIN_TAB.getKey()) .register(); public static void register() { diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json new file mode 100644 index 00000000..bbd4eacf --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/es_es.json @@ -0,0 +1,250 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Gracias por viajar", + "advancement.createrailwaysnavigator.navigator.description": "Crea un navegador para buscar conexiones de tren de una estación de tren a otra.", + "advancement.createrailwaysnavigator.advanced_display": "No del todo 4k", + "advancement.createrailwaysnavigator.advanced_display.description": "Actualiza tus paneles de visualización para mostrar más información e incluso colócalos en tus trenes.", + + "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", + + "item.createrailwaysnavigator.navigator": "Navegador de ferrocarriles", + "item.createrailwaysnavigator.navigator.tooltip.summary": "El _navegador_ muestra posibles _conexiones de trenes_ con información adicional como _escalas_, _datos en tiempo real_ y más.", + + "block.createrailwaysnavigator.train_station_clock": "Reloj de estación de tren", + "block.createrailwaysnavigator.advanced_display_block": "Bloque de pantalla avanzada", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + "block.createrailwaysnavigator.advanced_display": "Tablero de pantalla avanzada", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + "block.createrailwaysnavigator.advanced_display_small": "Pantalla avanzada pequeña", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + "block.createrailwaysnavigator.advanced_display_panel": "Panel de pantalla avanzada", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Medio panel de pantalla avanzada", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Pantalla avanzada inclinada", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Úsalo en _trenes_, como _pantalla de destino del tren_ o _pantalla de información para pasajeros_, o en _estaciones de tren_ como pantallas de _plataforma mejoradas_ que también muestran más información que los tableros de pantalla regulares.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Al hacer clic derecho con una llave inglesa", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Abre un menú para _configurar_ la _pantalla_.", + + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "¡Fuera de servicio!", + "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "viaje sin pasajeros", + + "category.createrailwaysnavigator.crn": "Navegador de ferrocarriles", + "key.createrailwaysnavigator.route_overlay_options": "Mostrar opciones de superposición de ruta", + + "enum.createrailwaysnavigator.overlay_position": "Posición de la pantalla", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Esquina superior izquierda", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Esquina superior derecha", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Esquina inferior izquierda", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Esquina inferior derecha", + + "gui.createrailwaysnavigator.loading.title": "Descargando datos del servidor...", + + "gui.createrailwaysnavigator.overlay_settings.title": "Configuración de superposición de ruta", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Mostrar detalles", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Eliminar superposición de ruta", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Anuncios del narrador activados.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Anuncios del narrador desactivados.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notificaciones activadas", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notificaciones desactivadas", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Escala de la interfaz", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Anuncios del narrador", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "El narrador anuncia eventos importantes en tu viaje, por ejemplo, la próxima parada, cambios, etc.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notificaciones", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Recibe notificaciones emergentes sobre eventos importantes en tu viaje, por ejemplo, la próxima parada, cambios, etc.", + + "gui.createrailwaysnavigator.common.expand": "Mostrar detalles", + "gui.createrailwaysnavigator.common.collapse": "Ocultar detalles", + "gui.createrailwaysnavigator.common.go_back": "Volver", + "gui.createrailwaysnavigator.common.go_to_top": "Desplazarse arriba", + "gui.createrailwaysnavigator.common.reset_defaults": "Restablecer a los valores predeterminados", + "gui.createrailwaysnavigator.common.count": "Cantidad", + "gui.createrailwaysnavigator.common.true": "Sí", + "gui.createrailwaysnavigator.common.false": "No", + "gui.createrailwaysnavigator.common.search": "Buscar", + "gui.createrailwaysnavigator.common.auto": "Automático", + "gui.createrailwaysnavigator.common.server_error": "Error del servidor al ejecutar la tarea. Mira la consola para más detalles.", + + "gui.createrailwaysnavigator.navigator.title": "Navegador de ferrocarriles", + "gui.createrailwaysnavigator.navigator.no_connections": "No se encontraron conexiones.", + "gui.createrailwaysnavigator.navigator.not_searched": "Aún no se ha buscado nada.", + "gui.createrailwaysnavigator.navigator.searching": "Buscando conexiones...", + "gui.createrailwaysnavigator.navigator.error_title": "¡No se puede navegar!", + "gui.createrailwaysnavigator.navigator.start_end_null": "El inicio o el destino están vacíos.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "El inicio y el destino son iguales.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Conexión en el pasado", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Transbordo", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "desde %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Configuración global", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Configuración de búsqueda", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Buscar", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Estación más cercana desde la posición actual", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Cambiar campos", + + "gui.createrailwaysnavigator.route_details.title": "Detalles de la ruta", + "gui.createrailwaysnavigator.route_details.departure": "Salida en", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Transbordo en", + "gui.createrailwaysnavigator.route_details.transfer": "Transbordo", + "gui.createrailwaysnavigator.route_details.save_route": "Guardar conexión", + + "gui.createrailwaysnavigator.route_overview.title": "Detalles de la ruta", + "gui.createrailwaysnavigator.route_overview.journey_begins": "¡Tu viaje comienza! %s a %s, salida %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "¡Tu viaje comienza! %s a %s, salida %s en el andén %s", + "gui.createrailwaysnavigator.route_overview.train_details": "%s a %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Próxima parada: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Transbordo a %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Transbordo a %s → %s en el andén %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Viaje completado", + "gui.createrailwaysnavigator.route_overview.after_journey": "Has llegado a %s. Gracias por viajar y que tengas un buen día.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Próximas conexiones", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Transbordo", + "gui.createrailwaysnavigator.route_overview.train_canceled": "Tren cancelado", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Información sobre %s", + "gui.createrailwaysnavigator.route_overview.stop_canceled": "❌ Cancelado", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Conexión en peligro", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Conexión perdida", + "gui.createrailwaysnavigator.route_overview.connection_canceled": "Tren cancelado", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Tu viaje a %s no puede continuar.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "Debido a un retraso del tren, has perdido la conexión del tren. Busca una alternativa en el navegador. Pedimos disculpas por las molestias.", + "gui.createrailwaysnavigator.route_overview.train_canceled_info": "Información sobre %s: ¡Este tren está cancelado hoy! Pedimos disculpas por las molestias. Busca una alternativa en el navegador.", + "gui.createrailwaysnavigator.route_overview.train_canceled_title": "El tren ha sido cancelado", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Tu viaje a %s no puede continuar. Busca una alternativa en el navegador.", + "gui.createrailwaysnavigator.route_overview.options": "Pulsa %s para opciones.", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "¡Tu viaje a %s comienza!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s a %s, salida %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s a %s, salida %s desde el andén %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "¡Tu andén ha cambiado!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Tu tren en %s sale hoy desde el andén %s.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Llegada %s retrasada.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s en lugar de %s en %s", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled.title": "%s: Tren cancelado", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled": "%s a %s está cancelado hoy.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Transbordo próximo", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Cambio a %s → %s en el andén %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Cambio a %s → %s en el andén %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "¡Tu conexión está en peligro!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Probablemente no podrás llegar a %s a %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Conexión perdida", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Has perdido tu tren de conexión %s a %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "¡Has llegado a tu destino!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Gracias por viajar y que tengas un buen día", + "gui.createrailwaysnavigator.route_overview.date": "Día %s, %s", + + "gui.createrailwaysnavigator.global_settings.title": "Configuración global", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Haz clic para editar", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Etiquetas de estaciones de tren", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Define etiquetas de estaciones para tratar estaciones con múltiples andenes (por ejemplo, MiEstación 1, MiEstación 2, ...) como una sola estación (por ejemplo, MiEstación) con nombres personalizados.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Lista negra de estaciones de tren", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Excluir estaciones de tren que no deberían aparecer en los resultados de navegación. Estas estaciones serán ignoradas al generar rutas.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Grupos de trenes", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Crear grupos de trenes para organizar todos los trenes (por ejemplo, servicios regionales, servicios de larga distancia, ...). Los usuarios pueden decidir qué grupos quieren usar.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Lista negra de trenes", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Excluir trenes, por ejemplo, trenes de carga, trenes especiales, etc., para que no se utilicen en las sugerencias de rutas.", + + "gui.createrailwaysnavigator.alias_settings.title": "Configuración de etiquetas de estaciones de tren", + "gui.createrailwaysnavigator.alias_settings.summary": "Contiene %s estaciones de tren", + "gui.createrailwaysnavigator.alias_settings.editor": "Última edición por %s el %s", + "gui.createrailwaysnavigator.alias_settings.add.tooltip": "Crear nueva entrada", + "gui.createrailwaysnavigator.alias_settings.delete_alias.tooltip": "Eliminar etiqueta", + "gui.createrailwaysnavigator.alias_settings.delete_station.tooltip": "Eliminar estación", + "gui.createrailwaysnavigator.alias_settings.add_station.tooltip": "Agregar estación", + "gui.createrailwaysnavigator.alias_settings.hint.station_name": "Nombre de la estación de tren", + "gui.createrailwaysnavigator.alias_settings.hint.platform": "Andén", + "gui.createrailwaysnavigator.alias_settings.enter_name": "Introduce el nombre aquí", + + "gui.createrailwaysnavigator.train_group_settings.title": "Configuración de grupos de trenes", + "gui.createrailwaysnavigator.train_group_settings.summary": "Contiene %s trenes", + "gui.createrailwaysnavigator.train_group_settings.editor": "Última edición por %s el %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Eliminar grupo", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Eliminar tren", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Agregar tren", + + "gui.createrailwaysnavigator.blacklist.title": "Lista negra de estaciones de tren", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Agregar a la lista negra", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Eliminar de la lista negra", + + "gui.createrailwaysnavigator.train_blacklist.title": "Lista negra de trenes", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Agregar a la lista negra", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Eliminar de la lista negra", + + "gui.createrailwaysnavigator.search_settings.title": "Configuración de búsqueda", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Tiempo mínimo de transbordo", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "El tiempo mínimo que debería estar disponible para cambiar de tren. (1h ~ 50 segundos en tiempo real)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Filtro de categoría de trenes", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Decide qué trenes de qué categorías de trenes quieres utilizar.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s categorías seleccionadas", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Todos", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Ninguno", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Restablecer filtro", + + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Agregar", + + "gui.createrailwaysnavigator.time": "Hora: %s", + "gui.createrailwaysnavigator.time.now": "ahora", + "gui.createrailwaysnavigator.time_format.dhm": "%s días %s h. %s min.", + "gui.createrailwaysnavigator.time_format.hm": "%s h. %s min.", + "gui.createrailwaysnavigator.time_format.m": "%s min.", + + "gui.createrailwaysnavigator.platform": "Andén", + "gui.createrailwaysnavigator.departure": "Salida", + "gui.createrailwaysnavigator.destination": "Destino", + "gui.createrailwaysnavigator.line": "Línea", + "gui.createrailwaysnavigator.following_trains": "Trenes siguientes:", + "gui.createrailwaysnavigator.via": "a través de", + + "gui.createrailwaysnavigator.advanced_display_settings.title": "Configuración avanzada de la pantalla", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Tipo de pantalla", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Determina la información mostrada.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Tipo de información", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Determina el detalle de la información.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Doble cara", + + "enum.createrailwaysnavigator.display_info_type": "Tipo de información de la pantalla", + "enum.createrailwaysnavigator.display_info_type.description": "Determina cuánta información se debe mostrar en tu pantalla de visualización.", + "enum.createrailwaysnavigator.display_info_type.simple": "Simple", + "enum.createrailwaysnavigator.display_info_type.info.simple": "La pantalla solo mostrará la información más importante sin detalles adicionales.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Detallado", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Se mostrará la información más importante con algunos detalles, como la velocidad del tren, las paradas intermedias, etc.", + "enum.createrailwaysnavigator.display_info_type.informative": "Informativo", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Muestra toda la información que podría ser interesante y la presenta en un diseño elegante. No se recomienda para pantallas pequeñas, ya que el texto podría ser muy pequeño.", + + "enum.createrailwaysnavigator.display_type": "Tipo de pantalla", + "enum.createrailwaysnavigator.display_type.description": "El tipo de pantalla depende de su propósito.", + "enum.createrailwaysnavigator.display_type.train_destination": "Destino del tren", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Destinado a ser utilizado fuera de los trenes, muestra información sobre el propio tren, como el nombre, el destino y (si se selecciona) las paradas intermedias y otra información.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Información para pasajeros", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Representa las pantallas que se encuentran dentro de los trenes. Estas pantallas mostrarán la próxima parada, la dirección de salida y (si se selecciona) la velocidad del tren y una vista general de la ruta.", + "enum.createrailwaysnavigator.display_type.platform": "Pantalla de plataforma", + "enum.createrailwaysnavigator.display_type.info.platform": "Estas pantallas deben usarse en las plataformas de las estaciones de tren y muestran los próximos trenes que llegan con detalles adicionales si se seleccionan. ¡No se pueden usar en los trenes!", + + "enum.createrailwaysnavigator.side": "Lado", + "enum.createrailwaysnavigator.side.description": "El lado del bloque donde se debe renderizar la información.", + "enum.createrailwaysnavigator.side.front": "Lado frontal", + "enum.createrailwaysnavigator.side.info.front": "La información solo se renderizará en el lado frontal. Este es el comportamiento predeterminado.", + "enum.createrailwaysnavigator.side.both": "Ambos lados", + "enum.createrailwaysnavigator.side.info.both": "La información se renderizará en ambos lados.", + + "enum.createrailwaysnavigator.time_display": "Visualización del tiempo", + "enum.createrailwaysnavigator.time_display.description": "Determina cómo se debe mostrar el tiempo.", + "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absoluto)", + "enum.createrailwaysnavigator.time_display.eta": "ETA", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA (tiempo estimado de llegada)", + + "create.display_source.advanced_display": "Pantallas avanzadas", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Ancho de columna del nombre del tren", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "en píxeles de bloque. (Por defecto: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Ancho de columna de plataforma", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "en píxeles de bloque. (Por defecto: Automático)", + + "createrailwaysnavigator.moin": "moin" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json new file mode 100644 index 00000000..0954f8ab --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/fr_fr.json @@ -0,0 +1,250 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Merci d'avoir voyagé", + "advancement.createrailwaysnavigator.navigator.description": "Crafter un Navigateur pour trouver une connection entre une station et une autre.", + "advancement.createrailwaysnavigator.advanced_display": "Pas vraiment 4k", + "advancement.createrailwaysnavigator.advanced_display.description": "Améliorer vos tableaux d'affichage pour afficher plus d'information et même les placer dans vos trains.", + + "itemGroup.createrailwaysnavigator.tab": "Create Railways Navigator", + + "item.createrailwaysnavigator.navigator": "Create Navigateur Ferroviaire", + "item.createrailwaysnavigator.navigator.tooltip.summary": "Le _navigateur_ montre les _correspondances_ possibles avec des informations supplémentaires comme les _escales_, des _informations en temps réel_ et plus encore.", + + "block.createrailwaysnavigator.train_station_clock": "Horloge de Gare", + "block.createrailwaysnavigator.advanced_display_block": "Bloc d'Affichage Avancé", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display": "Tableau d'Affichage Avancé", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_small": "Petit Tableau d'Affichage Avancé", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_panel": "Panneau d'Affichage Avancé", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_half_panel": "Demi-Panneau d'Affichage Avancé", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + "block.createrailwaysnavigator.advanced_display_sloped": "Affichage Incliné Avancé", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Utilisez-le sur des _trains_, comme _affichage de la destination_ ou _affichage pour les passagers_, ou dans des _stations de trains_ comme des _affichage de quai_ amélioré qui montre plus d'informations que des tableaux d'affichage classique.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "Quand click-droit en utilisant une clé", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Ouvre un menu pour _configurer_ l'_affichage_.", + + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Hors service!", + "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "train sans passagers", + + "category.createrailwaysnavigator.crn": "Create Railways Navigator", + "key.createrailwaysnavigator.route_overlay_options": "Afficher les Options de l'Overlay d'Itinéraire", + + "enum.createrailwaysnavigator.overlay_position": "Position de l'Affichage", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Coin Supérieur Gauche", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Coin Supérieur Droit", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Coin Inférieur Gauche", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Coin Inférieur Droit", + + "gui.createrailwaysnavigator.loading.title": "Téléchargement des données du serveur...", + + "gui.createrailwaysnavigator.overlay_settings.title": "Paramètres de l'Overlay d'Itinéraire", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Afficher les détails", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Enlever l'overlay d'itinéraire", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Annonces du narrateur activées.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Annonces du narrateur désactivées.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Notifications activées", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Notifications désactivées", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Taille de l'interface", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Annonces du narrateur", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Le Narrateur annonce des évènements importants pendant votre voyage, ex. le prochain arrêt, des changements, etc.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Notifications", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Recevez des notifications pop-up sur les évènements importants de votre voyage, ex. le prochain arrêt, des changements, etc.", + + "gui.createrailwaysnavigator.common.expand": "Afficher les détails", + "gui.createrailwaysnavigator.common.collapse": "Cacher les détails", + "gui.createrailwaysnavigator.common.go_back": "Retour", + "gui.createrailwaysnavigator.common.go_to_top": "Aller en haut", + "gui.createrailwaysnavigator.common.reset_defaults": "Réinitialiser aux valeurs par défaut", + "gui.createrailwaysnavigator.common.count": "Compte", + "gui.createrailwaysnavigator.common.true": "Oui", + "gui.createrailwaysnavigator.common.false": "Non", + "gui.createrailwaysnavigator.common.search": "Rechercher", + "gui.createrailwaysnavigator.common.auto": "Auto", + "gui.createrailwaysnavigator.common.server_error": "Erreur serveur lors de l'éxecution de la tâche. Regarder la console pour en savoir plus.", + + "gui.createrailwaysnavigator.navigator.title": "Create Railways Navigator", + "gui.createrailwaysnavigator.navigator.no_connections": "Aucun itinéraire trouvé.", + "gui.createrailwaysnavigator.navigator.not_searched": "Rien n'a encore été recherché.", + "gui.createrailwaysnavigator.navigator.searching": "Recherche d'un itinéraire...", + "gui.createrailwaysnavigator.navigator.error_title": "Impossible de naviguer!", + "gui.createrailwaysnavigator.navigator.start_end_null": "Le départ ou la destination est vide.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Le départ et la destination sont égaux.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Itinéraire dans le passé", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Corresp.", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "à partir de %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Paramètres globaux", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Paramètres de recherche", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Recherche", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Gare la plus proche de votre position", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Inverser le point de départ et la destination", + + "gui.createrailwaysnavigator.route_details.title": "Détail de l'itinéraire", + "gui.createrailwaysnavigator.route_details.departure": "Départ dans", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Correspondance dans", + "gui.createrailwaysnavigator.route_details.transfer": "Correspondance", + "gui.createrailwaysnavigator.route_details.save_route": "Enregistrer l'itinéraire'", + + "gui.createrailwaysnavigator.route_overview.title": "Détail de l'itinéraire", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Votre voyage commence! %s à %s, départ %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Votre voyage commence! %s à %s, départ %s sur la voie %s", + "gui.createrailwaysnavigator.route_overview.train_details": "%s à %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Prochain arrêt: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Correspondance entre %s → %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Correspondance entre %s → %s sur la voie %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Voyage terminé!", + "gui.createrailwaysnavigator.route_overview.after_journey": "Vous êtes arrivés à %s. Merci d'avoir voyagé et passez une bonne journée.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Prochaines correspondances", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Correspondance", + "gui.createrailwaysnavigator.route_overview.train_canceled": "Train Annulé", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Information à propos de %s", + "gui.createrailwaysnavigator.route_overview.stop_canceled": "❌ Annulé", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Correspondance en danger", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Correspondance manqué", + "gui.createrailwaysnavigator.route_overview.connection_canceled": "Train annulé", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Votre voyage vers %s ne peut se poursuivre.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "A cause d'un retard, vous avez manqué votre correspondace. Rechercher une alternative dans le Navigateur. Nous nous excusons pour le dérangement.", + "gui.createrailwaysnavigator.route_overview.train_canceled_info": "Information à propos de %s: Ce train a été annulé pour aujourd'hui! Nous nous excusons pour le dérangement. Rechercher une alternative dans le Navigateur.", + "gui.createrailwaysnavigator.route_overview.train_canceled_title": "Le train a été annulé", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Votre voyage vers %s ne peut pas se poursuivre. Rechercher une alternative dans le Navigateur.", + "gui.createrailwaysnavigator.route_overview.options": "Appuyer sur %s pour voir les options.", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Votre voyage vers %s commence!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s vers %s, départ %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s vers %s, départ %s depuis la voie %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Votre voie a changé!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Votre train dans %s part de la voie %s aujourd'hui.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: Départ %s retardé.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s au lieu de %s dans %s", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled.title": "%s: Train annulé", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled": "%s vers %s est annulé aujourd'hui.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Votre correspondance est en approche", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Correspondance entre %s → %s sur la voie %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Correspondance entre %s → %s sur la voie %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Votre correspondance est en danger!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Vous ne pourrez probablement pas atteindre %s vers %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Correspondance manquée", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Vous avez manqué votre correspondace %s vers %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Vous avez atteint votre destination !", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Merci d'avoir voyagé et passez une bonne journée", + "gui.createrailwaysnavigator.route_overview.date": "Jour %s, %s", + + "gui.createrailwaysnavigator.global_settings.title": "Paramètres globaux", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Cliquez ici pour modifier", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Balises de Gare", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Définissez des balises de gares pour traîter une gare à multiples quais (ex. MaGare 1, MaGare 2) comme une seule gare (e.g. MaGare) avec un nom personnalisé.", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Liste Noire de Gare", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Exclure les gares qui ne devrait pas apparaître dans les résultats de navigations. Ces gares seront ignorés lors de la génération d'itinéraire.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Groupes de Train", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Créez des groupes de trains pour les organiser (ex. services régionaux, services longue distance, ...). Les utilisateurs peuvent décider quels groupes ils souhaitent utiliser.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Liste Noire de Train", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Exclure des trains, ex. trains de marchandises, trains spéciaux, etc., de manière à ce qu'ils ne puissent être utilisé dans des itinéraires.", + + "gui.createrailwaysnavigator.alias_settings.title": "Paramètres des Balises de Gares", + "gui.createrailwaysnavigator.alias_settings.summary": "Contient %s Gares", + "gui.createrailwaysnavigator.alias_settings.editor": "Modifié par %s le %s", + "gui.createrailwaysnavigator.alias_settings.add.tooltip": "Créer une nouvelle entrée", + "gui.createrailwaysnavigator.alias_settings.delete_alias.tooltip": "Supprimer la Balise", + "gui.createrailwaysnavigator.alias_settings.delete_station.tooltip": "Retirer une Gare", + "gui.createrailwaysnavigator.alias_settings.add_station.tooltip": "Ajouter une Gare", + "gui.createrailwaysnavigator.alias_settings.hint.station_name": "Nom de la Station", + "gui.createrailwaysnavigator.alias_settings.hint.platform": "Quai", + "gui.createrailwaysnavigator.alias_settings.enter_name": "Entrer un nom ici", + + "gui.createrailwaysnavigator.train_group_settings.title": "Paramètres des Groupes de Trains", + "gui.createrailwaysnavigator.train_group_settings.summary": "Contient %s Trains", + "gui.createrailwaysnavigator.train_group_settings.editor": "Modifié par %s le %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Supprimer le Groupe", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Retirer le Train", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Ajouter un Train", + + "gui.createrailwaysnavigator.blacklist.title": "Liste noire des Gares", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Ajouter à la liste noire", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Retirer de la liste noire", + + "gui.createrailwaysnavigator.train_blacklist.title": "Liste noire des Trains", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Ajouter à la liste noire", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Retirer de la liste noire", + + "gui.createrailwaysnavigator.search_settings.title": "Paramètres de recherche", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Temps de Correspondance Minimum", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Le temps minimum qui devrait être disponible pour changer de train. (1h ~ 50 secondes réelles)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Filtre de Catégorie de Train", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Décidez quels trains et quelles catégories de trains vous souhaitez utiliser.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s catégories séléctionés", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Tous", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Aucun", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Réinitialiser les filtres", + + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Ajouter", + + "gui.createrailwaysnavigator.time": "Temps: %s", + "gui.createrailwaysnavigator.time.now": "maintenant", + "gui.createrailwaysnavigator.time_format.dhm": "%s jours %s h. %s m.", + "gui.createrailwaysnavigator.time_format.hm": "%s h. %s min.", + "gui.createrailwaysnavigator.time_format.m": "%s m.", + + "gui.createrailwaysnavigator.platform": "Voie", + "gui.createrailwaysnavigator.departure": "Départ", + "gui.createrailwaysnavigator.destination": "Destination", + "gui.createrailwaysnavigator.line": "Ligne", + "gui.createrailwaysnavigator.following_trains": "Trains suivants:", + "gui.createrailwaysnavigator.via": "via", + + "gui.createrailwaysnavigator.advanced_display_settings.title": "Paramètres des Affichages Avancés", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Type d'Affichage", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Détermine les informations affichés.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Type d'Information", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Détermine le degré de détail des informations.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Double-face", + + "enum.createrailwaysnavigator.display_info_type": "Type d'Affiche d'Information", + "enum.createrailwaysnavigator.display_info_type.description": "Détermine combien d'informations devraient être affichés sur votre tableau d'affichage.", + "enum.createrailwaysnavigator.display_info_type.simple": "Simple", + "enum.createrailwaysnavigator.display_info_type.info.simple": "L'écran va seulement afficher les informations les plus importantes sans détails supplémentaires.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Détaillé", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Les informations les plus importantes avec quelques détails seront affichés, comme la vitesse du trains, les escales, etc.", + "enum.createrailwaysnavigator.display_info_type.informative": "Informatif", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Affiche toutes les informations qui pourraient être intéressantes et les affiches dans une disposition agréable. Déconseillé pour les petits petits affichages car le texte peu devenir très petit.", + + "enum.createrailwaysnavigator.display_type": "Type d'Affichage", + "enum.createrailwaysnavigator.display_type.description": "Le type d'affiche en fonction de son objectif.", + "enum.createrailwaysnavigator.display_type.train_destination": "Destination du Train", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Destiné à être utilisé en dehors des trains car il affiche des informations sur le train lui-même, comme le nom, la destinations et (si séléctionés) les escales.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Informations pour les passagers", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Représentes les écrans présents à l'interieur des trains. Ces écrans afficheront les prochains arrêts, la direction de la sortie et (si séléctionés) la vitesse du train et une vue d'ensemble de la route", + "enum.createrailwaysnavigator.display_type.platform": "Affichage de quai", + "enum.createrailwaysnavigator.display_type.info.platform": "Ces écrans doivent être utilisés sur les quais des gares et montre les prochains trains arrivant avec quelques détails en plus si séléctionés. Ne peut pas être utilisés à l'intérieur des trains!", + + "enum.createrailwaysnavigator.side": "Face", + "enum.createrailwaysnavigator.side.description": "La face du bloc où les informations devraient être affichés.", + "enum.createrailwaysnavigator.side.front": "Face avant", + "enum.createrailwaysnavigator.side.info.front": "Les informations seront affichés uniquement sur la face avant du bloc. C'est le comportement par défaut.", + "enum.createrailwaysnavigator.side.both": "Toutes les faces", + "enum.createrailwaysnavigator.side.info.both": "Les informations seront affichés sur toutes les faces.", + + "enum.createrailwaysnavigator.time_display": "Affichage des horaires", + "enum.createrailwaysnavigator.time_display.description": "Détermines comment les horaires devraient être affichés", + "enum.createrailwaysnavigator.time_display.abs": "ABS", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS (absolu)", + "enum.createrailwaysnavigator.time_display.eta": "ETA", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA (estimation du temps d'arrivée)", + + "create.display_source.advanced_display": "Affichage Avancé", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Largeur de la colonne du nom du train", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "en pixels bloc. (Defaut: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Largeur de la colonne du quai", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "en pixel bloc. (Defaut: Auto)", + + "createrailwaysnavigator.moin": "moin" +} diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json new file mode 100644 index 00000000..fbd6779e --- /dev/null +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/ru_ru.json @@ -0,0 +1,252 @@ +{ + "advancement.createrailwaysnavigator.navigator": "Спасибо за поездку!", + "advancement.createrailwaysnavigator.navigator.description": "Создайте навигатор для поиска маршрутов следования поездов.", + "advancement.createrailwaysnavigator.advanced_display": "Не совсем 4k...", + "advancement.createrailwaysnavigator.advanced_display.description": "Обновите свои механические табло, чтобы на них отображалось больше информации, и даже разместите их в своих поездах.", + + "itemGroup.createrailwaysnavigator.tab": "Create: Навигатор железных дорог", + + "item.createrailwaysnavigator.navigator": "Железнодорожный навигатор", + "item.createrailwaysnavigator.navigator.tooltip.summary": "_Навигатор_ показывает возможные _пересадки к поездам_ и дополнительную информацию, такую как _остановки_, _данные в реальном времени_ и многое другое.", + + "block.createrailwaysnavigator.train_station_clock": "Станционные часы", + "block.createrailwaysnavigator.advanced_display_block": "Блок улучшенного механического табло", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display": "Улучшенное механическое табло", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_small": "Малое улучшенное механическое табло", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_panel": "Панель улучшенного механического табло", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_half_panel": "Полупанель улучшенного механического табло", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + "block.createrailwaysnavigator.advanced_display_sloped": "Наклонное улучшенное механическое табло", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "Используйте в _поездах_ в качестве _табло пункта назначения поезда_ или _табло информации для пассажиров_, а на станциях - в качестве _дисплея платформы,_ которые также отображают больше информации, чем обычные табло.", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "ПКМ с гаячным ключом", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "Открывает меню для _настройки дисплея._", + + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "Вышел из строя!", + "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "Поездка без пассажиров", + + "category.createrailwaysnavigator.crn": "Create: Навигатор железных дорог", + "key.createrailwaysnavigator.route_overlay_options": "Показать параметры наложения маршрута", + + "enum.createrailwaysnavigator.overlay_position": "Позиция наложения", + "enum.createrailwaysnavigator.overlay_position.info.top_left": "Левый верхний угол", + "enum.createrailwaysnavigator.overlay_position.info.top_right": "Правый верхний угол", + "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "Левый нижний угол", + "enum.createrailwaysnavigator.overlay_position.info.bottom_right": "Правый нижний угол", + + "gui.createrailwaysnavigator.loading.title": "Загрузка данных с сервера...", + + "gui.createrailwaysnavigator.overlay_settings.title": "Настройки наложения маршрута", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "Показать детали", + "gui.createrailwaysnavigator.route_overlay_settings.unpin": "Удалить наложение маршрута", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "Объявления диктора включены.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "Объявления диктора выключены.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "Уведомления включены", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "Уведомления выключены", + "gui.createrailwaysnavigator.route_overlay_settings.scale": "Масштаб наложения", + "gui.createrailwaysnavigator.route_overlay_settings.narrator": "Объявления диктора", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "Диктор объявляет о важных событиях в вашем путешествии, например, о следующей остановке, пересадках и т.д.", + "gui.createrailwaysnavigator.route_overlay_settings.notifications": "Уведомления", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "Получайте мгновенные уведомления о важных событиях в вашем путешествии, например, о следующей остановке, пересадках и т.д.", + + "gui.createrailwaysnavigator.common.expand": "Показать детали", + "gui.createrailwaysnavigator.common.collapse": "Скрыть детали", + "gui.createrailwaysnavigator.common.go_back": "Вернуться", + "gui.createrailwaysnavigator.common.go_to_top": "Прокрутить к началу", + "gui.createrailwaysnavigator.common.reset_defaults": "Сбросить по умолчанию", + "gui.createrailwaysnavigator.common.count": "Количество", + "gui.createrailwaysnavigator.common.true": "Да", + "gui.createrailwaysnavigator.common.false": "Нет", + "gui.createrailwaysnavigator.common.search": "Поиск", + "gui.createrailwaysnavigator.common.auto": "Авто", + "gui.createrailwaysnavigator.common.server_error": "Ошибка сервера при выполнении задачи. Подробности смотрите в консоли.", + + "gui.createrailwaysnavigator.navigator.title": "Железнодорожный навигатор", + "gui.createrailwaysnavigator.navigator.no_connections": "Никаких маршрутов не найдено.", + "gui.createrailwaysnavigator.navigator.not_searched": "Пока ничего не найдено.", + "gui.createrailwaysnavigator.navigator.searching": "Поиск маршрутов", + "gui.createrailwaysnavigator.navigator.error_title": "Не удаётся сориентироваться!", + "gui.createrailwaysnavigator.navigator.start_end_null": "Начальная точка или пункт назначения пусты.", + "gui.createrailwaysnavigator.navigator.start_end_equal": "Начало и пункт назначения одинаковы.", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ Связь в прошлом", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "Поезда.", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "от %s", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "Глобальные настройки", + "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "Поиск настроек", + "gui.createrailwaysnavigator.navigator.search.tooltip": "Поиск", + "gui.createrailwaysnavigator.navigator.location.tooltip": "Ближайшая станция", + "gui.createrailwaysnavigator.navigator.switch.tooltip": "Переключить поля", + + "gui.createrailwaysnavigator.route_details.title": "Детали маршрута", + "gui.createrailwaysnavigator.route_details.departure": "Отправление через", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "Пересадка на", + "gui.createrailwaysnavigator.route_details.transfer": "Пересадка", + "gui.createrailwaysnavigator.route_details.save_route": "Сохранить соединение", + + "gui.createrailwaysnavigator.route_overview.title": "Детали маршрута", + "gui.createrailwaysnavigator.route_overview.journey_begins": "Ваше поездка начинается! %s в сторону %s, отправление в %s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "Ваша поездка начинается! %s в сторону %s, отправление в %s на платформе %s", + "gui.createrailwaysnavigator.route_overview.train_details": "%s в сторону %s", + "gui.createrailwaysnavigator.route_overview.next_stop": "Следующая остановка: %s", + "gui.createrailwaysnavigator.route_overview.transfer": "Пересесть с %s на %s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "Пересядте с %s на %s на платформе %s", + "gui.createrailwaysnavigator.route_overview.journey_completed": "Поездка окончена", + "gui.createrailwaysnavigator.route_overview.after_journey": "Вы достигли станции %s. Спасибо за поездку.", + "gui.createrailwaysnavigator.route_overview.next_connections": "Пересадки на", + "gui.createrailwaysnavigator.route_overview.schedule_transfer": "Пересадка", + "gui.createrailwaysnavigator.route_overview.train_canceled": "Поезд отменён", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "Информация о %s", + "gui.createrailwaysnavigator.route_overview.stop_canceled": "❌ отменено", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "Соединение под угрозой", + "gui.createrailwaysnavigator.route_overview.connection_missed": "Соединение потеряно", + "gui.createrailwaysnavigator.route_overview.connection_canceled": "Поезд отменён", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "Ваша поездка к %s не может быть продолжена.", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "Из-за задержки поезда вы опоздали на стыковочный поезд. Найдите альтернативный вариант в навигаторе. Приносим извинения за доставленные неудобства.", + "gui.createrailwaysnavigator.route_overview.train_canceled_info": "Информация о %s: Этот поезд сегодня отменен! Приносим извинения за доставленные неудобства. Найдите альтернативный вариант в навигаторе.", + "gui.createrailwaysnavigator.route_overview.train_canceled_title": "Поезд был отменен", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "Вашу поездку к %s невозможно продолжить. Выполните поиск альтернативного маршрута в навигаторе.", + "gui.createrailwaysnavigator.route_overview.options": "Нажмите %s для опций", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "Ваша поездка к %s начинается!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s в сторону %s, отправление в %s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s в сторону %s, отпрвление %s от платформы %s", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "Ваша платформа изменилась!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "Ваш поезд в %s отходит от платформы %s сегодня.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: прибытие %s задержка.", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "%s вместо %s на %s", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled.title": "%s: Поезд отменён", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled": "%s в сторону %s отменён сегодня.", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "Пересадка скоро", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "Изменить %s → %s на платформе %s", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "Изменить %s → %s на платформе %s", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "Ваше соединение находится под угрозой!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "Вероятно, Вы не сможете добраться из %s в %s.", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "Пропущенное соединение", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "Вы опоздали на свой стыковочный поезд %s в сторону %s.", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "Вы достигли места назначения!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "Спасибо за поездку", + "gui.createrailwaysnavigator.route_overview.date": "День %s, %s", + + "gui.createrailwaysnavigator.global_settings.title": "Глобальные настройки", + "gui.createrailwaysnavigator.global_settings.option.tooltip": "Нажмите, чтобы изменить", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "Теги станции", + "gui.createrailwaysnavigator.global_settings.option_alias.description": "Нужны для объединения многоплатформенных станций в единую с пользовательским именем для навигатора. (Нужно для создания ТПУ)", + "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "Чёрный список станций", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "Исключите станции из результатов навигации. Они будут игнорироваться при создании маршрутов.", + "gui.createrailwaysnavigator.global_settings.train_group.title": "Группы поездов", + "gui.createrailwaysnavigator.global_settings.train_group.description": "Проведите классификацию поездов (например, региональные, междугородние и т.д.). Игроки могут сами выбирать группы.", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "Чёрный список поездов", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "Исключите поезда, например, грузовые, специальные и т.д., чтобы они не использовались в предложениях по маршруту.", + + "gui.createrailwaysnavigator.alias_settings.title": "Настройки тегов станций", + "gui.createrailwaysnavigator.alias_settings.summary": "Количество станций: %s", + "gui.createrailwaysnavigator.alias_settings.editor": "Изменён %s в %s", + "gui.createrailwaysnavigator.alias_settings.add.tooltip": "Создать новую запись", + "gui.createrailwaysnavigator.alias_settings.delete_alias.tooltip": "Удалить тег", + "gui.createrailwaysnavigator.alias_settings.delete_station.tooltip": "Удалить станцию", + "gui.createrailwaysnavigator.alias_settings.add_station.tooltip": "Добавить станцию", + "gui.createrailwaysnavigator.alias_settings.hint.station_name": "Имя станции", + "gui.createrailwaysnavigator.alias_settings.hint.platform": "Платформа", + "gui.createrailwaysnavigator.alias_settings.enter_name": "Ввести имя здесь", + + "gui.createrailwaysnavigator.train_group_settings.title": "Найстройки групп поездов", + "gui.createrailwaysnavigator.train_group_settings.summary": "Включает %s Tпоездов", + "gui.createrailwaysnavigator.train_group_settings.editor": "Изменено %s в %s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "Удалить группу", + "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "Удалить поезд", + "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "Добавить поезд", + + "gui.createrailwaysnavigator.blacklist.title": "Чёрный список станций", + "gui.createrailwaysnavigator.blacklist.add.tooltip": "Добавить в ЧС", + "gui.createrailwaysnavigator.blacklist.delete.tooltip": "Удалить из ЧС", + + "gui.createrailwaysnavigator.train_blacklist.title": "Чёрный список поездов", + "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "Добавить в ЧС", + "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "Удалить из ЧС", + + "gui.createrailwaysnavigator.search_settings.title": "Поиск настроек", + "gui.createrailwaysnavigator.search_settings.transfer_time": "Минимальное время пересадки", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "Минимальное время для пересадки на поезд. (1h ~ 50 реальных секунд)", + "gui.createrailwaysnavigator.search_settings.train_groups": "Фильтер категории поезда", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "Какой категории поездов Вы хотите воспользоваться.", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "Выбраны все категории", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "Ни одна из категорий не выбрана", + "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "Сбросить фильтры", + + "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "Добавить", + + "gui.createrailwaysnavigator.time": "Время: %s", + "gui.createrailwaysnavigator.time.now": "0 сек", + "gui.createrailwaysnavigator.time_format.dhm": "%s дней %s часов %s мин.", + "gui.createrailwaysnavigator.time_format.hm": "%s часов. %s мин.", + "gui.createrailwaysnavigator.time_format.m": "%s мин.", + + "gui.createrailwaysnavigator.platform": "Платформа", + "gui.createrailwaysnavigator.departure": "Отправление", + "gui.createrailwaysnavigator.destination": "Пункт назначения", + "gui.createrailwaysnavigator.line": "Линия", + "gui.createrailwaysnavigator.following_trains": "Следующие поезда:", + "gui.createrailwaysnavigator.via": "к станции", + + "gui.createrailwaysnavigator.advanced_display_settings.title": "Настройки улучшенного дисплея", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "Тип дисплея", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "Определяет отображаемую информацию.", + "gui.createrailwaysnavigator.advanced_display_settings.info_type": "Тип информации", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "Определяет, насколько подробной является информация.", + "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "Двухсторонний", + + "enum.createrailwaysnavigator.display_info_type": "Тип информации дисплея", + "enum.createrailwaysnavigator.display_info_type.description": "Определяет, какой объем информации должен отображаться на вашем дисплее.", + "enum.createrailwaysnavigator.display_info_type.simple": "Простой", + "enum.createrailwaysnavigator.display_info_type.info.simple": "На дисплее будет отображаться только самая важная информация без каких-либо дополнительных подробностей.", + "enum.createrailwaysnavigator.display_info_type.detailed": "Подробный", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "Будет показана наиболее важная информация с некоторыми подробностями, такими как скорость поезда, остановки в пути и т.д.", + "enum.createrailwaysnavigator.display_info_type.informative": "Информативный", + "enum.createrailwaysnavigator.display_info_type.info.informative": "Отображает всю информацию, которая может быть интересна, и представляет ее в необычном формате. Не рекомендуется для небольших дисплеев, так как текст может стать очень мелким.", + + "enum.createrailwaysnavigator.display_type": "Тип дисплея", + "enum.createrailwaysnavigator.display_type.description": "Тип вашего дисплея зависит от его назначения.", + "enum.createrailwaysnavigator.display_type.train_destination": "Табло пункта назначения поезда", + "enum.createrailwaysnavigator.display_type.info.train_destination": "Предназначен для использования вне поездов, поскольку он отображает информацию о самом поезде, такую как название, пункт назначения и (если выбрано) промежуточные остановки, а также другую информацию.", + "enum.createrailwaysnavigator.display_type.passenger_information": "Информатор для пассажиров", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "Отображает дисплеи, расположенные внутри поездов. На этих дисплеях будут отображаться следующая остановка, направление выхода и (если выбрано) скорость движения поезда, а также обзор маршрута.", + "enum.createrailwaysnavigator.display_type.platform": "Дисплей платформы", + "enum.createrailwaysnavigator.display_type.info.platform": "Эти дисплеи следует использовать на платформах железнодорожных вокзалов, и на них отображаются следующие поезда с дополнительной информацией, если они выбраны. Нельзя использовать в поездах!", + + "enum.createrailwaysnavigator.side": "Сторона", + "enum.createrailwaysnavigator.side.description": "Сторона блока, на которой должна отображаться информация.", + "enum.createrailwaysnavigator.side.front": "Лицевая сторона", + "enum.createrailwaysnavigator.side.info.front": "Информация будет отображаться только на лицевой стороне. Это поведение по умолчанию.", + "enum.createrailwaysnavigator.side.both": "Обе стороны", + "enum.createrailwaysnavigator.side.info.both": "Информация будет отображаться с обеих сторон.", + + "enum.createrailwaysnavigator.time_display": "Отображение времени", + "enum.createrailwaysnavigator.time_display.description": "Определяет, как должно отображаться время.", + "enum.createrailwaysnavigator.time_display.abs": "АБС", + "enum.createrailwaysnavigator.time_display.info.abs": "АБС (Абсолютное)", + "enum.createrailwaysnavigator.time_display.eta": "ПВП", + "enum.createrailwaysnavigator.time_display.info.eta": "ПВП (Предполагаемое время прибытия)", + + "create.display_source.advanced_display": "Улучшенные дисплеи", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "Ширина столбца с названием поезда", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "в пикселях блока. (По умолчанию: 16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "Ширина колонны платформы", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "в пикселях блока. (По умолчанию: Авто)", + + "createrailwaysnavigator.moin": "moin", + + "_": "Над переводом работал VGamerGroup" +} \ No newline at end of file diff --git a/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json b/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json index fa94bbae..06a2ab67 100644 --- a/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json +++ b/common/src/main/resources/assets/createrailwaysnavigator/lang/zh_cn.json @@ -1,47 +1,47 @@ { "advancement.createrailwaysnavigator.navigator": "感谢您的乘坐", - "advancement.createrailwaysnavigator.navigator.description": "制造一个导航仪以搜寻路线.", + "advancement.createrailwaysnavigator.navigator.description": "制作一个导航仪,用于搜索从一个车站到另一个车站的列车路线。", "advancement.createrailwaysnavigator.advanced_display": "还不够清晰", - "advancement.createrailwaysnavigator.advanced_display.description": "升级你的信息牌以展示更多信息,你甚至可以把它放在火车上!", + "advancement.createrailwaysnavigator.advanced_display.description": "升级您的显示器以显示更多信息,甚至可以将它们放置在您的列车上。", "itemGroup.createrailwaysnavigator.tab": "机械动力:铁路导航", - "item.createrailwaysnavigator.navigator": "机械动力:铁路导航", - "item.createrailwaysnavigator.navigator.tooltip.summary": "_导航仪_ 显示 可能的 _火车线路_ 提供更多功能如 _经停站_, _实时信息_ 以及更多。", + "item.createrailwaysnavigator.navigator": "铁路导航仪", + "item.createrailwaysnavigator.navigator.tooltip.summary": "_导航仪_可以显示可能的_列车路线_,以及_经停站_、_实时信息_等。", "block.createrailwaysnavigator.train_station_clock": "车站时钟", - "block.createrailwaysnavigator.advanced_display_block": "高级展示方块", - "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。 ", - "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "打开配置菜单", - "block.createrailwaysnavigator.advanced_display": "高级展示牌", - "block.createrailwaysnavigator.advanced_display.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。", - "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "打开配置菜单", - "block.createrailwaysnavigator.advanced_display_small": "小型高级展示牌", - "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。", - "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "打开配置菜单", + "block.createrailwaysnavigator.advanced_display_block": "高级显示器方块", + "block.createrailwaysnavigator.advanced_display_block.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_block.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_block.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display": "高级显示器", + "block.createrailwaysnavigator.advanced_display.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_small": "小型高级显示器", + "block.createrailwaysnavigator.advanced_display_small.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_small.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_small.tooltip.behaviour1": "打开菜单以_配置_显示器。", "block.createrailwaysnavigator.advanced_display_panel": "高级显示面板", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "打开配置菜单", - "block.createrailwaysnavigator.advanced_display_half_panel": "先进的半显示面板", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "打开配置菜单", - "block.createrailwaysnavigator.advanced_display_sloped": "倾斜式高级显示器", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "使用在 _火车上_, 可以展示 _列车终点站_ 或 _乘客信息_, 也可以放置在 _火车站_ 当作 _信息展示平台_, 拥有比普通展示牌更强大的功能。", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "使用扳手右键时", - "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "打开配置菜单.", - - "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "线路不可用", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_half_panel": "高级半显示面板", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_half_panel.tooltip.behaviour1": "打开菜单以_配置_显示器。", + "block.createrailwaysnavigator.advanced_display_sloped": "斜面高级显示器", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.summary": "使用在_列车上_,可以展示_列车目的地_或_乘客信息_, 也可以放置在_车站_当作_站台显示器_, 比普通显示器显示更多信息。", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.condition1": "用扳手右击时", + "block.createrailwaysnavigator.advanced_display_sloped.tooltip.behaviour1": "打开菜单以_配置_显示器。", + + "block.createrailwaysnavigator.advanced_display.ber.not_in_service": "未启用", "block.createrailwaysnavigator.advanced_display.ber.shunting_trip": "调车行程", "category.createrailwaysnavigator.crn": "机械动力:铁路导航", "key.createrailwaysnavigator.route_overlay_options": "显示路线覆盖选项", - "enum.createrailwaysnavigator.overlay_position": "展示位置", + "enum.createrailwaysnavigator.overlay_position": "显示位置", "enum.createrailwaysnavigator.overlay_position.info.top_left": "左上角", "enum.createrailwaysnavigator.overlay_position.info.top_right": "右上角", "enum.createrailwaysnavigator.overlay_position.info.bottom_left": "左下角", @@ -50,22 +50,22 @@ "gui.createrailwaysnavigator.loading.title": "正在从服务器下载数据...", "gui.createrailwaysnavigator.overlay_settings.title": "路线覆盖设置", - "gui.createrailwaysnavigator.route_overlay_settings.show_details": "展示详细信息", + "gui.createrailwaysnavigator.route_overlay_settings.show_details": "显示详细信息", "gui.createrailwaysnavigator.route_overlay_settings.unpin": "移除路线覆盖", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "讲述人通知开启.", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "讲述人通知关闭.", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.on": "讲述人通知开启", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.off": "讲述人通知关闭", "gui.createrailwaysnavigator.route_overlay_settings.notifications.on": "开启通知", "gui.createrailwaysnavigator.route_overlay_settings.notifications.off": "关闭通知", "gui.createrailwaysnavigator.route_overlay_settings.scale": "GUI 大小", "gui.createrailwaysnavigator.route_overlay_settings.narrator": "讲述人通知", - "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "讲述人会播报旅程中的信息,例如下一个车站,换乘", + "gui.createrailwaysnavigator.route_overlay_settings.narrator.description": "讲述人会播报您旅途中的重要事件,例如下一站、换乘等。", "gui.createrailwaysnavigator.route_overlay_settings.notifications": "通知", - "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "通知旅程中的信息,例如下一个车站,换乘", + "gui.createrailwaysnavigator.route_overlay_settings.notifications.description": "在旅途中接收关于重要事件的弹窗通知,例如下一站、换乘等。", - "gui.createrailwaysnavigator.common.expand": "显示细节", - "gui.createrailwaysnavigator.common.collapse": "隐藏细节", + "gui.createrailwaysnavigator.common.expand": "显示详情", + "gui.createrailwaysnavigator.common.collapse": "隐藏详情", "gui.createrailwaysnavigator.common.go_back": "返回", - "gui.createrailwaysnavigator.common.go_to_top": "滚动至顶部", + "gui.createrailwaysnavigator.common.go_to_top": "滚动到顶部", "gui.createrailwaysnavigator.common.reset_defaults": "恢复初始设定", "gui.createrailwaysnavigator.common.count": "数量", "gui.createrailwaysnavigator.common.true": "是", @@ -75,176 +75,174 @@ "gui.createrailwaysnavigator.common.server_error": "执行任务时出现问题,请查看控制台以获取更多信息。", "gui.createrailwaysnavigator.navigator.title": "机械动力:铁路导航", - "gui.createrailwaysnavigator.navigator.no_connections": "没有可用线路", - "gui.createrailwaysnavigator.navigator.not_searched": "没有搜索结果", - "gui.createrailwaysnavigator.navigator.searching": "正在搜索...", - "gui.createrailwaysnavigator.navigator.error_title": "无法导航!", - "gui.createrailwaysnavigator.navigator.start_end_null": "起点或终点为空.", - "gui.createrailwaysnavigator.navigator.start_end_equal": "起点或终点不能相同.", - "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ 线路已过期", - "gui.createrailwaysnavigator.navigator.route_entry.transfer": "换乘.", - "gui.createrailwaysnavigator.navigator.route_entry.station_start": "从 %s", - "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "通用设置", + "gui.createrailwaysnavigator.navigator.no_connections": "未找到路线。", + "gui.createrailwaysnavigator.navigator.not_searched": "尚未搜索。", + "gui.createrailwaysnavigator.navigator.searching": "正在搜索路线...", + "gui.createrailwaysnavigator.navigator.error_title": "无法导航!", + "gui.createrailwaysnavigator.navigator.start_end_null": "起点或终点为空。", + "gui.createrailwaysnavigator.navigator.start_end_equal": "起点和终点相同。", + "gui.createrailwaysnavigator.navigator.route_entry.connection_in_past": "❌ 过去的车次", + "gui.createrailwaysnavigator.navigator.route_entry.transfer": "换乘", + "gui.createrailwaysnavigator.navigator.route_entry.station_start": "从%s出发", + "gui.createrailwaysnavigator.navigator.global_settings.tooltip": "全局设置", "gui.createrailwaysnavigator.navigator.search_settings.tooltip": "搜索设置", "gui.createrailwaysnavigator.navigator.search.tooltip": "搜索", - "gui.createrailwaysnavigator.navigator.location.tooltip": "自动查找最近车站", + "gui.createrailwaysnavigator.navigator.location.tooltip": "定位最近的车站", "gui.createrailwaysnavigator.navigator.switch.tooltip": "交换地点", "gui.createrailwaysnavigator.route_details.title": "路线详情", - "gui.createrailwaysnavigator.route_details.departure": "出发自", - "gui.createrailwaysnavigator.route_details.next_transfer_time": "换乘于", + "gui.createrailwaysnavigator.route_details.departure": "出发时间", + "gui.createrailwaysnavigator.route_details.next_transfer_time": "换乘时间", "gui.createrailwaysnavigator.route_details.transfer": "换乘", - "gui.createrailwaysnavigator.route_details.save_route": "保存线路", + "gui.createrailwaysnavigator.route_details.save_route": "保存路线", "gui.createrailwaysnavigator.route_overview.title": "路线详情", - "gui.createrailwaysnavigator.route_overview.journey_begins": "列车出发! %s 至 %s, 起始于 %s", - "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "列车出发! %s 至 %s, 起始于 %s 站台 %s", - "gui.createrailwaysnavigator.route_overview.train_details": "%s 至 %s", - "gui.createrailwaysnavigator.route_overview.next_stop": "下一站: %s", - "gui.createrailwaysnavigator.route_overview.transfer": "换乘 %s → %s", - "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "换乘 %s → %s 在站台 %s", - "gui.createrailwaysnavigator.route_overview.journey_completed": "旅程结束", - "gui.createrailwaysnavigator.route_overview.after_journey": "您已到达 %s. 感谢您的乘坐,祝您有美好的一天.", - "gui.createrailwaysnavigator.route_overview.next_connections": "下一站", + "gui.createrailwaysnavigator.route_overview.journey_begins": "您的旅程开始了!%s到%s,出发时间%s", + "gui.createrailwaysnavigator.route_overview.journey_begins_with_platform": "您的旅程开始了!%s到%s,出发时间%s,在%s站台乘车", + "gui.createrailwaysnavigator.route_overview.train_details": "%s到%s", + "gui.createrailwaysnavigator.route_overview.next_stop": "下一站:%s", + "gui.createrailwaysnavigator.route_overview.transfer": "换乘%s→%s", + "gui.createrailwaysnavigator.route_overview.transfer_with_platform": "换乘%s→%s,在%s站台乘车", + "gui.createrailwaysnavigator.route_overview.journey_completed": "旅程完成", + "gui.createrailwaysnavigator.route_overview.after_journey": "您已抵达%s。感谢您的乘坐,祝您旅途愉快。", + "gui.createrailwaysnavigator.route_overview.next_connections": "下一车次", "gui.createrailwaysnavigator.route_overview.schedule_transfer": "换乘", - "gui.createrailwaysnavigator.route_overview.train_canceled": "列车已取消", - "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "取消信息 %s", - "gui.createrailwaysnavigator.route_overview.stop_canceled": "❌ 取消", - "gui.createrailwaysnavigator.route_overview.connection_endangered": "不安全的线路", - "gui.createrailwaysnavigator.route_overview.connection_missed": "线路消失", - "gui.createrailwaysnavigator.route_overview.connection_canceled": "列车取消", - "gui.createrailwaysnavigator.route_overview.journey_interrupted": "您前往 %s 的旅程已中断。", - "gui.createrailwaysnavigator.route_overview.connection_missed_info": "由于列车延迟导致您无法换乘,请打开导航仪搜索更多线路。对于带来的不便我们深感歉意。", - "gui.createrailwaysnavigator.route_overview.train_canceled_info": "车次: %s: 车次已取消,请打开导航仪搜索更多线路。对于带来的不便我们深感歉意。", - "gui.createrailwaysnavigator.route_overview.train_canceled_title": "车次已取消", - "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "前往 %s 的旅程已中断。 请打开导航仪搜索更多线路", - "gui.createrailwaysnavigator.route_overview.options": "按 %s 展示选项.", - "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "正在前往 %s!", - "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s 至 %s, 起始于 %s", - "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s 至 %s, 起始于 %s 站台 %s", - "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "您已切换站台!", - "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "列车 %s 今日从站台 %s 离开.", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s: 延迟抵达 %s", - "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "推迟至 %s 原定 %s 抵达 %s", - "gui.createrailwaysnavigator.route_overview.notification.train_canceled.title": "%s: 车次取消", - "gui.createrailwaysnavigator.route_overview.notification.train_canceled": "今日原定从 %s 至 %s 的车次已经取消", - "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "换乘列车即将到来", - "gui.createrailwaysnavigator.route_overview.notification.transfer": "换乘 %s → %s 于站台 %s", - "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "换乘 %s → %s 于站台 %s", - "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "不安全的线路!", - "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "您可能不会从 %s 抵达 %s.", - "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "缺失线路", - "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "从 %s 到 %s 线路已缺失", - "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "您已抵达目的地!", - "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "感谢您的乘坐,祝您有美好的一天", - "gui.createrailwaysnavigator.route_overview.date": "日期: %s, %s", + "gui.createrailwaysnavigator.route_overview.train_canceled": "车次取消", + "gui.createrailwaysnavigator.route_overview.train_cancellation_info": "关于%s的信息", + "gui.createrailwaysnavigator.route_overview.stop_canceled": "❌ 已取消", + "gui.createrailwaysnavigator.route_overview.connection_endangered": "换乘受阻", + "gui.createrailwaysnavigator.route_overview.connection_missed": "错过换乘", + "gui.createrailwaysnavigator.route_overview.connection_canceled": "车次取消", + "gui.createrailwaysnavigator.route_overview.journey_interrupted": "您前往%s的旅程无法继续。", + "gui.createrailwaysnavigator.route_overview.connection_missed_info": "由于列车延误,您错过了换乘列车。请在导航仪中搜索替代路线。对于给您造成的不便,我们深表歉意。", + "gui.createrailwaysnavigator.route_overview.train_canceled_info": "关于%s的信息:该车次已取消!对于给您造成的不便,我们深表歉意。请在导航仪中搜索替代路线。", + "gui.createrailwaysnavigator.route_overview.train_canceled_title": "车次取消", + "gui.createrailwaysnavigator.route_overview.journey_interrupted_info": "您前往%s的旅程无法继续。请在导航仪中搜索替代路线。", + "gui.createrailwaysnavigator.route_overview.options": "按%s键查看选项。", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins.title": "您前往%s的旅程开始了!", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins": "%s到%s,出发时间%s", + "gui.createrailwaysnavigator.route_overview.notification.journey_begins_with_platform": "%s到%s,出发时间%s,在%s站台乘车", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed.title": "站台已变更!", + "gui.createrailwaysnavigator.route_overview.notification.platform_changed": "您在%s的列车将从%s号站台出发。", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed.title": "%s:延误%s", + "gui.createrailwaysnavigator.route_overview.notification.train_delayed": "原定%2$s,现将于%1$s抵达%3$s", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled.title": "%s:列车取消", + "gui.createrailwaysnavigator.route_overview.notification.train_canceled": "前往%2$s的%1$s已取消。", + "gui.createrailwaysnavigator.route_overview.notification.transfer.title": "即将换乘", + "gui.createrailwaysnavigator.route_overview.notification.transfer": "换乘%s→%s,在%s站台乘车", + "gui.createrailwaysnavigator.route_overview.notification.transfer_with_platform": "换乘%s→%s,在%s站台乘车", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered.title": "换乘受阻!", + "gui.createrailwaysnavigator.route_overview.notification.connection_endangered": "您可能无法赶上前往%2$s的%1$s。", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed.title": "错过换乘", + "gui.createrailwaysnavigator.route_overview.notification.connection_missed": "您错过了前往%2$s的%1$s。", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed.title": "您已抵达目的地!", + "gui.createrailwaysnavigator.route_overview.notification.journey_completed": "感谢您的乘坐,祝您旅途愉快", + "gui.createrailwaysnavigator.route_overview.date": "第%s天,%s", "gui.createrailwaysnavigator.global_settings.title": "全局设定", "gui.createrailwaysnavigator.global_settings.option.tooltip": "点击编辑", - "gui.createrailwaysnavigator.global_settings.option_alias.title": "列车站标签", + "gui.createrailwaysnavigator.global_settings.option_alias.title": "车站标签", "gui.createrailwaysnavigator.global_settings.option_alias.description": "对于多站台的车站,您可以建立标签 (例如 MyStation 1, MyStation 2, ...) 以把它们归于一个车站下 (例如 MyStation)。", "gui.createrailwaysnavigator.global_settings.option_blacklist.title": "车站黑名单", - "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "黑名单中的车站将不会再搜索选项中出现.", - "gui.createrailwaysnavigator.global_settings.train_group.title": "列车组", - "gui.createrailwaysnavigator.global_settings.train_group.description": "将列车加入列车组以方便管理,用户可以选择列车组.", - "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "火车黑名单", - "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "黑名单中的火车将不会显示", - - "gui.createrailwaysnavigator.alias_settings.title": "列车站标签设定", - "gui.createrailwaysnavigator.alias_settings.summary": "包含 %s 个车站", - "gui.createrailwaysnavigator.alias_settings.editor": "最后由 %s 在 %s 编辑", - "gui.createrailwaysnavigator.alias_settings.add.tooltip": "加入新的入口", + "gui.createrailwaysnavigator.global_settings.option_blacklist.description": "排除导航结果中不应出现的车站。生成路线时将忽略这些车站。", + "gui.createrailwaysnavigator.global_settings.train_group.title": "列车分类", + "gui.createrailwaysnavigator.global_settings.train_group.description": "将列车加入列车分类(例如,区域服务、长途服务等)以方便管理,乘客可以决定要使用哪些列车分类。", + "gui.createrailwaysnavigator.global_settings.train_blacklist.title": "列车黑名单", + "gui.createrailwaysnavigator.global_settings.train_blacklist.description": "排除列车,例如货运列车、专列等,以便在路线建议中不显示它们。", + + "gui.createrailwaysnavigator.alias_settings.title": "车站标签设定", + "gui.createrailwaysnavigator.alias_settings.summary": "包含%s个车站", + "gui.createrailwaysnavigator.alias_settings.editor": "最后编辑者:%s,于%s", + "gui.createrailwaysnavigator.alias_settings.add.tooltip": "创建新条目", "gui.createrailwaysnavigator.alias_settings.delete_alias.tooltip": "删除标签", "gui.createrailwaysnavigator.alias_settings.delete_station.tooltip": "移除车站", "gui.createrailwaysnavigator.alias_settings.add_station.tooltip": "添加车站", "gui.createrailwaysnavigator.alias_settings.hint.station_name": "车站名称", "gui.createrailwaysnavigator.alias_settings.hint.platform": "站台", - "gui.createrailwaysnavigator.alias_settings.enter_name": "在此输入名字", - - "gui.createrailwaysnavigator.train_group_settings.title": "列车组设置", - "gui.createrailwaysnavigator.train_group_settings.summary": "包含 %s 辆列车", - "gui.createrailwaysnavigator.train_group_settings.editor": "最后由 %s 在 %s 编辑", - "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "删除列车组", + "gui.createrailwaysnavigator.alias_settings.enter_name": "在此输入名称", + "gui.createrailwaysnavigator.train_group_settings.title": "列车分类设置", + "gui.createrailwaysnavigator.train_group_settings.summary": "包含%s辆列车", + "gui.createrailwaysnavigator.train_group_settings.editor": "最后编辑者:%s,%s", + "gui.createrailwaysnavigator.train_group_settings.delete_alias.tooltip": "删除分类", "gui.createrailwaysnavigator.train_group_settings.delete_station.tooltip": "移除列车", "gui.createrailwaysnavigator.train_group_settings.add_station.tooltip": "添加列车", - "gui.createrailwaysnavigator.blacklist.title": "列车站黑名单", + "gui.createrailwaysnavigator.blacklist.title": "车站黑名单", "gui.createrailwaysnavigator.blacklist.add.tooltip": "加入黑名单", "gui.createrailwaysnavigator.blacklist.delete.tooltip": "移除黑名单", - + "gui.createrailwaysnavigator.train_blacklist.title": "列车黑名单", "gui.createrailwaysnavigator.train_blacklist.add.tooltip": "加入黑名单", "gui.createrailwaysnavigator.train_blacklist.delete.tooltip": "移除黑名单", - + "gui.createrailwaysnavigator.search_settings.title": "搜索设定", "gui.createrailwaysnavigator.search_settings.transfer_time": "最短换乘时间", - "gui.createrailwaysnavigator.search_settings.transfer_time.description": "最短的需要换乘的时间. (一小时对应现实50秒)", + "gui.createrailwaysnavigator.search_settings.transfer_time.description": "换乘需要的最短可用时间。(1 小时 ≈ 50 秒现实时间)", "gui.createrailwaysnavigator.search_settings.train_groups": "列车过滤器", - "gui.createrailwaysnavigator.search_settings.train_groups.description": "决定想使用的列车", - "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s 个筛选项已选择", + "gui.createrailwaysnavigator.search_settings.train_groups.description": "决定想使用的列车类别。", + "gui.createrailwaysnavigator.search_settings.train_groups.overview": "%s类别选择中", "gui.createrailwaysnavigator.search_settings.train_groups.overview.all": "全部", - "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "全部否", + "gui.createrailwaysnavigator.search_settings.train_groups.overview.none": "无", "gui.createrailwaysnavigator.search_settings.train_groups.tooltip.reset": "重置筛选项", "gui.createrailwaysnavigator.new_text_entry.add.tooltip": "添加", - "gui.createrailwaysnavigator.time": "时间: %s", - "gui.createrailwaysnavigator.time.now": "现在时间是:", - "gui.createrailwaysnavigator.time_format.dhm": "%s 日 %s 时. %s 分.", - "gui.createrailwaysnavigator.time_format.hm": "%s 时. %s 分.", - "gui.createrailwaysnavigator.time_format.m": "%s 分.", - + "gui.createrailwaysnavigator.time": "时间:%s", + "gui.createrailwaysnavigator.time.now": "现在", + "gui.createrailwaysnavigator.time_format.dhm": "%s天%s小时%s分钟", + "gui.createrailwaysnavigator.time_format.hm": "%s小时%s分钟", + "gui.createrailwaysnavigator.time_format.m": "%s分钟", + "gui.createrailwaysnavigator.platform": "站台", - "gui.createrailwaysnavigator.departure": "离开", - "gui.createrailwaysnavigator.destination": "终点站", - "gui.createrailwaysnavigator.line": "线路", - "gui.createrailwaysnavigator.following_trains": "下一趟列车:", + "gui.createrailwaysnavigator.departure": "出发", + "gui.createrailwaysnavigator.destination": "目的地", + "gui.createrailwaysnavigator.line": "路线", + "gui.createrailwaysnavigator.following_trains": "后续车次:", "gui.createrailwaysnavigator.via": "经停", - "gui.createrailwaysnavigator.advanced_display_settings.title": "高级展示设置", - "gui.createrailwaysnavigator.advanced_display_settings.display_type": "展示类型", - "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "选择展示的信息", + "gui.createrailwaysnavigator.advanced_display_settings.title": "高级显示设置", + "gui.createrailwaysnavigator.advanced_display_settings.display_type": "显示器类型", + "gui.createrailwaysnavigator.advanced_display_settings.display_type.description": "决定显示的信息。", "gui.createrailwaysnavigator.advanced_display_settings.info_type": "信息类型", - "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "展示信息的详细程度", + "gui.createrailwaysnavigator.advanced_display_settings.info_type.description": "决定信息的详细程度。", "gui.createrailwaysnavigator.advanced_display_settings.double_sided": "双面显示", - "enum.createrailwaysnavigator.display_info_type": "展示类型", - "enum.createrailwaysnavigator.display_info_type.description": "展示信息的详细程度", + "enum.createrailwaysnavigator.display_info_type": "信息类型", + "enum.createrailwaysnavigator.display_info_type.description": "决定显示器上应显示多少信息。", "enum.createrailwaysnavigator.display_info_type.simple": "简洁", - "enum.createrailwaysnavigator.display_info_type.info.simple": "只展示最重要的部分", + "enum.createrailwaysnavigator.display_info_type.info.simple": "只展示最重要的部分,不显示其它细节。", "enum.createrailwaysnavigator.display_info_type.detailed": "详细", - "enum.createrailwaysnavigator.display_info_type.info.detailed": "将展示更多细节,例如火车速度", + "enum.createrailwaysnavigator.display_info_type.info.detailed": "将展示更多细节,例如列车速度、经停站等。", "enum.createrailwaysnavigator.display_info_type.informative": "全部展示", - "enum.createrailwaysnavigator.display_info_type.info.informative": "展示全部信息,不建议在小型展示牌上使用", - - "enum.createrailwaysnavigator.display_type": "展示类型", - "enum.createrailwaysnavigator.display_type.description": "选择展示的信息", + "enum.createrailwaysnavigator.display_info_type.info.informative": "以花哨的布局显示所有信息。不建议在小型显示器上使用,因为文字可能会变得非常小。", + "enum.createrailwaysnavigator.display_type": "显示器类型", + "enum.createrailwaysnavigator.display_type.description": "决定显示器的类型,由其用途决定。", "enum.createrailwaysnavigator.display_type.train_destination": "列车终点站", - "enum.createrailwaysnavigator.display_type.info.train_destination": "在列车外显示列车的详细信息,如终点站,经停站等", + "enum.createrailwaysnavigator.display_type.info.train_destination": "适用于列车外部,显示有关列车本身的信息,例如名称、终点站和(如果选择)经停站以及其他信息。", "enum.createrailwaysnavigator.display_type.passenger_information": "乘客信息", - "enum.createrailwaysnavigator.display_type.info.passenger_information": "在列车内部使用,展示路程信息", - "enum.createrailwaysnavigator.display_type.platform": "站台信息", - "enum.createrailwaysnavigator.display_type.info.platform": "在车站使用,可显示下一趟列车。无法在列车内部使用", + "enum.createrailwaysnavigator.display_type.info.passenger_information": "代表适用于列车内部的显示器。这种显示器将显示下一站、开门方向以及(如果选择)列车速度和路线概览。", + "enum.createrailwaysnavigator.display_type.platform": "站台显示", + "enum.createrailwaysnavigator.display_type.info.platform": "这种显示应在车站站台上使用,显示后续车次以及(如果选择)其他详细信息。不能在列车上使用!", "enum.createrailwaysnavigator.side": "显示方向", - "enum.createrailwaysnavigator.side.description": "显示信息的面", + "enum.createrailwaysnavigator.side.description": "决定信息应呈现在方块的哪一面。", "enum.createrailwaysnavigator.side.front": "正面", - "enum.createrailwaysnavigator.side.info.front": "(默认)只会在正面显示信息", - "enum.createrailwaysnavigator.side.both": "正反两面", - "enum.createrailwaysnavigator.side.info.both": "信息在两面都会显示", - + "enum.createrailwaysnavigator.side.info.front": "信息将仅在正面显示(默认行为)。", + "enum.createrailwaysnavigator.side.both": "双面", + "enum.createrailwaysnavigator.side.info.both": "信息将在双面显示。", + "enum.createrailwaysnavigator.time_display": "时间显示", - "enum.createrailwaysnavigator.time_display.description": "改变时间展示的方式", + "enum.createrailwaysnavigator.time_display.description": "决定时间的显示方式。", "enum.createrailwaysnavigator.time_display.abs": "ABS", - "enum.createrailwaysnavigator.time_display.info.abs": "ABS (绝对时间)", + "enum.createrailwaysnavigator.time_display.info.abs": "ABS(绝对时间、absolute)", "enum.createrailwaysnavigator.time_display.eta": "ETA", - "enum.createrailwaysnavigator.time_display.info.eta": "ETA (预计到达时间)", + "enum.createrailwaysnavigator.time_display.info.eta": "ETA(预计到达时间、estimated time of arrival)", "create.display_source.advanced_display": "高级显示", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "列车名宽度", - "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "以像素为单位 (默认: 16)", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "站台名宽度", - "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "以像素为单位 (默认: Auto)", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width": "列车名称列宽", + "gui.createrailwaysnavigator.display_source.advanced_display.train_name_width.description": "以像素为单位。(默认:16)", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width": "站台列宽", + "gui.createrailwaysnavigator.display_source.advanced_display.platform_width.description": "以方块像素为单位。(默认:自动)", "createrailwaysnavigator.moin": "moin" } diff --git a/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_half_panel_connected.png b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_half_panel_connected.png new file mode 100644 index 00000000..99f70336 Binary files /dev/null and b/common/src/main/resources/assets/createrailwaysnavigator/textures/block/advanced_display_half_panel_connected.png differ diff --git a/common/src/main/resources/createrailwaysnavigator.accesswidener b/common/src/main/resources/createrailwaysnavigator.accesswidener index f8ea90e1..d22c6f26 100644 --- a/common/src/main/resources/createrailwaysnavigator.accesswidener +++ b/common/src/main/resources/createrailwaysnavigator.accesswidener @@ -1,3 +1,2 @@ accessWidener v2 named -accessible class net/minecraft/client/gui/Font$StringRenderOutput -accessible field net/minecraft/client/gui/chat/NarratorChatListener narrator Lcom/mojang/text2speech/Narrator; \ No newline at end of file +accessible class net/minecraft/client/gui/Font$StringRenderOutput \ No newline at end of file diff --git a/common/src/main/resources/data/createrailwaysnavigator/tags/blocks/advanced_displays.json b/common/src/main/resources/data/createrailwaysnavigator/tags/blocks/advanced_displays.json index 56791a79..0c340234 100644 --- a/common/src/main/resources/data/createrailwaysnavigator/tags/blocks/advanced_displays.json +++ b/common/src/main/resources/data/createrailwaysnavigator/tags/blocks/advanced_displays.json @@ -3,6 +3,7 @@ "values": [ "createrailwaysnavigator:advanced_display", "createrailwaysnavigator:advanced_display_block", + "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_panel", "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_small", diff --git a/common/src/main/resources/data/createrailwaysnavigator/tags/items/advanced_displays.json b/common/src/main/resources/data/createrailwaysnavigator/tags/items/advanced_displays.json index 07778035..e2e2b232 100644 --- a/common/src/main/resources/data/createrailwaysnavigator/tags/items/advanced_displays.json +++ b/common/src/main/resources/data/createrailwaysnavigator/tags/items/advanced_displays.json @@ -3,6 +3,7 @@ "values": [ "createrailwaysnavigator:advanced_display", "createrailwaysnavigator:advanced_display_block", + "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_panel", "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_sloped", diff --git a/common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 059f2a61..334e1d0b 100644 --- a/common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/common/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -3,6 +3,7 @@ "values": [ "createrailwaysnavigator:advanced_display", "createrailwaysnavigator:advanced_display_block", + "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_panel", "createrailwaysnavigator:advanced_display_half_panel", "createrailwaysnavigator:advanced_display_small", diff --git a/fabric/build.gradle b/fabric/build.gradle index 67863973..8da14722 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -19,26 +19,11 @@ configurations { developmentFabric.extendsFrom common } -repositories { - maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI - maven { url = "https://maven.blamejared.com/" } // JEI - maven { url = "https://maven.parchmentmc.org" } // Parchment mappings - maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings - maven { url = "https://api.modrinth.com/maven" } // LazyDFU - maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu - maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate - maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Forge Config API Port - maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes - maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM - maven { url = "https://maven.tterrag.com/" } // Flywheel -} - dependencies { modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" - modApi(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) - - // Create - dependencies are added transitively + + modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-fabric:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) modImplementation("com.simibubi.create:create-fabric-${rootProject.minecraft_version}:${rootProject.create_fabric_version}") common(project(path: ":common", configuration: "namedElements")) { transitive false } @@ -86,6 +71,7 @@ publishing { } } + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { } } diff --git a/fabric/src/main/java/de/mrjulsen/crn/fabric/CRNPlatformSpecificImpl.java b/fabric/src/main/java/de/mrjulsen/crn/fabric/CRNPlatformSpecificImpl.java index 71e39255..4000571b 100644 --- a/fabric/src/main/java/de/mrjulsen/crn/fabric/CRNPlatformSpecificImpl.java +++ b/fabric/src/main/java/de/mrjulsen/crn/fabric/CRNPlatformSpecificImpl.java @@ -2,7 +2,6 @@ import net.fabricmc.loader.api.FabricLoader; import net.minecraft.server.MinecraftServer; -import net.minecraftforge.api.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; import java.nio.file.Path; @@ -13,6 +12,7 @@ import de.mrjulsen.crn.config.ModCommonConfig; import dev.architectury.platform.Platform; import dev.architectury.utils.Env; +import fuzs.forgeconfigapiport.impl.config.ForgeConfigRegistryImpl; import io.github.fabricators_of_create.porting_lib.util.ServerLifecycleHooks; public class CRNPlatformSpecificImpl { @@ -29,8 +29,8 @@ public static MinecraftServer getServer() { public static void registerConfig() { if (Platform.getEnvironment() == Env.CLIENT) { - ModLoadingContext.registerConfig(CreateRailwaysNavigator.MOD_ID, ModConfig.Type.CLIENT, ModClientConfig.SPEC, CreateRailwaysNavigator.MOD_ID + "-client.toml"); + ForgeConfigRegistryImpl.INSTANCE.register(CreateRailwaysNavigator.MOD_ID, ModConfig.Type.CLIENT, ModClientConfig.SPEC, CreateRailwaysNavigator.MOD_ID + "-client.toml"); } - ModLoadingContext.registerConfig(CreateRailwaysNavigator.MOD_ID, ModConfig.Type.COMMON, ModCommonConfig.SPEC, CreateRailwaysNavigator.MOD_ID + "-common.toml"); + ForgeConfigRegistryImpl.INSTANCE.register(CreateRailwaysNavigator.MOD_ID, ModConfig.Type.COMMON, ModCommonConfig.SPEC, CreateRailwaysNavigator.MOD_ID + "-common.toml"); } } diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 61de8238..7261f9b4 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -26,9 +26,9 @@ ], "depends": { "fabric": "*", - "minecraft": ">=1.18.2", - "architectury": ">=4.11.93", - "dragonlib": ">=1.18.2-2.1.8", + "minecraft": ">=1.20.1", + "architectury": ">=9.1.12", + "dragonlib": ">=1.20.1-2.1.6", "create": "*" } } \ No newline at end of file diff --git a/forge/build.gradle b/forge/build.gradle index 3083a40c..0a2838d2 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -27,19 +27,10 @@ configurations { developmentForge.extendsFrom common } -repositories { - maven { // Create Forge and Registrate Forge - url = "https://maven.tterrag.com/" - content { - includeGroup("com.tterrag.registrate") - includeGroup("com.simibubi.create") - } - } -} - dependencies { forge "net.minecraftforge:forge:${rootProject.forge_version}" - modApi(include("de.mrjulsen.mcdragonlib:dragonlib-forge:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) + + modImplementation(include("de.mrjulsen.mcdragonlib:dragonlib-forge:${rootProject.minecraft_version}-${rootProject.dragonlib_version}")) modImplementation("com.simibubi.create:create-${rootProject.minecraft_version}:${rootProject.create_forge_version}:slim") { transitive = false } modImplementation("com.tterrag.registrate:Registrate:${rootProject.registrate_forge_version}") @@ -90,6 +81,8 @@ publishing { } } + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { + // Add repositories to publish to here. } } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index e4d3c095..e0c0c4d6 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "javafml" -loaderVersion = "[40,)" +loaderVersion = "[47,)" #issueTrackerURL = "" license = "GNU General Public License v3.0" @@ -8,7 +8,7 @@ modId = "createrailwaysnavigator" version = "${version}" displayName = "Create Railways Navigator" authors = "MrJulsen" -updateJSONURL="https://raw.githubusercontent.com/MisterJulsen/Create-Train-Navigator/1.18.2/update.json" +updateJSONURL="https://raw.githubusercontent.com/MisterJulsen/Create-Train-Navigator/1.20.1/update.json" displayURL="https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator" issueTrackerURL="https://github.com/MisterJulsen/Create-Train-Navigator/issues" description = ''' @@ -19,34 +19,34 @@ logoFile="icon.png" [[dependencies.createrailwaysnavigator]] modId = "forge" mandatory = true -versionRange = "[40,)" +versionRange = "[47,)" ordering = "NONE" side = "BOTH" [[dependencies.createrailwaysnavigator]] modId = "minecraft" mandatory = true -versionRange = "[1.18.2,)" +versionRange = "[1.20.1,1.21)" ordering = "NONE" side = "BOTH" [[dependencies.createrailwaysnavigator]] modId = "architectury" mandatory = true -versionRange = "[4.11.93,)" +versionRange = "[9.1.12,)" ordering = "AFTER" side = "BOTH" [[dependencies.createrailwaysnavigator]] modId = "dragonlib" mandatory = true -versionRange = "[1.18.2-2.1.8,)" +versionRange = "[1.20.1-2.1.6,)" ordering = "AFTER" side = "BOTH" [[dependencies.createrailwaysnavigator]] modId = "create" mandatory = true -versionRange = "[0.5.1.e-318,)" +versionRange = "[0.5.1.f,)" ordering = "AFTER" side = "BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta index 9252d3db..284e3f33 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/forge/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "description": "Example Mod", - "pack_format": 8 + "pack_format": 15 } } diff --git a/gradle.properties b/gradle.properties index 881ac97d..fa0adacf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,23 +1,20 @@ org.gradle.jvmargs=-Xmx6G -minecraft_version=1.18.2 +minecraft_version=1.20.1 enabled_platforms=fabric,forge archives_base_name=createrailwaysnavigator -mod_version=0.5.3-beta-1.18.2 +mod_version=0.5.3-beta-1.20.1 maven_group=de.mrjulsen.crn -parchmentmc_version=2022.11.06 -architectury_version=4.11.93 dragonlib_version=2.1.8 - -create_fabric_version = 0.5.1-f-build.1333+mc1.18.2 -create_forge_version = 0.5.1.e-318 -registrate_forge_version = MC1.18.2-1.1.3 -flywheel_forge_version = 0.6.10-105 +create_fabric_version = 0.5.1-f-build.1417+mc1.20.1 +create_forge_version = 0.5.1.f-26 +registrate_forge_version = MC1.20-1.3.3 +flywheel_forge_version = 0.6.10-7 fabric_loader_version=0.14.23 -fabric_api_version=0.76.0+1.18.2 - -forge_version=1.18.2-40.2.10 +fabric_api_version=0.90.4+1.20.1 +forge_version=1.20.1-47.2.1 +parchment_version=2023.09.03 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 34e3be87..2b69abf5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,7 @@ pluginManagement { repositories { maven { url "https://maven.fabricmc.net/" } maven { url "https://maven.architectury.dev/" } - maven { url "https://maven.minecraftforge.net/" } + maven { url "https://files.minecraftforge.net/maven/" } maven { url "https://maven.parchmentmc.org/"} gradlePluginPortal() } diff --git a/update.json b/update.json index 8e6347d0..410de88e 100644 --- a/update.json +++ b/update.json @@ -1,7 +1,7 @@ { "promos": { - "1.18.2-latest": "0.5.3-1.18.2", - "1.18.2-recommended": "0.5.3-1.18.2" + "1.20.1-latest": "0.5.3-1.20.1", + "1.20.1-recommended": "0.5.3-1.20.1" }, "homepage": "https://www.curseforge.com/minecraft/mc-mods/create-railways-navigator" } \ No newline at end of file