// Variant code from BlockPlanks
public static final PropertyEnum<BlockPlanks.EnumType> VARIANT = PropertyEnum.<BlockPlanks.EnumType>create("variant", BlockPlanks.EnumType.class);
JSON example from documentation please read the comments.
{
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "blocks/planks_oak",
"wall": "blocks/planks_oak"
},
"model": "pressure_plate_up",
"uvlock": true
},
"variants": {
// mossy is a boolean property.
"mossy": {
"true": {
// if true it changes the pressure plate from oak planks to mossy cobble
"textures": {
"texture": "blocks/cobblestone_mossy"
}
},
"false": {
// change nothing. The entry has to be here to be generated for internal usage by minecraft
}
},
// pillarcount is a property that determines how many pillar submodels we have. Ranges from 0 to 2
"pillarcount": {
0: {
// no pillar. Remember, has to be there.
},
1: {
// if it is true, it will add the wall model and combine it with the pressure plate
"submodel": "wall_n"
},
2: {
"textures": {
"wall": "blocks/cobblestone"
},
"submodel": {
"pillar1": { "model": "wall_n" },
"pillar2": { "model": "wall_n", "y": 90 }
}
}
}
}
}