Skip to content

Commit

Permalink
heliolith blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
MBatt1 committed Mar 23, 2024
1 parent 817891a commit 1075284
Show file tree
Hide file tree
Showing 64 changed files with 1,148 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ private static Settings floestoneBrick() {
public static final ParadiseLostStairsBlock FLOESTONE_BRICK_STAIRS = add("floestone_brick_stairs", new ParadiseLostStairsBlock(FLOESTONE_BRICK.getDefaultState(), floestoneBrick()));
public static final WallBlock FLOESTONE_BRICK_WALL = add("floestone_brick_wall", new WallBlock(floestoneBrick()));

// Heliolith
public static final Block HELIOLITH = add("heliolith", new Block(floestone()));
public static final Block SMOOTH_HELIOLITH = add("smooth_heliolith", new Block(floestone()));
public static final SlabBlock HELIOLITH_SLAB = add("heliolith_slab", new SlabBlock(floestone()));
public static final SlabBlock SMOOTH_HELIOLITH_SLAB = add("smooth_heliolith_slab", new SlabBlock(floestone()));
public static final ParadiseLostStairsBlock HELIOLITH_STAIRS = add("heliolith_stairs", new ParadiseLostStairsBlock(FLOESTONE_BRICK.getDefaultState(), floestone()));
public static final ParadiseLostStairsBlock SMOOTH_HELIOLITH_STAIRS = add("smooth_heliolith_stairs", new ParadiseLostStairsBlock(FLOESTONE_BRICK.getDefaultState(), floestone()));
public static final WallBlock HELIOLITH_WALL = add("heliolith_wall", new WallBlock(floestone()));

// Dungeon Blocks
private static Settings carvedStone() {
return of(Material.STONE).hardness(0.5f).resistance(1f).sounds(BlockSoundGroup.STONE);
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/net/id/paradiselost/items/ParadiseLostItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ private static FabricItemSettings building_block() {
// stone
public static final BlockItem FLOESTONE = add("floestone", ParadiseLostBlocks.FLOESTONE, building_block);
public static final BlockItem COBBLED_FLOESTONE = add("cobbled_floestone", ParadiseLostBlocks.COBBLED_FLOESTONE, building_block);
public static final BlockItem HELIOLITH = add("heliolith", ParadiseLostBlocks.HELIOLITH, building_block);
public static final BlockItem VITROULITE = add("vitroulite", ParadiseLostBlocks.VITROULITE, building_block);
// nature
public static final BlockItem HIGHLANDS_GRASS = add("highlands_grass", ParadiseLostBlocks.HIGHLANDS_GRASS, building_block);
Expand Down Expand Up @@ -258,6 +259,7 @@ private static FabricItemSettings building_block() {
// bricks
public static final BlockItem FLOESTONE_BRICK = add("floestone_brick", ParadiseLostBlocks.FLOESTONE_BRICK, building_block);
public static final BlockItem CHISELED_FLOESTONE = add("chiseled_floestone", ParadiseLostBlocks.CHISELED_FLOESTONE, building_block);
public static final BlockItem SMOOTH_HELIOLITH = add("smooth_heliolith", ParadiseLostBlocks.SMOOTH_HELIOLITH, building_block);
public static final BlockItem CARVED_STONE = add("carved_stone", ParadiseLostBlocks.CARVED_STONE, building_block);
public static final BlockItem MOSSY_CARVED_STONE = add("mossy_carved_stone", ParadiseLostBlocks.MOSSY_CARVED_STONE, building_block);
public static final BlockItem CRACKED_CARVED_STONE = add("cracked_carved_stone", ParadiseLostBlocks.CRACKED_CARVED_STONE, building_block);
Expand All @@ -278,18 +280,22 @@ private static FabricItemSettings building_block() {
public static final BlockItem FLOESTONE_STAIRS = add("floestone_stairs", ParadiseLostBlocks.FLOESTONE_STAIRS, building_block);
public static final BlockItem COBBLED_FLOESTONE_STAIRS = add("cobbled_floestone_stairs", ParadiseLostBlocks.COBBLED_FLOESTONE_STAIRS, building_block);
public static final BlockItem MOSSY_FLOESTONE_STAIRS = add("mossy_floestone_stairs", ParadiseLostBlocks.MOSSY_FLOESTONE_STAIRS, building_block);
public static final BlockItem HELIOLITH_STAIRS = add("heliolith_stairs", ParadiseLostBlocks.HELIOLITH_STAIRS, building_block);
public static final BlockItem FLOESTONE_BRICK_STAIRS = add("floestone_brick_stairs", ParadiseLostBlocks.FLOESTONE_BRICK_STAIRS, building_block);
public static final BlockItem SMOOTH_HELIOLITH_STAIRS = add("smooth_heliolith_stairs", ParadiseLostBlocks.SMOOTH_HELIOLITH_STAIRS, building_block);
public static final BlockItem CARVED_STAIRS = add("carved_stone_stairs", ParadiseLostBlocks.CARVED_STONE_STAIRS, building_block);
public static final BlockItem MOSSY_CARVED_STAIRS = add("mossy_carved_stone_stairs", ParadiseLostBlocks.MOSSY_CARVED_STONE_STAIRS, building_block);
public static final BlockItem FLOESTONE_SLAB = add("floestone_slab", ParadiseLostBlocks.FLOESTONE_SLAB, building_block);
public static final BlockItem GOLDEN_AMBER_TILE_STAIRS = add("golden_amber_tile_stairs", ParadiseLostBlocks.GOLDEN_AMBER_TILE_STAIRS, building_block);

public static final BlockItem FLOESTONE_SLAB = add("floestone_slab", ParadiseLostBlocks.FLOESTONE_SLAB, building_block);
public static final BlockItem COBBLED_FLOESTONE_SLAB = add("cobbled_floestone_slab", ParadiseLostBlocks.COBBLED_FLOESTONE_SLAB, building_block);
public static final BlockItem MOSSY_FLOESTONE_SLAB = add("mossy_floestone_slab", ParadiseLostBlocks.MOSSY_FLOESTONE_SLAB, building_block);
public static final BlockItem HELIOLITH_SLAB = add("heliolith_slab", ParadiseLostBlocks.HELIOLITH_SLAB, building_block);
public static final BlockItem FLOESTONE_BRICK_SLAB = add("floestone_brick_slab", ParadiseLostBlocks.FLOESTONE_BRICK_SLAB, building_block);
public static final BlockItem SMOOTH_HELIOLITH_SLAB = add("smooth_heliolith_slab", ParadiseLostBlocks.SMOOTH_HELIOLITH_SLAB, building_block);
public static final BlockItem CARVED_SLAB = add("carved_stone_slab", ParadiseLostBlocks.CARVED_STONE_SLAB, building_block);
public static final BlockItem MOSSY_CARVED_SLAB = add("mossy_carved_stone_slab", ParadiseLostBlocks.MOSSY_CARVED_STONE_SLAB, building_block);
public static final BlockItem GOLDEN_AMBER_TILE_SLAB = add("golden_amber_tile_slab", ParadiseLostBlocks.GOLDEN_AMBER_TILE_SLAB, building_block);
public static final BlockItem GOLDEN_AMBER_TILE_STAIRS = add("golden_amber_tile_stairs", ParadiseLostBlocks.GOLDEN_AMBER_TILE_STAIRS, building_block);
// colorfuls

private static FabricItemSettings decoration() {
Expand Down Expand Up @@ -401,6 +407,7 @@ private static FabricItemSettings decoration() {
public static final BlockItem FLOESTONE_WALL = add("floestone_wall", ParadiseLostBlocks.FLOESTONE_WALL, decoration);
public static final BlockItem COBBLED_FLOESTONE_WALL = add("cobbled_floestone_wall", ParadiseLostBlocks.COBBLED_FLOESTONE_WALL, decoration);
public static final BlockItem MOSSY_FLOESTONE_WALL = add("mossy_floestone_wall", ParadiseLostBlocks.MOSSY_FLOESTONE_WALL, decoration);
public static final BlockItem HELIOLITH_WALL = add("heliolith_wall", ParadiseLostBlocks.HELIOLITH_WALL, decoration);
public static final BlockItem FLOESTONE_BRICK_WALL = add("floestone_brick_wall", ParadiseLostBlocks.FLOESTONE_BRICK_WALL, decoration);
public static final BlockItem CARVED_WALL = add("carved_stone_wall", ParadiseLostBlocks.CARVED_STONE_WALL, decoration);
public static final BlockItem MOSSY_CARVED_WALL = add("mossy_carved_stone_wall", ParadiseLostBlocks.MOSSY_CARVED_STONE_WALL, decoration);
Expand Down
91 changes: 91 additions & 0 deletions src/main/resources/asset_helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import os
MOD_ID = "paradise_lost"

def get_asset_path():
return (os.getcwd()+"/assets/")

def generate_standard_block(block_id):
blockstate_file = open(get_asset_path()+MOD_ID+"/blockstates/"+block_id+".json", "w")
block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+".json", "w")
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+block_id+".json", "w")

blockstate_file.write("{\n\t\"variants\": {\n\t\t\"\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\"\n\t\t}\n\t}\n}")
block_model_file.write("{\n\t\"parent\": \"minecraft:block/cube_all\",\n\t\"textures\": {\n\t\t\"all\": \""+MOD_ID+":block/"+block_id+"\"\n\t}\n}")
item_model_file.write("{\n\t\"parent\": \""+MOD_ID+":block/"+block_id+"\"\n}")

blockstate_file.close()
block_model_file.close()
item_model_file.close()

def generate_standard_item(item_id):
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+item_id+".json", "w")
item_model_file.write("{\n\t\"parent\": \"minecraft:item/generated\",\n\t\"textures\": {\n\t\t\"layer0\": \""+MOD_ID+":item/"+item_id+"\"\n\t}\n}")
item_model_file.close()

def generate_handheld_item(item_id):
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+item_id+".json", "w")
item_model_file.write("{\n\t\"parent\": \"minecraft:item/handheld\",\n\t\"textures\": {\n\t\t\"layer0\": \""+MOD_ID+":item/"+item_id+"\"\n\t}\n}")
item_model_file.close()

def generate_log_block(block_id):
blockstate_file = open(get_asset_path()+MOD_ID+"/blockstates/"+block_id+".json", "w")
block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+".json", "w")
horizontal_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+"_horizontal.json", "w")
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+block_id+".json", "w")

