Posted May 14, 20232 yr I made an Command that provides Information about the current World. That includes the World Name. Here is the Code: Style WorldInfoStyle = Style.EMPTY; WorldInfoStyle = Style.EMPTY.withColor(TextColor.fromRgb(0xFFAA00)); if (entity instanceof Player _player && !_player.level.isClientSide()) _player.displayClientMessage(new TextComponent("World Name: ").setStyle(WorldInfoStyle).append(new TextComponent(world.getServer().getWorldData().getLevelName()).setStyle(Style.EMPTY)), (false)); I want after "World Name: " that the Style gets resets to its default Plain Text/String. I tried for myself at least 2-3 hours and tested a lot of other methods to reset the Style. Am I missing something?
May 15, 20232 yr https://forge.gemwire.uk/wiki/Components/1.18#BaseComponent i.e. siblings inherit style from their parent (the thing they are append to). You need to set a color instead of that setStyle(Style.EMPTY) which literally means propogate all the parent style to me. Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.