Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.5] '\n' formating key unkown in String


bibouche_
 Share

Recommended Posts

Hey, umm, I created a new Menu, in which I ping to a server to get it's Motd, However, I have a '\n' to continue on a new line, but Minecraft displays it as an unknown character and put it on the same line.

The Motd in server.properties is 

         \u00A7ka\u00A7r \u00A73\u00A7nAlcanderia\u00A7r \u00A76Modded \u00A74Survival\u00A7r \u00A7ka\u00A7r\n                    \u00A76[\u00A721.\u00A7416\u00A7r.5\u00A76]

And in the code I get is as a TranslationTextComponent, and then display it with Screen#drawCenteredString()

 

How can I get it to continue on a new line with the '\n' ?

Link to comment
Share on other sites

if (!this.server.pinged) {
			this.server.pinged         = true;
			this.server.pingToServer   = -2L;
			this.server.serverMOTD     = new TranslationTextComponent("");
			this.server.populationInfo = new TranslationTextComponent("");
			EXECUTOR.submit(() -> {
				try {
					CustomMenu.this.serverPinger.ping(CustomMenu.this.server, () -> { });
				}
				catch (UnknownHostException unknownHostException) {
					CustomMenu.this.server.pingToServer = -1L;
					CustomMenu.this.server.serverMOTD   = new TranslationTextComponent(TextFormatting.DARK_RED + "Cannot resolve host's name");
				}
				catch (Exception exception) {
					CustomMenu.this.server.pingToServer = -1L;
					CustomMenu.this.server.serverMOTD   = new TranslationTextComponent(TextFormatting.DARK_RED + "Unable to connect to server");
				}
			});
		}
		
		if (this.server.pingToServer >= 1L) {
			drawCenteredString(matrixStack, this.font, this.server.serverMOTD, this.width / 2, (int) (this.height / 2 * 1.5) - 52, 14474460);
			drawString(matrixStack, this.font, TextFormatting.GOLD + this.server.populationInfo.getString() + TextFormatting.RESET + " " + new TranslationTextComponent("alcamenu.players").getString(), this.width / 2 - 65, (int) (this.height / 2 * 1.5) - 27, 14474460);
			drawString(matrixStack, this.font, TextFormatting.GOLD + String.valueOf(this.server.pingToServer) + TextFormatting.RESET + " ms", this.width / 2 + 30, (int) (this.height / 2 * 1.5) - 27, 14474460);
		}
		else {
			drawCenteredString(matrixStack, this.font, this.server.serverMOTD, this.width / 2, (int) (this.height / 2 * 1.5) - 52, 0x245791);
		}

 

Link to comment
Share on other sites

Letting people enter their Minecraft credentials into your own software is bad practice at best and illegal at worst. Most definitely it is against the GDPR.

If you really cannot use existing infrastructure (i.e. just make a Curse modpack), make an installer that creates a launcher profile in the vanilla launcher, like Forge does.

Link to comment
Share on other sites

We are not getting any credentials at all, they can join with just a pseudo, and a login on the server (with AuthMePlugin), so that the password they enter is just for their profile on our server, we respect privacy and so they will not enter their credentials into the launcher. It's goal is just to verify for the mods and launch a minecraft instance

