API.txt 519 B

12345678910
  1. -- Register food with given values to change eating actions
  2. hunger.register_food(name, saturation, replace_with_item, poisen, heal, sound)
  3. -- name: item name, e.g. "default:apple"
  4. -- saturation: amount of added saturation
  5. -- replace_with_item: item name that get returned after eating (can be nil)
  6. -- poisen: duration in seconds (1hp damage per second, player can't die) (can be nil)
  7. -- heal: added HP when eating this food (can be nil)
  8. -- sound: costum eating sound (replaces default eating sound) (can be nil)