FOML icon indicating copy to clipboard operation
FOML copied to clipboard

java.io.FileNotFoundException: *.obj.json

Open theoparis opened this issue 3 years ago • 2 comments

So I made a test mod with FOML, and it keeps saying it can't find the .obj.json file (WARN]: Unable to load model: 'ifi:block/blast_door_base.obj' referenced from: ifi:blast_door#: java.io.FileNotFoundException: ifi:models/block/blast_door_base.obj.json) but it doesn't seem to be loading the .obj file itself.

My custom block also has a missing model (purple cube).

I copied everything from the FOML_test folder in this repo in terms of the json files and I changed the names to match my obj files, so it shouldn't be erroring.

theoparis avatar Apr 07 '21 03:04 theoparis

This is my dependencies block:

dependencies {
    // To change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
    modImplementation "dev.onyxstudios:FOML:${foml_version}"
    // Fabric API. This is technically optional, but you probably want it anyway.
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

    include "dev.onyxstudios:FOML:${foml_version}"
}

The block state file:

{
    "variants": {
        "": {
            "model": "ifi:block/blast_door_base.obj"
        }
    }
}
~

theoparis avatar Apr 07 '21 03:04 theoparis

I'd suggest taking a look at my library Myron. It's more up to date, and has several additional features you might find interesting.

Haven-King avatar Apr 08 '21 04:04 Haven-King