Jump to content

CustomModelData for a Bow [18w44a]


DarkSwaper

Recommended Posts

hum hum... I want to create a custommodeldata for a bow, but idk how... so i tried myself but it use the texture of the normal bow. pls help meh ;-;

 

The bow.json vVv

Spoiler

{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/bow/1"
    },
    "display": {
        "thirdperson_righthand": {
            "rotation": [ -80, 260, -40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "thirdperson_lefthand": {
            "rotation": [ -80, -280, 40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, -90, 25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, 90, -25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        }
    },
    "overrides": [
        {
            "predicate": {
                "pulling": 1
            },
            "model": "item/bow_pulling_0/1"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.65
            },
            "model": "item/bow_pulling_1/1"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.9
            },
            "model": "item/bow_pulling_2/1"
        }
    ]
}

 

Edited by DarkSwaper
Link to comment
Share on other sites

  • 1 year later...

yeah,this is caused by this bug : https://bugs.mojang.com/browse/MC-158872

I've fixed it after one hour of fidling and reordering my file, this works :

 

{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/bow"
    },
    "display": {
        "thirdperson_righthand": {
            "rotation": [ -80, 260, -40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "thirdperson_lefthand": {
            "rotation": [ -80, -280, 40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, -90, 25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, 90, -25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        }
    },
    "overrides": [
        {
            "predicate": {
                "pulling": 1
            },
            "model": "item/bow_pulling_0"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.65
            },
            "model": "item/bow_pulling_1"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.9
            },
            "model": "item/bow_pulling_2"
        },
        {
            "predicate": {
                "custom_model_data": 1
            },
            "model": "item/custom_bow"
        },
        {
            "predicate": {
                "custom_model_data": 1,
                "pulling": 1
            },
            "model": "item/custom_bow_pulling_0"
        },
        {
            "predicate": {
                "custom_model_data": 1,
                "pulling": 1,
                "pull": 0.65
            },
            "model": "item/custom_bow_pulling_1"
        },
        {
            "predicate": {
                "custom_model_data": 1,
                "pulling": 1,
                "pull": 0.9
            },
            "model": "item/custom_bow_pulling_2"
        }
    ]
}

 

(the last one matching is taken, so you have to put them in order from the least specific to the most specific)

Link to comment
Share on other sites

  • 3 months later...

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.

×
×
  • Create New...

Important Information

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