newfunc.lua 407 B

123456789101112131415161718
  1. --[[
  2. function throwing.entity_ignores_arrow(entity_name)
  3. -- Dropped itemstacks don't take damage.
  4. if entity_name == "__builtin:item" then
  5. return true
  6. end
  7. -- Ignore other arrows/fireballs in flight.
  8. local is_arrow = (string.find(entity_name, "arrow") or string.find(entity_name, "fireball"))
  9. if is_arrow then
  10. return true
  11. end
  12. -- Entity is unknown, so punch it for damage!
  13. return false
  14. end
  15. --]]