1

.json help

TheCyanShyGuy's Avatar TheCyanShyGuy5/31/20 7:25 am history
1 emeralds 212 4
6/3/2020 5:14 pm
TheCyanShyGuy's Avatar TheCyanShyGuy
ok so recently i got into modeling with blockbench. i made some items and they worked. well i wanted to change the bow to three different weapons: a revolver, a snub nose, and the The Mare's Leg

I managed to take the .json from another texture pack (scarecrows Pillager to Pirate pack), study it and change it to fit MY models instead of his.

(i didnt change his pack i just used a copy of his .json to help me make mine)

this worked.... but it wouldnt show the The Mare's Leg. it only showed the revolver, and the snub.

could ANY of you geniuses tell me what i did wrong, how to fix it and add more items in the future? ive tried googling it, youtubing it, and just plain playing with it to see if i could get it to work (you can probably guess how it went for me)



EDIT: also if you could tell me how to add different sounds for the same item, but different model that'd be AWESOME thanks!

my .json


{
"parent": "item/revolver/revolver",
"overrides": [
{
"predicate": {
"pulling": 1
},
"model": "item/revolver/revolver_loading_0"
},
{
"predicate": {
"pulling": 1,
"pull": 0.167
},
"model": "item/revolver/revolver_loading_1"
},
{
"predicate": {
"pulling": 1,
"pull": 0.5
},
"model": "item/revolver/revolver_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 0.7
},
"model": "item/revolver/revolver_loading_3"
},
{
"predicate": {
"pulling": 1,
"pull": 0.8
},
"model": "item/revolver/revolver_loading_3"
},
{
"predicate": {
"pulling": 1,
"pull": 0.9
},
"model": "item/revolver/revolver_loading_3"
},
{
"predicate": {
"charged": 1
},
"model": "item/revolver/revolver_loading_3"
},










{
"predicate": {
"pulling": 0,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_empty"
},
{
"predicate": {
"pulling": 1,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_0"
},
{
"predicate": {
"pulling": 1,
"pull": 0.167,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_1"
},
{
"predicate": {
"pulling": 1,
"pull": 0.5,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 0.7,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 0.8,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 0.9,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 1,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"charged": 1,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_loading_2"
},
{
"predicate": {
"charged": 1,
"firework": 1,
"custom_model_data": 1
},
"model": "item/sawwedoff/themaresleg_empty"
}
]
},










{
"predicate": {
"pulling": 0,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_empty"
},
{
"predicate": {
"pulling": 1,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_0"
},
{
"predicate": {
"pulling": 1,
"pull": 0.167,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_1"
},
{
"predicate": {
"pulling": 1,
"pull": 0.5,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_2"
},
{
"predicate": {
"pulling": 1,
"pull": 0.7,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_3"
},
{
"predicate": {
"pulling": 1,
"pull": 0.8,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_3"
},
{
"predicate": {
"pulling": 1,
"pull": 0.9,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_3"
},
{
"predicate": {
"pulling": 1,
"pull": 1,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_3"
},
{
"predicate": {
"charged": 1,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_loading_3"
},
{
"predicate": {
"charged": 1,
"firework": 1,
"custom_model_data": 123
},
"model": "item/snubnose/snubnose_empty"
}
]
},
Posted by TheCyanShyGuy's Avatar
TheCyanShyGuy
Level 32 : Artisan Explorer
40

Create an account or sign in to comment.

4

ToeStub
06/02/2020 4:08 am
Level 56 : Grandmaster Procrastinator
ToeStub's Avatar
Ok, so I had a look over your json and it looks like you meant that the mares leg and the revolver are working while the snubnose is not. There are some errors in the json that are relatively easy to fix.

Fixed JSON
{ "parent": "item/revolver/revolver", "overrides": [ { "predicate": { "pulling": 1 }, "model": "item/revolver/revolver_loading_0" }, { "predicate": { "pulling": 1, "pull": 0.167 }, "model": "item/revolver/revolver_loading_1" }, { "predicate": { "pulling": 1, "pull": 0.5 }, "model": "item/revolver/revolver_loading_2" }, { "predicate": { "pulling": 1, "pull": 0.7 }, "model": "item/revolver/revolver_loading_3" }, { "predicate": { "pulling": 1, "pull": 0.8 }, "model": "item/revolver/revolver_loading_3" }, { "predicate": { "pulling": 1, "pull": 0.9 }, "model": "item/revolver/revolver_loading_3" }, { "predicate": { "charged": 1 }, "model": "item/revolver/revolver_loading_3" },

{ "predicate": { "pulling": 0, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_empty" }, { "predicate": { "pulling": 1, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_0" }, { "predicate": { "pulling": 1, "pull": 0.167, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_1" }, { "predicate": { "pulling": 1, "pull": 0.5, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "pulling": 1, "pull": 0.7, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "pulling": 1, "pull": 0.8, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "pulling": 1, "pull": 0.9, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "pulling": 1, "pull": 1, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "charged": 1, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_loading_2" }, { "predicate": { "charged": 1, "firework": 1, "custom_model_data": 1 }, "model": "item/sawwedoff/themaresleg_empty" },
{ "predicate": { "pulling": 0, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_empty" }, { "predicate": { "pulling": 1, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_0" }, { "predicate": { "pulling": 1, "pull": 0.167, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_1" }, { "predicate": { "pulling": 1, "pull": 0.5, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_2" }, { "predicate": { "pulling": 1, "pull": 0.7, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_3" }, { "predicate": { "pulling": 1, "pull": 0.8, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_3" }, { "predicate": { "pulling": 1, "pull": 0.9, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_3" }, { "predicate": { "pulling": 1, "pull": 1, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_3" }, { "predicate": { "charged": 1, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_loading_3" }, { "predicate": { "charged": 1, "firework": 1, "custom_model_data": 123 }, "model": "item/snubnose/snubnose_empty" } ]}



To understand why it went wrong you need a bit on knowledge as to the syntax of json files. A comma is used to separated multiple elements and the last element should not have a comma after it. All brackets that are opened should be closed.

In your json you had closed all the brackets before adding the snubnose json. All the json to add the models should have been inside the { "overwrites": [ ] }. Other than that you closed the outermost brackets twice.

As a side note, the best way to catch all this is to get a text editor geared towards code. Some examples of this are notepad++, brackets, atom or the one I use VSCode.
1
TheCyanShyGuy
06/02/2020 4:21 pm
Level 32 : Artisan Explorer
TheCyanShyGuy's Avatar
:o it worked! TYSM!! also i have Notpad++

so if i wanted to add another model how would i go about writing the extra json?

youre a big help ty again
1
ToeStub
06/02/2020 11:58 pm
Level 56 : Grandmaster Procrastinator
ToeStub's Avatar
Well, most of what you did was correct but all of it needs to be inside the "overwrites" square brackets and I would recommend putting it through a json parser to catch any mistakes you might have made. Also, watch out for missing/extra commas and make sure every bracket is closed/opened.

Glad I could be of help
2
TheCyanShyGuy
06/03/2020 5:14 pm
Level 32 : Artisan Explorer
TheCyanShyGuy's Avatar
Oh ok thanks again!

When you sent me the fixed json I thought you didn't do it right bc it didn't show the textures in game, but after further inspection I found out I was the moron bc I didn't copy the first curly bracket XD
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome