Сделал два варианта пистолета в Майнкрафт
1 вариант команда: /execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] anchored eyes if block ~~0.50~ air run execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] if entity @e[rx=0,rxm=-90] run damage @e[rx=0,rxm=-90] 5 entity_attack entity @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] 2 вариант команда: /execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] anchored eyes if block ~~0.50~ air run execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] if entity @e[rz=0,rzm=-90] run damage @e[rz=0,rzm=-90] 5 entity_attack entity @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}]
1 вариант команда: /execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] anchored eyes if block ~~0.50~ air run execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] if entity @e[rx=0,rxm=-90] run damage @e[rx=0,rxm=-90] 5 entity_attack entity @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] 2 вариант команда: /execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] anchored eyes if block ~~0.50~ air run execute at @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}] if entity @e[rz=0,rzm=-90] run damage @e[rz=0,rzm=-90] 5 entity_attack entity @a[hasitem={item=golden_pickaxe, location=slot.weapon.mainhand}]