blockstate_file.write("{\n\t\"variants\": {\n\t\t\"axis=x\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_horizontal\",\n\t\t\t\"x\": 90,\n\t\t\t\"y\": 90\n\t\t},\n\t\t\"axis=y\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\"\n\t\t},\n\t\t\"axis=z\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_horizontal\",\n\t\t\t\"x\": 90\n\t\t}\n\t}\n}")
block_model_file.write("{\n\t\"parent\": \"minecraft:block/cube_column\",\n\t\"textures\": {\n\t\t\"end\": \""+MOD_ID+":block/"+block_id+"_top\",\n\t\t\"side\": \""+MOD_ID+":block/"+block_id+"\"\n\t}\n}")
horizontal_block_model_file.write("{\n\t\"parent\": \"minecraft:block/cube_column_horizontal\",\n\t\"textures\": {\n\t\t\"end\": \""+MOD_ID+":block/"+block_id+"_top\",\n\t\t\"side\":\""+MOD_ID+":block/"+block_id+"\"\n\t}\n}")
item_model_file.write("{\n\t\"parent\": \""+MOD_ID+":block/"+block_id+"\"\n}")

blockstate_file.close()
block_model_file.close()
horizontal_block_model_file.close()
item_model_file.close()

def generate_stairs_block(block_id, texture):
blockstate_file = open(get_asset_path()+MOD_ID+"/blockstates/"+block_id+".json", "w")
base_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+".json", "w")
inner_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+"_inner.json", "w")
outer_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+"_outer.json", "w")
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+block_id+".json", "w")

