{
  "format_version": "1.8.0",
  "minecraft:entity": {
	"description": {
      "identifier": "raigen:orange_bed_lamp",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
	  "scripts": { "animate": [ "light_function", "remove_light" ] },
	  "animations": { 
	    "light_function": "controller.animation.bed_lamp_light_function",
	    "remove_light": "controller.animation.remove_light"
	  }
    },
	
	"component_groups": {
	  "minecraft:despawn": {
	    "minecraft:scale": {
		  "value": 0.000000000000001
		},
		"minecraft:skin_id": { "value": 100 }
	  },
	  
	  "minecraft:turned_off": {
	    "minecraft:skin_id": { "value": 0 }
	  },
	  "minecraft:turned_on": {
	    "minecraft:skin_id": { "value": 1 }
	  }
	},
	
    "components": {
	  "minecraft:interact": [
	    {
		  "on_interact": {
		    "filters": {
			  "all_of": [
			    { "test": "is_family", "subject": "other", "value": "player" },
			    { "test": "is_skin_id", "subject": "self", "value": 0 }
			  ]
			},
			"event": "minecraft:event_turn_on"
		  },
		  "swing": true,
		  "interact_text": "action.interact.turn_on",
		  "play_sounds": "power.on"
		},
	    {
		  "on_interact": {
		    "filters": {
			  "all_of": [
			    { "test": "is_family", "subject": "other", "value": "player" },
			    { "test": "is_skin_id", "subject": "self", "value": 1 }
			  ]
			},
			"event": "minecraft:event_turn_off"
		  },
		  "swing": true,
		  "interact_text": "action.interact.turn_off",
		  "play_sounds": "power.on"
		}
	  ],
	  "minecraft:damage_sensor": [
	    {
		  "on_damage": {
		    "filters": {
			  "all_of": [
			    { "test": "has_damage", "subject": "self", "value": "all" }
			  ]
			},
			"event": "minecraft:event_despawn"
		  }
		}
	  ],
	  "minecraft:environment_sensor": [
	    {
		  "on_environment": {
		    "filters": {
			  "all_of": [
			    { "test": "in_water_or_rain", "subject": "self", "value": true }
			  ]
			},
			"event": "minecraft:event_despawn"
		  }
		}
	  ],
	  "minecraft:loot": {
	    "table": "loot_tables/just_lights/bed_lamp/orange.json"
	  },
      "minecraft:type_family": {
        "family": [ "inanimate" ]
      },
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 0.6
      },
	  "minecraft:push_through": {
	    "value": 1
	  },
      "minecraft:knockback_resistance": {
        "value": 1.0
      },
	  "minecraft:health": {
	    "value": 1,
		"max": 1
	  },
      "minecraft:fall_damage": {
        "value": 0.0
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
	  "minecraft:physics": {
	    "has_gravity": false,
		"has_collision": false
	  },
	  "minecraft:pushable": {
	    "is_pushable": false,
	    "is_pushable_by_piston": false
	  }
    },
	
	"events": {
	  "minecraft:entity_spawned": {
	    "add": { "component_groups": [ "minecraft:turned_off" ] }
	  },
	  
	  "minecraft:event_turn_on": {
	    "add": { "component_groups": [ "minecraft:turned_on" ] },
	    "remove": { "component_groups": [ "minecraft:turned_off" ] }
	  },
	  "minecraft:event_turn_off": {
	    "add": { "component_groups": [ "minecraft:turned_off" ] },
	    "remove": { "component_groups": [ "minecraft:turned_on" ] }
	  },
	  "minecraft:event_despawn": {
	    "add": { "component_groups": [ "minecraft:despawn" ] }
	  }
	}
  }
}