{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "furnicraft:cuna",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:shulker"
    },
    "component_groups": {
      "minecraft:shulker_purple": {
        "minecraft:variant": {
          "value": 5
        }
      },
      "to_villager": {
        "minecraft:transformation": {
          "into": "furnicraft:cuna_boy",
          "begin_transform_sound": "remedy",
          "delay": {
            "value": 300,
            "block_assist_chance": 0.01,
            "block_radius": 4,
            "block_chance": 0.3,
            "block_types": [
              "minecraft:bed",
              "minecraft:iron_bars"
            ]
          }
        },
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "strength",
              "duration": 300
            },
            {
              "effect": "heal",
              "duration": 300
            }
          ],
          "remove_effects": "weakness"
        }
      },
      "tos_villager": {
        "minecraft:transformation": {
          "into": "furnicraft:cuna_girl",
          "begin_transform_sound": "remedy",
          "delay": {
            "value": 300,
            "block_assist_chance": 0.01,
            "block_radius": 4,
            "block_chance": 0.3,
            "block_types": [
              "minecraft:bed",
              "minecraft:iron_bars"
            ]
          }
        },
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "strength",
              "duration": 300
            },
            {
              "effect": "heal",
              "duration": 300
            }
          ],
          "remove_effects": "weakness"
        }
      },	  
      "minecraft:shulker_black": {
        "minecraft:variant": {
          "value": 0
		},
        "minecraft:health": {
          "value": 1,
          "max": 1
        },
		"minecraft:interact": {
          "interactions": [
		    {
		      "on_interact": {
			    "filters": {
			        "all_of": [
				      { "test": "has_equipment", "domain": "hand", "subject": "other", "value": "furnicraft:baby_girl" },
                      { "test" :  "is_family", "subject" : "other", "value" :  "player"}
				    ]
			    },
			    "event": "minecraft:cuna_girl"
		      },
		      "use_item": true,
			  "play_sounds": "fizz",
			  "interact_text": "action.interact.process"
		    },
		    {
		      "on_interact": {
			    "filters": {
			        "all_of": [
				      { "test": "has_equipment", "domain": "hand", "subject": "other", "value": "furnicraft:baby_boy" },
                      { "test" :  "is_family", "subject" : "other", "value" :  "player"}
				    ]
			    },
			    "event": "minecraft:cuna_boy"
		      },
		      "use_item": true,
			  "play_sounds": "fizz",
			  "interact_text": "action.interact.process"
			}
          ]
        }
      },		  		  
      "minecraft:shulker_blue": {
        "minecraft:variant": {
          "value": 4
        },
        "minecraft:health": {
          "value": 100,
          "max": 100
        },
		"minecraft:interact": {
          "interactions": [
		    {
		      "on_interact": {
			    "filters": {
			        "all_of": [
				      { "test": "has_equipment", "domain": "hand", "subject": "other", "value": "diamond" },
                      { "test" :  "is_family", "subject" : "other", "value" :  "player"}
				    ]
			    },
			    "event": "boy_converted"
		      },
		      "use_item": true,
			  "play_sounds": "fizz",
			  "interact_text": "action.interact.procex"
			}
          ]
        }
      },	
      "minecraft:shulker_brown": {
        "minecraft:variant": {
          "value": 3
        }
      },
      "minecraft:shulker_cyan": {
        "minecraft:variant": {
          "value": 6
        }
      },
      "minecraft:shulker_gray": {
        "minecraft:variant": {
          "value": 8
        }
      },
      "minecraft:shulker_green": {
        "minecraft:variant": {
          "value": 2
        }
      },
      "minecraft:shulker_light_blue": {
        "minecraft:variant": {
          "value": 12
        }
      },
      "minecraft:shulker_lime": {
        "minecraft:variant": {
          "value": 10
        }
      },
      "minecraft:shulker_magenta": {
        "minecraft:variant": {
          "value": 13
        }
      },
      "minecraft:shulker_orange": {
        "minecraft:variant": {
          "value": 14
        }
      },
      "minecraft:shulker_pink": {
        "minecraft:variant": {
          "value": 9
        },
        "minecraft:health": {
          "value": 100,
          "max": 100
        },
		"minecraft:interact": {
          "interactions": [
		    {
		      "on_interact": {
			    "filters": {
			        "all_of": [
				      { "test": "has_equipment", "domain": "hand", "subject": "other", "value": "diamond" },
                      { "test" :  "is_family", "subject" : "other", "value" :  "player"}
				    ]
			    },
			    "event": "girl_converted"
		      },
		      "use_item": true,
			  "play_sounds": "fizz",
			  "interact_text": "action.interact.procex"
			}
          ]
        }
      },
      "minecraft:shulker_red": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:shulker_silver": {
        "minecraft:variant": {
          "value": 7
        }
      },
      "minecraft:shulker_undyed": {
        "minecraft:variant": {
          "value": 16
        }
      },
      "minecraft:shulker_white": {
        "minecraft:variant": {
          "value": 15
        }
      },
      "minecraft:shulker_yellow": {
        "minecraft:variant": {
          "value": 11
        }
      }
    },

    "components": {
      "minecraft:type_family": {
        "family": [ "furnicraft" ]
      },
      "minecraft:health": {
        "value": 1,
        "max": 1
      },
      "minecraft:spawn_entity": [
        {
          "min_wait_time": 0,
          "max_wait_time": 0,
          "spawn_entity": "furnicraft:rotar",
          "spawn_event": "minecraft:entity_spawned",
          "single_use": true,
          "num_to_spawn": 1,
          "should_leash": false
        }
      ],
      "minecraft:navigation.walk": {
      },
      "minecraft:movement.basic": {
      },
      "minecraft:movement": {
        "value": 0,
        "max": 0
      },
      "minecraft:item_controllable": {
        "control_items": "furnicraft:rotate"
      },
      "minecraft:behavior.controlled_by_player": {
        "priority": 0
      },
      "minecraft:knockback_resistance": {
        "value": 100,
        "max": 100
      },
      "minecraft:push_through": {
      "value": 1
      },
      "minecraft:fall_damage": {
      "value": 0.0
      },
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/cuna.json"
      },
      "minecraft:collision_box": {
        "pivot": [0, -0.5, 0],
        "width": 0.5,
        "height": 0.5
      },
      "minecraft:physics": {
      }
    },
    "events": {
      "boy_converted": {
        "remove": {
        },
        "add": {
          "component_groups": [
            "to_villager"
          ]
        }
      },
      "girl_converted": {
        "remove": {
        },
        "add": {
          "component_groups": [
            "tos_villager"
          ]
        }
      },	  
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 6,
            "add": {
              "component_groups": [
                "minecraft:shulker_black"
              ]
            }
          }
        ]
      },
      "minecraft:turn_black": {
        "add": {
          "component_groups": [
            "minecraft:shulker_black"
          ]
        }
      },
      "minecraft:cuna_boy": {
        "add": {
          "component_groups": [
            "minecraft:shulker_blue"
          ]
        }
      },
      "minecraft:cuna_girl": {
        "add": {
          "component_groups": [
            "minecraft:shulker_pink"
          ]
        }
      }
    }
  }
}