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 have searched for something up to date, and found nothing. All I am doing is trying to add a custom bow with a set of obj models. Everything works but the transforms are not showing as all. I have no control over the transforms, and when I look at the vanilla code the bow seems to have hard coded transformations. I know Tinker's Construct managed to make this work, but I can't figure out how they did it. 

 

Here's the blockstate I tried:

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
        },
        "model": "magitech:bow_compound_model"
     },
    "variants": {
        "normal": [{
        }],
        "inventory": [{
            "transform": {
                "gui": {
                    "rotation": [ { "y": 0}, {"x": 0}, {"z": 0} ],
                    "translation": [ 0, 0, 0],
                    "scale": 2.0
                },
                "ground": {
                    "rotation": [ { "y": 0}, {"x": 0}, {"z": 0} ],
                    "translation": [ 0, 0.25, 0],
                    "scale": 1.5
                },
                "thirdperson": {
                    "rotation": [ { "y": 90}, {"x": 0}, {"z": 45} ],
                    "translation": [ 0, 0.475, 0.15],
                    "scale": 1.35
                },
                "firstperson": {
                    "rotation": [ { "y": 90}, {"x": 0}, {"z": 45} ],
                    "translation": [ 0, 0, 0 ],
                    "scale": 5.0
                },
                "fixed": {
                    "rotation": [ { "y": 0}, {"x": 0}, {"z": 90} ],
                    "translation": [ 0, 0, 0 ],
                    "scale": 0.9
                }
            }
        }]
    }
}

 

And the file it references (not sure why but it only looks in the block models for it):

{
    "model": "magitech:item/bow_compound_model_standby.obj",
    "textures": {
    },
   "overrides": [
        {
            "predicate": {
                "pulling": 0
            },
            "model": "magitech:item/bow_compound_model_standby.obj"
        },
        {
            "predicate": {
                "pulling": 1
            },
            "model": "magitech:item/bow_compound_model__pulling_0.obj"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.65
            },
            "model": "magitech:item/bow_compound_model__pulling_1.obj"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.9
            },
            "model": "magitech:item/bow_compound_model__pulling_2.obj"
        }
    ]
}

 

The rest is pretty basic, I tried using the vanilla transforms like this:

{
    "model": "magitech:bow_compound_model_standby.obj",
    "textures": {
    },
    "display": {
        "thirdperson_righthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "thirdperson_lefthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 3.0, 3.0, 3.0 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        }
    },
    "overrides": [
        {
            "predicate": {
                "pulling": 0
            },
            "model": "magitech:item/bow_compound_model_standby.obj"
        },
        {
            "predicate": {
                "pulling": 1
            },
            "model": "magitech:item/bow_compound_model__pulling_0.obj"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.65
            },
            "model": "magitech:item/bow_compound_model__pulling_1.obj"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.9
            },
            "model": "magitech:item/bow_compound_model__pulling_2.obj"
        }
    ]
}

 

But all of them produce the exact same results, the model is rotated as a simple held/generated item. So why and how do I fix it? It only happens with the that have an override property, nothing else has had this problem (I've added a lot of other items with obj models already). If I extend Item or ItemBow, it makes no difference.

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.