Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted
Spoiler
	private final ResourceLocation texture = new ResourceLocation(Test.MOD_ID , "overlay.png");
...
	@SubscribeEvent
    public void renderOverlay(RenderGameOverlayEvent e) {
        if (e.getType() == RenderGameOverlayEvent.ElementType.TEXT) {
            Minecraft mc = Minecraft.getMinecraft();
            mc.renderEngine.bindTexture(texture);
            drawTexturedModalRect(100, 100, 0, 0, 20, 20); // Sunny - day version
            drawTexturedModalRect(150, 100, 0, 20, 20, 20); // Rain
            drawTexturedModalRect(200, 100, 0, 40, 20, 20); // Storm
            drawTexturedModalRect(250, 100, 0, 60, 20, 20); // Sunny - night version
        }
    }

 

 

[12:55:49] [Client thread/WARN] [net.minecraft.client.renderer.texture.TextureManager]: Failed to load texture: tests_forge:overlay.png
java.io.FileNotFoundException: tests_forge:overlay.png
	at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SimpleReloadableResourceManager.java:69) ~[cev.class:?]
	at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SimpleTexture.java:40) ~[cdm.class:?]
	at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:101) [cdr.class:?]
	at net.minecraft.client.renderer.texture.TextureManager.func_110577_a(TextureManager.java:67) [cdr.class:?]
	at nullproject.Tests.additons.TestGui.renderOverlay(TestGui.java:26) [TestGui.class:1.0-SNAPSHOT]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_133_TestGui_renderOverlay_RenderGameOverlayEvent.invoke(.dynamic) [?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
	at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:717) [GuiIngameForge.class:?]
	at net.minecraftforge.client.GuiIngameForge.func_175180_a(GuiIngameForge.java:173) [GuiIngameForge.class:?]
	at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1426) [buq.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119) [bib.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

Resources tree:
EXTwcSs.png
 

Build and run options in Gradle: (I've tried both options)
n6C6EUz.png

How to fix? Can I attach something else?

Edited by RobotDolboeb

  • Author
1 hour ago, Luis_ST said:

what on earth did you do?
you should use a assets folder

yes, im tryed use

private final ResourceLocation texture = new ResourceLocation(Test.MOD_ID , "assets\\textures\\gui\\overlay.png");

 

Edited by RobotDolboeb

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.