Edited by bibouche_
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Need logs from an installer text document? There are too many lines, I can not throw them all. How can I drop them?  
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Really old Minecraft versions are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Yes the installer is necessary. Please post the output from running it. What you posted is not the installer.
    • Hi, I have problem, weird, because this same modpack works property on different devices, without any crash, but on my tablet keep crashes. There is a crash report. I'm not so good at this, so I have no idea where problem is. Please, help:) thank you.   K - Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   ratscore (Rats-Mod-1.12.2.jar)   XaeroMinimapPlugin (Xaeros-Minimap-Mod-1.12.2.jar)   Controllable (controllable-0.11.2-mc1.12.2.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   MovingWorldCore (MovingWorld-Mod-1.12.jar)   IvToolkit (IvToolkit-1.12.jar)   TheBetweenlandsLoadingPlugin (TheBetweenlands-3.4.7-core.jar) Contact their authors BEFORE contacting forge // You should try our sister game, Minceraft! Time: 1/28/22 3:01 PM Description: Initializing game java.lang.UnsatisfiedLinkError: org.libsdl.SDL.SDL_INIT_TIMER()I at org.libsdl.SDL.SDL_INIT_TIMER(Native Method) at org.libsdl.SDL.<clinit>(SDL.java:348) at uk.co.electronstudio.sdl2gdx.SDL2ControllerManager.<init>(SDL2ControllerManager.java:44) at uk.co.electronstudio.sdl2gdx.SDL2ControllerManager.<init>(SDL2ControllerManager.java:25) at com.mrcrayfish.controllable.client.ControllerManager.<init>(ControllerManager.java:18) at com.mrcrayfish.controllable.Controllable.onPreInit(Controllable.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at org.libsdl.SDL.SDL_INIT_TIMER(Native Method) at org.libsdl.SDL.<clinit>(SDL.java:348) at uk.co.electronstudio.sdl2gdx.SDL2ControllerManager.<init>(SDL2ControllerManager.java:44) at uk.co.electronstudio.sdl2gdx.SDL2ControllerManager.<init>(SDL2ControllerManager.java:25) at com.mrcrayfish.controllable.client.ControllerManager.<init>(ControllerManager.java:18) at com.mrcrayfish.controllable.Controllable.onPreInit(Controllable.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Linux (aarch64) version Android-11 Java Version: 1.8.0-internal, Oracle Corporation Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 1590505384 bytes (1516 MB) / 2296381440 bytes (2190 MB) up to 2296381440 bytes (2190 MB) JVM Flags: 3 total; -Xms2298M -Xmx2298M -Xbootclasspath/p:/storage/emulated/0/Android/data/net.kdt.pojavlaunch/files/caciocavallo/ResConfHack.jar:/storage/emulated/0/Android/data/net.kdt.pojavlaunch/files/caciocavallo/cacio-androidnw-1.10-SNAPSHOT.jar:/storage/emulated/0/Android/data/net.kdt.pojavlaunch/files/caciocavallo/cacio-shared-1.10-SNAPSHOT.jar IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2860 35 mods loaded, 35 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID                                           | Version                 | Source                                        | Signature                                | |:----- |:-------------------------------------------- |:----------------------- |:--------------------------------------------- |:---------------------------------------- | | LCH   | minecraft                                    | 1.12.2                  | minecraft.jar                                 | None                                     | | LCH   | mcp                                          | 9.42                    | minecraft.jar                                 | None                                     | | LCH   | FML                                          | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 | | LCH   | forge                                        | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 | | LCH   | ivtoolkit                                    | 1.3.3-1.12              | minecraft.jar                                 | None                                     | | LCH   | xaerominimap_core                            | 1.12.2-1.0              | minecraft.jar                                 | None                                     | | LC    | controllable                                 | 0.11.2                  | controllable-0.11.2-mc1.12.2.jar              | None                                     | | LC    | com.elytradev.movingworld.common.asm.coremod |                         | minecraft.jar                                 | None                                     | | LC    | biomesoplenty                                | 7.0.1.2439              | BiomesOPlenty-1.12.2-7.0.1.2439-universal.jar | None                                     | | LC    | craftstudioapi                               | 1.0.0                   | CraftStudio-1.0.0.93-mc1.12-alpha.jar         | None                                     | | LC    | twilightforest                               | 3.9.888                 | Twilight-Forest-Mod-1.12.2.jar                | None                                     | | LC    | animania                                     | 1.7.1                   | Animania-Mod-1.12.2.jar                       | None                                     | | LC    | bettermineshafts                             | 1.12.2-1.3              | BetterMineshaftsForge-1.12.2-1.3.jar          | None                                     | | LC    | customspawner                                | 3.11.4                  | Custom-Mob-Spawner-Mod-1.12.2.jar             | None                                     | | LC    | movingworld                                  | 1.12-6.342              | MovingWorld-Mod-1.12.jar                      | None                                     | | LC    | davincisvessels                              | @DVESSELSVER@           | davincisvessels-1.12-6.340-full.jar           | None                                     | | LC    | dldungeonsjbg                                | 1.14.7                  | DoomlikeDungeons-1.14.7-MC1.12.2.jar          | None                                     | | LC    | umm3185118519                                | release 1.2 - MC 1.12.2 | Extended-Items-Ores-Mod-1.12.2.jar            | None                                     | | LC    | falling_tree                                 | 2.1.0                   | Falling-Tree-Mod-1.12.2.jar                   | None                                     | | LC    | forgelin                                     | 1.8.4                   | Forgelin-1.8.4.jar                            | None                                     | | LC    | ironchest                                    | 1.12.2-7.0.67.844       | Iron-Chests-Mod-1.12.2.jar                    | None                                     | | LC    | jei                                          | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                     | None                                     | | LC    | labyrinth                                    | ${version}              | Labyrinth-1.12.2-1.0.jar                      | None                                     | | LC    | mocreatures                                  | 12.0.5                  | Mo-Creatures-Mod-1.12.2.jar                   | None                                     | | LC    | cfm                                          | 6.3.1                   | MrCrayfishs-Furniture-Mod-1.12.2.jar          | None                                     | | LC    | elevatorid                                   | 1.3.14                  | OpenBlocks-Elevator-Mod-1.12.2.jar            | None                                     | | LC    | llibrary                                     | 1.7.18                  | LLibrary-1.12.2.jar                           | b9f30a813bee3b9dd5652c460310cfcd54f6b7ec | | LC    | rats                                         | 3.2.9                   | Rats-Mod-1.12.2.jar                           | None                                     | | LC    | reccomplex                                   | 1.4.8.2                 | RecurrentComplex-1.4.8.2.jar                  | None                                     | | LC    | roguelike                                    | 1.8.0                   | Roguelike-Dungeons-Mod-1.12.2.jar             | None                                     | | LC    | simplybackpacks                              | 1.0.1                   | Simply-Backpacks-1.12.2.jar                   | None                                     | | LC    | tektopia                                     | 1.1.0                   | tektopia-1.1.0.jar                            | None                                     | | LC    | uniquee                                      | 1.9.0                   | Unique-Enchantments-Mod-1.12.2.jar            | None                                     | | LC    | xaerominimap                                 | 20.23.0                 | Xaeros-Minimap-Mod-1.12.2.jar                 | None                                     | | LC    | thebetweenlands                              | 3.4.7                   | TheBetweenlands-3.4.7-universal.jar           | 38067d6878811efb38b6a045521cfd80b9b60b38 | Loaded coremods (and transformers): llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher ratscore (Rats-Mod-1.12.2.jar)   com.github.alexthe666.rats.server.misc.RatsRuntimePatcher XaeroMinimapPlugin (Xaeros-Minimap-Mod-1.12.2.jar)   xaero.common.core.transformer.ChunkTransformer   xaero.common.core.transformer.NetHandlerPlayClientTransformer   xaero.common.core.transformer.EntityPlayerTransformer   xaero.common.core.transformer.AbstractClientPlayerTransformer   xaero.common.core.transformer.WorldClientTransformer   xaero.common.core.transformer.EntityPlayerSPTransformer   xaero.common.core.transformer.PlayerListTransformer Controllable (controllable-0.11.2-mc1.12.2.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   MovingWorldCore (MovingWorld-Mod-1.12.jar)   IvToolkit (IvToolkit-1.12.jar)   TheBetweenlandsLoadingPlugin (TheBetweenlands-3.4.7-core.jar)   thebetweenlands.core.TheBetweenlandsClassTransformer Launched Version: 1.12.2 LWJGL: 3.2.3 SNAPSHOT OpenGL: GL4ES wrapper GL version 2.1 gl4es wrapper 1.1.4, ptitSeb GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 9x null
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.