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

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.

  • Author

bump.

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

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

It works, I don't know why.

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.

  • Author

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.

  • Author

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.

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.