Of course, they’re also allowed to shoot you. If you so much as say ‘pow.’ Or ‘woof.’
Yep, if you shoot someone entering your home unlawfully and they happen to be a cop, your house and body will be so riddled with bullets that neither will be recognizable.