
Issue with Multipart BlockState Generator
iglee42 opened this issue ยท 0 comments
Minecraft Version
1.20.1
KubeJS Version
2001.6.5-build.16
Rhino Version
2001.2.3-build.10
Architectury Version
9.2.14
Forge/Fabric Version
Forge 47.4.0
Describe your issue
Hi, I used the multipart block state generator with this code :
event.addMultipartBlockState("createcasing:" + casing.name + "_encased_fluid_pipe", gen => {
gen.part("down=false",v=>v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name).x(-90));
gen.part("down=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name).x(-90));
gen.part("up=false", v => v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name).x(90));
gen.part("up=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name).x(90));
gen.part("west=false", v => v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name).y(90));
gen.part("west=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name).y(90));
gen.part("east=false", v => v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name).y(270));
gen.part("east=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name).y(270));
gen.part("north=false", v => v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name).y(180));
gen.part("north=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name).y(180));
gen.part("south=false", v => v.model(textures.namespace + ":block/encased_pipes/flat_" + casing.name));
gen.part("south=true", v => v.model(textures.namespace + ":block/encased_pipes/open_" + casing.name));
})
and when I reload the assets it says that the blockstate is invalid !
When I print the json I print this:
{
"multipart="[
{
"when":{
"down":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"down":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"up":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"up":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"west":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"west":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"east":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"east":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"north":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"north":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"south":"false"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
},
{
"when":{
"south":"true"
},
"apply":{
"model":"ArrowFunction (1) => {...}"
}
}
]
}
Can you help me to fix this please
Crash report/logs
No response