Jump to content

Any way to render text at different sizes?


exro

Recommended Posts

So I am learning how to code Minecraft mods and I am trying to render something onto the screen while in-game. I have done that and I'm trying to work out how to make it render smaller than it usually is. By the way, I am doing this in 1.7.10, not in the later versions.

 

Here is my class to render the text but I'm unsure on how to change the text size.

public class GuiNotif extends Gui
	{
	    String text = "Hello world!";
	 
	    public GuiNotif(Minecraft mc)
	    {
	        ScaledResolution scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
	        int width = scaled.getScaledWidth();
	        int height = scaled.getScaledHeight();
	        
	        drawCenteredString(mc.fontRenderer, text, width / 2, 1, Integer.parseInt("FFAA00", 16));
	    }
	}

 

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • forge simply won't boot up no matter how many mods are installed, i tried only the 1.20.1 and 1.20.6 versions and the same thing happened: nothing. the only thing that shows up in the logs is this   [14jun.2024 11:07:34.757] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, {MINECRAFT_USERNAME}, --version, 1.20.1, --gameDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\profiles\s, --assetsDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\meta\assets, --assetIndex, 5, --uuid, {MINECRAFT_UUID}, --accessToken, ????????, --clientId, c4502edb-87c6-40cb-b595-64a280cf8906, --xuid, 0, --userType, msa, --versionType, release, --width, 854, --height, 480, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.17, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [14jun.2024 11:07:34.765] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.11 by Azul Systems, Inc.; OS Windows 10 arch amd64 version 10.0 [14jun.2024 11:07:34.946] [main/WARN] [net.minecraftforge.fml.loading.FMLConfig/CORE]: Configuration file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\profiles\s\config\fml.toml is not correct. Correcting [14jun.2024 11:07:34.948] [main/INFO] [net.minecraftforge.fml.loading.FMLConfig/CORE]: Incorrect key [earlyWindowSkipGLVersions] was corrected from null to [] [14jun.2024 11:07:34.948] [main/INFO] [net.minecraftforge.fml.loading.FMLConfig/CORE]: Incorrect key [earlyWindowSquir] was corrected from null to false [14jun.2024 11:07:34.970] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [14jun.2024 11:07:35.208] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6   i tried in two different computers and had the same results help.....
    • Get the latest drivers from their website - do not update via system
    • https://paste.ee/p/2yikd  After installing curse forge and running 1.20.1 with 0 mods, only forge 47.3.1, this report is being yielded. Vanilla minecraft is not crashing, and I initially thought it was a mod issue, but it is clear now there is some sort of interaction between forge and my computer occurring.  Here are my computer specs for anyone wondering: TUF gaming A15 ASUS running Windows 11 Processor: AMD Ryzen 7 4800H with Radeon Graphics, fully updated (31.0.12014.6) Graphics: NVIDIA GeFORCE GTX 1660 Ti, fully updated game-ready drivers (32.0.15.5599)  I have been told this an error code related to graphics drivers, but both my integrated and dedicated drivers are entirely up to date. My AMD drivers have no version to roll back to and have never previously encountered this issue. I am seriously confused by this because I have never had an issue with running forge in the past and frequently play modded MC. This issue was exactly the same when I ran 1.19.2 with Forge version 43.2.0,  again with no mods.  Please help!!
    • Make a test without any mods - just forge If this works, add the mods in groups or one by one   Or use a pre-configured modpack as working base and add some mods  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.