Custom Window Title

Custom Window Title

2M Downloads

More placeholders

sudofox opened this issue ยท 4 comments

commented

Hi,

I have a number of Minecraft accounts that I use to run various farms while AFK. It'd be useful to be able to set things like the current logged-in username, the server, maybe a custom {status} string reconfigurable at runtime (e.g. /windowtitle status Running oak log farm) and so on to make it easy to figure out which Minecraft instance is supposed to be doing what.

commented

I can add username, the rest is out of scope for this mod.

commented

thanks :)

commented

Why is there an Issue with this Idea, if you were to just use
for example an Mixin everytime you would open a Gui, because Minecraft would change its title, the title of the window would change.
@Inject(method = "getWindowTitle", at = @at("HEAD"), cancellable = true)
private void getWindowTitle(final CallbackInfoReturnable callbackInfo){
callbackInfo.setReturnValue(config.getTitle()));
}
If you want, I could add a pull-request adding this feature.

commented

Why is there an Issue with this Idea, if you were to just use for example an Mixin everytime you would open a Gui, because Minecraft would change its title, the title of the window would change. @Inject(method = "getWindowTitle", at = @at("HEAD"), cancellable = true) private void getWindowTitle(final CallbackInfoReturnable callbackInfo){ callbackInfo.setReturnValue(config.getTitle())); } If you want, I could add a pull-request adding this feature.

That does not solve hooking into the command system to change the title. I'm not interested in maintaining that complexity.