Jump to content

[1.8] inventory transformation of b3d model


MCRaichu

Recommended Posts

Hi,

I have a problem with a b3d model. everything works great except that the transformation in the .json file don't work. Does anyone have an idea why? Here my .json file

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "texture": "ool:blocks/refinery.png"
        },
        "model": "ool:refinery.b3d"
     },
    "variants": { 
        "normal": [{
            "transform": {
                "translation": [ 0, 10.0, 0],
                "scale": 0.5
            }
        }],
        "inventory": [{
            "transform": {
                "firstperson": {
                    "rotation": [ 0, 0, 0],
                    "translation": [ 3, 10.0, 0.0],
                    "scale": 1.0
                },
                "thirdperson": {
                    "rotation": [ 0, 0, 180 ],
                    "translation": [ 3, 10.0, 0.0],
                    "scale": 0.35
                },
                "gui": {
                    "scale": 1.0
                }
            }
        }],
        "status": {
            "on": {"model": "ool:refinery.b3d", "texture": "ool:blocks/refinery.png"},
            "off": {"model": "ool:refinery.b3d", "texture": "ool:blocks/refinery.png"}
        }
        
    }
}

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

and another question: what forge class is responsible for parsing the json files? i would like to check what the parser is looking for.

 

The blockstates JSON is parsed in

BlockStateLoader.load

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Thanks, I found the B3DLoader class. But it can't find the source of my problem.

I went from the B3DLoader to ModelLoader to WeightedRandomModel(Variants variants). And here, when creating my inventory variant the TRSRTransformation is only an identity matrix.... meaning no transformation applied. And i don't understand why. I checked other threads and they have the same stuff in their json files and it works.

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

Bump

and update:

Inside the BlockStateLoader.load function the variants get parsed corret. but any parameter of the variants other than model (e.g. texture) is not used. the only thing comming to my mind is, that something is different within the b3d models. i downloaded the chest.b3d from https://github.com/MinecraftForge/MinecraftForge/tree/master/src/test/resources/assets/forgedebugmodelloaderregistry/models/block and if I use it I get circular depndecies and outofmemory exceptions.

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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