blockstate_file.write("{\n\t\"variants\": {\n\t\t\"facing=east,half=bottom,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=bottom,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\"\n\t\t},\n\t\t\"facing=east,half=bottom,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=bottom,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\"\n\t\t},\n\t\t\"facing=east,half=bottom,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\"\n\t\t},\n\t\t\"facing=east,half=top,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=top,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=top,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=top,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=east,half=top,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"x\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=bottom,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=bottom,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=bottom,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=bottom,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=bottom,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=top,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=top,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=top,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=top,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=north,half=top,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=bottom,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\"\n\t\t},\n\t\t\"facing=south,half=bottom,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=bottom,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\"\n\t\t},\n\t\t\"facing=south,half=bottom,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=bottom,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=top,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=top,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=top,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=top,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=south,half=top,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=bottom,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=bottom,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=bottom,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 90,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=bottom,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=bottom,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=top,shape=inner_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=top,shape=inner_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_inner\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=top,shape=outer_left\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=top,shape=outer_right\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_outer\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 270,\n\t\t\t\"uvlock\": true\n\t\t},\n\t\t\"facing=west,half=top,shape=straight\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\",\n\t\t\t\"x\": 180,\n\t\t\t\"y\": 180,\n\t\t\t\"uvlock\": true\n\t\t}\n\t}\n}")
base_block_model_file.write("{\n\t\"parent\": \"minecraft:block/stairs\",\n\t\"textures\": {\n\t\t\"bottom\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"top\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"side\": \""+MOD_ID+":block/"+texture+"\"\n\t}\n}")
inner_block_model_file.write("{\n\t\"parent\": \"minecraft:block/inner_stairs\",\n\t\"textures\": {\n\t\t\"bottom\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"top\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"side\": \""+MOD_ID+":block/"+texture+"\"\n\t}\n}")
outer_block_model_file.write("{\n\t\"parent\": \"minecraft:block/outer_stairs\",\n\t\"textures\": {\n\t\t\"bottom\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"top\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"side\": \""+MOD_ID+":block/"+texture+"\"\n\t}\n}")
item_model_file.write("{\n\t\"parent\": \""+MOD_ID+":block/"+block_id+"\"\n}")

