$variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-d": { "model": "vintagecraft:metalplate/' . $metal . '" }'; $variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-u": { "model": "vintagecraft:metalplate/' . $metal . '", "x":180 }'; $variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-n": { "model": "vintagecraft:metalplate/' . $metal . '", "x":90, "y": 180 }'; $variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-s": { "model": "vintagecraft:metalplate/' . $metal . '", "x":90 }'; $variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-w": { "model": "vintagecraft:metalplate/' . $metal . '", "x":90, "y":90 }'; $variants[] = "\t\t" . '"cutout=false,metalandfacing=' . $metal . '-e": { "model": "vintagecraft:metalplate/' . $metal . '", "x": 90, "y":270 }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-d": { "model": "vintagecraft:metalplate/' . $metal . '-cutout" }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-u": { "model": "vintagecraft:metalplate/' . $metal . '-cutout", "x":180 }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-n": { "model": "vintagecraft:metalplate/' . $metal . '-cutout", "x":90, "y": 180 }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-s": { "model": "vintagecraft:metalplate/' . $metal . '-cutout", "x":90 }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-w": { "model": "vintagecraft:metalplate/' . $metal . '-cutout", "x":90, "y":90 }'; $variants[] = "\t\t" . '"cutout=true,metalandfacing=' . $metal . '-e": { "model": "vintagecraft:metalplate/' . $metal . '-cutout", "x": 90, "y":270 }'; $numstates += 6; file_put_contents("models/block/metalplate/{$metal}.json", getBlockModel("metalplate", $metal)); file_put_contents("models/block/metalplate/{$metal}-cutout.json", getBlockModel("metalplate-cutout", $metal)); file_put_contents("models/item/metalplate/{$metal}.json", getItemModel("metalplate", $metal)); } for ($i = 0; $i < ceil($numstates / 16) + 1; $i++) { file_put_contents("blockstates/metalplate" . ($i > 0 ? $i + 1 : "") . ".json", getBlockStates($variants)); } function getBlockStates($variants) { return '{ "variants": { ' . implode(",\r\n", $variants) . ' } }'; } function getBlockModel($blockclass, $blocktype) { $base = 'base';
"facing=east,in_wall=true,open=true,treetype=' . $blocktype . '": { "model": "vintagecraft:fencegate/' . $blocktype . '_open", "y": 270, "uvlock": true }'; } for ($i = 0; $i < ceil(count($blocktypes) / 1); $i++) { file_put_contents("blockstates/" . $blockclass . ($i > 0 ? $i + 1 : "") . ".json", getBlockStates($variants)); } /********** 4. Stairs *************/ $blockclass = "stairs"; $subtypes = array("normal", "outer", "inner"); $variants = array(); foreach ($blocktypes as $blocktype) { $blockoutdir = "models/block/{$blockclass}/"; $itemoutdir = "models/item/{$blockclass}/"; foreach ($subtypes as $subtype) { file_put_contents($blockoutdir . $blocktype . "_{$subtype}.json", getBlockModel($subtype, $blockclass, $blocktype)); } file_put_contents($itemoutdir . $blocktype . ".json", getItemModel($blockclass, $blocktype . "_normal")); $variants[] = ' "facing=east,half=bottom,shape=straight,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_normal" }, "facing=west,half=bottom,shape=straight,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_normal", "y": 180, "uvlock": true }, "facing=south,half=bottom,shape=straight,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_normal", "y": 90, "uvlock": true }, "facing=north,half=bottom,shape=straight,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_normal", "y": 270, "uvlock": true }, "facing=east,half=bottom,shape=outer_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer" }, "facing=west,half=bottom,shape=outer_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 180, "uvlock": true }, "facing=south,half=bottom,shape=outer_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 90, "uvlock": true }, "facing=north,half=bottom,shape=outer_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 270, "uvlock": true }, "facing=east,half=bottom,shape=outer_left,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 270, "uvlock": true }, "facing=west,half=bottom,shape=outer_left,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 90, "uvlock": true }, "facing=south,half=bottom,shape=outer_left,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer" }, "facing=north,half=bottom,shape=outer_left,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_outer", "y": 180, "uvlock": true }, "facing=east,half=bottom,shape=inner_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_inner" }, "facing=west,half=bottom,shape=inner_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_inner", "y": 180, "uvlock": true }, "facing=south,half=bottom,shape=inner_right,treetype=' . $blocktype . '": { "model": "vintagecraft:stairs/' . $blocktype . '_inner", "y": 90, "uvlock": true },
<?php $blocktype = "rawore"; $rocktypes = array("andesite", "basalt", "claystone", "conglomerate", "diorite", "gneiss", "granite", "limestone", "marble", "quartzite", "schist", "shale", "gabbro", "sandstone", "redsandstone", "chert", "chalk", "kimberlite", "slate"); $oretypes = array("clay", "peat", "lignite", "bituminouscoal", "nativecopper", "limonite", "nativegold_quartz", "redstone", "diamond", "emerald", "lapislazuli", "cassiterite", "quartz", "rocksalt", "platinum", "ilmenite", "nativesilver_quartz", "sphalerite", "bismuthinite", "chromite", "sylvite_rocksalt", "olivine", "peridot_olivine", "galena", "sulfur"); $variants = array(); $i = 0; foreach ($rocktypes as $rocktype) { foreach ($oretypes as $oretype) { $oreandrocktype = "{$oretype}-{$rocktype}"; $variants[] = "\t\t\"oreandrocktype={$oreandrocktype}\": { \"model\": \"vintagecraft:rawore/{$oreandrocktype}\"}"; file_put_contents("models/block/rawore/" . $oreandrocktype . ".json", getBlockModel("rawore", $oreandrocktype)); file_put_contents("models/item/rawore/" . $oreandrocktype . ".json", getItemModel("rawore", $oreandrocktype)); } } $cnt = ceil(count($rocktypes) * count($oretypes) / 16); while ($cnt-- > 0) { if ($cnt == 1) { $cnt = ""; } file_put_contents("blockstates/rawore{$cnt}.json", getBlockStates($variants)); } genOverlays(); function getBlockStates($variants) { return '{ "variants": { ' . implode(",\r\n", $variants) . ' } }'; }
} file_put_contents($itemoutdir . $blocktype . ".json", getItemModel($blockclass, $blocktype . "-2")); } else { file_put_contents($blockoutdir . $blocktype . ".json", getBlockModel($modeltype, $blockclass, $blocktype)); file_put_contents($itemoutdir . $blocktype . ".json", getItemModel($blockclass, $blocktype)); $variants[] = "\t\t" . '"rocktype=' . $blocktype . '": { "model": "vintagecraft:' . $blockclass . '/' . $blocktype . '" }'; } } for ($i = 0; $i < ceil(count($blocktypes) / $availtypes[$blockclass]); $i++) { file_put_contents("blockstates/" . $blockclass . ($i > 0 ? $i + 1 : "") . ".json", getBlockStates($variants)); } } foreach ($itemclasses as $itemclass) { foreach ($blocktypes as $blocktype) { $itemoutdir = "models/item/{$itemclass}/"; file_put_contents($itemoutdir . $blocktype . ".json", getItemModel($itemclass, $blocktype)); } } function getBlockStates($variants) { return '{ "variants": { ' . implode(",\r\n", $variants) . ' } }'; } function getBlockModel($modeltype, $blockclass, $blocktype, $param = null) { if ($blockclass == "subsoil" && $param && $param != "nograss") { return '{ "parent": "vintagecraft:block/topsoil/grass",