{
	"format_version": "1.21.0",
	"minecraft:entity": {
	  "description": {
		"identifier": "sgs_farm:tractor",
		"is_spawnable": true,
		"is_summonable": true,
		"is_experimental": false,
		 "animations": {
			"sound_engine": "animation.sgs_farm.sound.tractor_engine",
			"sound_startup": "animation.sgs_farm.sound.tractor_startup",
			"refresh_tool": "animation.sgs_farm.tractor.refresh_tool",
			
			"control_ride": "controller.animation.sgs_farm.ride",
			"control_sound": "controller.animation.sgs_farm.sound"
		 },
		 "scripts": {
			"animate": [
				"control_ride",
				"control_sound",
				
				"refresh_tool"
			]
		 },
         "properties":{
            "sgs_farm:tool_active":{
               "type":"bool",
               "client_sync":true,
               "default":false
            },
			"sgs_farm:harvest":{
               "type":"bool",
               "client_sync":true,
               "default":false
            },
			"sgs_farm:seed":{
               "type":"bool",
               "client_sync":true,
               "default":false
            },
			"sgs_farm:plough":{
               "type":"bool",
               "client_sync":true,
               "default":false
            }
         }
	  },
	  "component_groups": {
		"sgs_farm:despawn": {
		  "minecraft:instant_despawn": {
			"remove_child_entities": false
		  }
		}
	  },
  
	  "components": {
		"minecraft:scale": {
          "value": 1.0
        },
		"minecraft:health": {
		  "value": 20,
		  "max": 20
		},
		"minecraft:collision_box": {
		  "width": 1.8,
		  "height": 1.8
		},
		"minecraft:loot": {
			"table": "loot_tables/sgs/farm/tractor.json"
		},
		"minecraft:rideable": {
			"seat_count": 1,
			"crouching_skip_interact": true,
			"rider_can_interact": true,
			"family_types": ["player"],
			"pull_in_entities": false,
			"interact_text": "Ride",
			"seats": [
				{
				  "position": [0, 1.05, -1.15],
				  "min_rider_count": 0,
				  "max_rider_count": 1
				}
			]
		},
		"minecraft:movement": {
			"value": 0.20
		},
		"minecraft:is_tamed": {
        },
		"minecraft:is_chested": {
        },
		"minecraft:inventory": {
			"container_type": "horse",
			"can_be_siphoned_from": true,
			"inventory_size": 16
		},
		"minecraft:equippable": {
          "slots": [
            {
              "slot": 1,
              "item": "attachment",
              "accepted_items": [ "sgs_farm:mach_seed", "sgs_farm:mach_harvest", "sgs_farm:mach_plough" ]
            }
          ]
        },
		"minecraft:nameable": {},
		"minecraft:variable_max_auto_step": {
			"base_value": 1.5625,
			"controlled_value": 1.5625,
			"jump_prevented_value": 0.5625
		},
		"minecraft:can_power_jump": {},
		"minecraft:horse.jump_strength": {
			"value": {
				"range_min": 0.01,
				"range_max": 0.01
			}
		},
        "minecraft:damage_sensor": {
			"triggers": {
			  "cause": "fall",
			  "deals_damage": false
			}
        },
		"minecraft:input_ground_controlled": {},
		"minecraft:behavior.player_ride_tamed": {},
		"minecraft:movement.basic": {},
		"minecraft:navigation.walk": {},
		"minecraft:physics": {},
		"minecraft:knockback_resistance":{
		  "value":1
		},
		"minecraft:pushable":{
		  "is_pushable":false,
		  "is_pushable_by_piston":false
		},
		"minecraft:type_family": {
		  "family": ["sgs_farm_tractor","prop","inanimate"]
		},
		"minecraft:breathable": {
			"total_supply": 15,
			"suffocate_time": -20,
			"inhale_time": 0,
			"breathes_air": true,
			"breathes_water": false,
			"breathes_lava": false,
			"breathes_solids": false,
			"generates_bubbles": true,
			"breathe_blocks": [],
			"non_breathe_blocks": []
		},
		"minecraft:fire_immune": {}
	  },
  
	  "events": {
		"minecraft:entity_spawned": {
		  "add": {"component_groups": ["sgs_farm:interact"]}
		},
		"evt:despawn": {
		  "add": {
			"component_groups": [
			  "sgs_farm:despawn"
			]
		  }
		},
		"evt:variant_harvest":{
            "set_property":{
               "sgs_farm:harvest":true,
			   "sgs_farm:seed":false,
			   "sgs_farm:plough":false
            }
        },
		"evt:variant_seed":{
            "set_property":{
               "sgs_farm:harvest":false,
			   "sgs_farm:seed":true,
			   "sgs_farm:plough":false
            }
        },
		"evt:variant_plough":{
            "set_property":{
               "sgs_farm:harvest":false,
			   "sgs_farm:seed":false,
			   "sgs_farm:plough":true
            }
        },
		"evt:variant_none":{
            "set_property":{
               "sgs_farm:harvest":false,
			   "sgs_farm:seed":false,
			   "sgs_farm:plough":false
            }
        },
		"evt:repair":{
            "set_property":{
               "sgs_farm:repair":true
            }
        },
		"evt:reset_repair":{
            "set_property":{
               "sgs_farm:repair":false
            }
        },
		"evt:dismantle":{
            "set_property":{
               "sgs_farm:dismantle":true
            }
        }
	  }
	}
  }
  