{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "nicothekid:calcite_lantern",
      "menu_category": {
				"category": "items",
				"group": "itemGroup.name.candles"
			},
      "states": {
				"nicothekid:lantern_rotation": [
				  0,
				  1,
					2,
					3,
					4,
					5
				]
			}
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "nicothekid_calcite_lantern_down",
          "render_method": "alpha_test",
          "ambient_occlusion": false,
					"face_dimming": true
        }
      },
      "minecraft:geometry": "geometry.block.nicothekid_stone_lantern",
      "minecraft:map_color": "#f0f5f4",
      "minecraft:breathability": "air",
      "minecraft:collision_box": {
        "origin": [ -8, 0, -8 ],
        "size": [ 16, 16, 16 ]
      },
      "minecraft:selection_box": {
        "origin": [ -8, 0, -8 ],
        "size": [ 16, 16, 16 ]
      },
      "minecraft:light_dampening": 0,
      "minecraft:light_emission": 15,
      "minecraft:friction": 0.4,
      "minecraft:flammable": false,
      "minecraft:destructible_by_explosion": {
        "explosion_resistance": 25.0
      },
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 0.2
      },
      "minecraft:loot": "loot_tables/lamps_lanterns/blocks/nicothekid_calcite_lantern.json",
      "minecraft:on_player_placing": {
				"event": "nicothekid:placing_rotation"
			},
      "minecraft:transformation": {
        "rotation": [ 0, 0, 0 ]
      },
      
      "tag:calcite_lantern": {},
      "tag:custom_lantern": {},
      "tag:stone": {}
    },
    "permutations": [
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 0",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_up",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 0, 0 ]
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 1",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_down",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 0, 0 ]
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 2",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_side",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 0, 0 ]
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 3",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_side",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 180, 0 ]
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 4",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_side",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 90, 0 ]
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:lantern_rotation') == 5",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "nicothekid_calcite_lantern_side",
              "render_method": "alpha_test",
              "ambient_occlusion": false,
              "face_dimming": true
            }
          },
          "minecraft:transformation": {
            "rotation": [ 0, 270, 0 ]
          }
        }
      }
    ],
    "events": {
			"nicothekid:placing_rotation": {
				"set_block_state": {
					"nicothekid:lantern_rotation": "math.floor(query.cardinal_block_face_placed_on)"
				}
			}
    }
  }
}