blockstate_file.close()
base_block_model_file.close()
inner_block_model_file.close()
outer_block_model_file.close()
item_model_file.close()

def generate_slab_block(block_id, base_block_id, texture):
blockstate_file = open(get_asset_path()+MOD_ID+"/blockstates/"+block_id+".json", "w")
bottom_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+".json", "w")
top_block_model_file = open(get_asset_path()+MOD_ID+"/models/block/"+block_id+"_top.json", "w")
item_model_file = open(get_asset_path()+MOD_ID+"/models/item/"+block_id+".json", "w")

blockstate_file.write("{\n\t\"variants\": {\n\t\t\"type=bottom\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"\"\n\t\t},\n\t\t\"type=double\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+base_block_id+"\"\n\t\t},\n\t\t\"type=top\": {\n\t\t\t\"model\": \""+MOD_ID+":block/"+block_id+"_top\"\n\t\t}\n\t}\n}")
bottom_block_model_file.write("{\n\t\"parent\": \"minecraft:block/slab\",\n\t\"textures\": {\n\t\t\"bottom\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"top\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"side\": \""+MOD_ID+":block/"+texture+"\"\n\t}\n}")
top_block_model_file.write("{\n\t\"parent\": \"minecraft:block/slab_top\",\n\t\"textures\": {\n\t\t\"bottom\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"top\": \""+MOD_ID+":block/"+texture+"\",\n\t\t\"side\": \""+MOD_ID+":block/"+texture+"\"\n\t}\n}")
item_model_file.write("{\n\t\"parent\": \""+MOD_ID+":block/"+block_id+"\"\n}")

blockstate_file.close()
bottom_block_model_file.close()
top_block_model_file.close()
item_model_file.close()



generate_standard_block("heliolith")
generate_stairs_block("heliolith_stairs", "heliolith")
generate_slab_block("heliolith_slab", "heliolith", "heliolith")
generate_standard_block("smooth_heliolith")
generate_stairs_block("smooth_heliolith_stairs", "smooth_heliolith")
generate_slab_block("smooth_heliolith_slab", "smooth_heliolith", "smooth_heliolith")



Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "paradise_lost:block/heliolith"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"type=bottom": {
"model": "paradise_lost:block/heliolith_slab"
},
"type=double": {
"model": "paradise_lost:block/heliolith"
},
"type=top": {
"model": "paradise_lost:block/heliolith_slab_top"
}
}
}
Loading

0 comments on commit 1075284

Please sign in to comment.