How to add Custom Window title in 1.16.4?

Started by Killar.exe on Sun, 01/24/2021 - 21:56

Topic category: Advanced modding

Last seen on 06:09, 1. Mar 2021
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to add Custom Window title in 1.16.4?
Sun, 01/24/2021 - 21:59 (edited)

I think it's possible to add a custom window title like in 1.12.2. Because i found a hint!
If someone could know how to do or help to find it will be helpful!
 

package net.killarexe.negativen;

import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;

@NegativenModElements.ModElement.Tag
public class DisplayName extends NegativenModElements.ModElement {

	private Minecraft minecraft;
	private MainWindow window = minecraft.getMainWindow();
	private String title = "Negative-N 1.3 Pre-Release 3";
	 
	public DisplayName(NegativenModElements instance) {
		super(instance, 977);
	}

	@Override
	public void initElements() {
		window.setWindowTitle(title);
	}

}

this code doesn't work its just a start!

Edited by Killar.exe on Sun, 01/24/2021 - 21:59