function getEntitiesWithinCone(loc: object, angle: number=10, radius: number=10, height: number=1.5) :: entities: {_angle} != 0 {_angle} < 90 {_radius} > 0 set {_yaw+} and {_yaw-} to yaw of {_loc} add {_angle} to {_yaw+} remove {_angle} from {_yaw-} if {_yaw+} > 360: remove 360 from {_yaw+} if {_yaw+} < 0: add 360 to {_yaw+} if {_yaw-} > 360: remove 360 from {_yaw-} if {_yaw-} < 0: add 360 to {_yaw-} set {_} to 360 if {_yaw+} < {_yaw-} else 0 loop all entities in radius {_radius} around {_loc}: set {_yaw} to (yaw of (vector from {_loc} to loop-entity)) if {_yaw} < {_yaw+}: add {_} to {_yaw} if {_yaw} is between {_yaw-} and ({_yaw+} + {_}): distance between (location of {_loc}) and loop-entity <= {_radius} (y-loc of loop-entity) is between ((y-loc of {_loc}) + {_height}) and ((y-loc of {_loc}) - {_height}) add loop-entity to {_return::*} return {_return::*} #przykładowe użycie command /chicken: trigger: loop all blocks in radius 15 around player: y-loc of loop-block is y-loc of block at player spawn chicken at loop-block apply slowness 100 without particles to last spawned chicken for 100 hours on rightclick: kill getEntitiesWithinCone(player, 35, 10) where [input != player]