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

I am rendering an entity in 1.16.2, but the texture is getting FileNotFoundExceptions. I added loot tables and lang files but they didn't work either, so I think my resource folder is just not getting recognized. I made sure everything in my java code is correct, such as modid, but I'm not too sure about build.gradle and the other non-java files. Here is my build.gradle: 

buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
    }
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.16.2-0.9.0.0'
group = 'com.david.minecraft.testmod'
archivesBaseName = 'testmod'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    mappings channel: 'snapshot', version: '20200514-1.16'
    runs {
        client {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
            property 'forge.logging.console.level', 'debug'

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
            property 'forge.logging.console.level', 'debug'

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
            property 'forge.logging.console.level', 'debug'
            args '--mod', 'testmod', '--all', '--output', file('src/generated/resources/')

            mods {
                testmod {
                    source sourceSets.main
                }
            }
        }
    }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.16.2-33.0.3'
}

jar {
    manifest {
        attributes([
                "Specification-Title"     : "testmod",
                "Specification-Vendor"    : "david",
                "Specification-Version"   : "1",
                "Implementation-Title"    : project.name,
                "Implementation-Version"  : "${version}",
                "Implementation-Vendor"   : "david",
                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

jar.finalizedBy('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
        }
    }
}

What have I done wrong?

Edited by DavidQF555

Are you using Eclipse? You might need to hit F5 to refresh the workspace because Eclipse caches the non-java files in your mod, so Eclipse won't see them until you refresh the workspace.

  • Author
14 minutes ago, Awsome said:

Are you using Eclipse? You might need to hit F5 to refresh the workspace because Eclipse caches the non-java files in your mod, so Eclipse won't see them until you refresh the workspace.

I'm using IntelliJ, is there something similar I need to do for that? I did reload from disk, so it shouldn't be a problem.

Edited by DavidQF555

  • Author
39 minutes ago, CAS_ual_TY said:

Post the debug log

[10:00:41] [Render thread/WARN] [minecraft/TextureManager]: Failed to load texture: testmod:textures/entity/custom_entity.png
java.io.FileNotFoundException: testmod:textures/entity/custom_entity.png
	at net.minecraft.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.client.renderer.texture.SimpleTexture$TextureData.getTextureData(SimpleTexture.java:81) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.SimpleTexture.getTextureData(SimpleTexture.java:56) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:26) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.TextureManager.func_230183_b_(TextureManager.java:94) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:65) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.TextureManager.bindTextureRaw(TextureManager.java:58) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:49) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.RenderState$TextureState.lambda$new$0(RenderState.java:614) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.RenderState.setupRenderState(RenderState.java:207) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:408) ~[guava-21.0.jar:?] {}
	at net.minecraft.client.renderer.RenderType$Type.lambda$new$0(RenderType.java:518) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.RenderState.setupRenderState(RenderState.java:207) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.RenderType.finish(RenderType.java:280) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.IRenderTypeBuffer$Impl.finish(IRenderTypeBuffer.java:82) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.IRenderTypeBuffer$Impl.getBuffer(IRenderTypeBuffer.java:44) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.entity.LivingRenderer.render(LivingRenderer.java:118) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.entity.MobRenderer.render(MobRenderer.java:40) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.entity.EndermanRenderer.render(EndermanRenderer.java:32) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.entity.EndermanRenderer.render(EndermanRenderer.java:16) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.entity.EntityRendererManager.renderEntityStatic(EntityRendererManager.java:252) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.WorldRenderer.renderEntity(WorldRenderer.java:1212) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1022) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:619) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:437) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:991) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:590) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_265] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_265] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_265] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-6.1.1.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.2-33.0.3_mapped_snapshot_20200514-1.16-recomp.jar:?] {}

 

  • Author

My resource location for the texture was 

new ResourceLocation(TestMod.MOD_ID, "textures/entity/custom_entity.png");

Pretty sure this is correct: 

 

Capture.PNG

Edited by DavidQF555

  • Author

Are there any references to the resource folder outside of gradle.build and the java folder that I might need to check?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.