# Configuration file

####################
#  main 
#===================
# These config settings are server-side only
# Their values will get synced to all clients on the server
####################

" main " {
    # If false, disables the entire diminishing returns part of the mod
    # Set this to false if you only want the client-side tooltip/HUD additions
    B:food.modifier.enabled=true
}


####################
# client
#===================
# These config settings are client-side only
####################

client {
    # If true, shows the hunger (and saturation if show.saturation.hud.overlay is true) that would be restored by food you are currently holding
    B:show.food.values.hud.overlay=true

    # If true, shows the hunger and saturation values of food in its tooltip while holding SHIFT
    B:show.food.values.in.tooltip=true

    # If true, shows your current saturation level overlayed on the hunger bar
    B:show.saturation.hud.overlay=true
}


####################
# foodgroups
#===================
# These config settings are server-side only
# Their values will get synced to all clients on the server
# NOTE: Food groups are a work-in-progress; not all features have been implemented and/or tested
####################

foodgroups {
    B:example.enabled=false

    # A list of item IDs in id:meta format
    # This example adds red apples (id 260 with any metadata) and golden apples (id 322 with metadata 0), thereby excluding enchanted golden apples (id 322 with metadata 1)
    S:example.items <
        260
        322:0
     >
    S:example.name=Example

    # A list of ore dictionary entries
    # This example adds two oredictionary entries created by Pam's HarvestCraft, including all fruit and all berries
    S:example.oredicts <
        listAllfruit
        listAllberry
     >

    # Food can only belong to one food group
    # in the case of conflicting food groups, the food group with the highest priority will be selected
    # Example: A food group with priority 3 will take precedence over a food group with priority 1
    I:example.priority=0
}


####################
# server
#===================
# These config settings are server-side only
# Their values will get synced to all clients on the server
####################

server {
    # If true, foods' saturation modifier will also be multiplied by the nutritional value
    # NOTE: Saturation bonuses of foods will automatically decrease as the hunger value of the food decreases
    # Setting this to true will make saturation bonuses decrease disproportionately more than hunger values
    B:affect.food.saturation.modifiers=false

    # If true, foods with negative saturation modifiers will be made more negative as nutritional value decreases
    # NOTE: affect.food.saturation.modifiers must be true for this to have any affect
    B:affect.negative.food.saturation.modifiers=false

    # If true, a player's food history will be empty once they pass the new.player.food.eaten.threshold
    # If false, any food eaten before the threshold is passed will also count after it is passed
    B:clear.history.after.food.eaten.threshold.reached=true

    # The maximum amount of eaten foods stored in the history at a time
    I:food.history.length=36

    # If true, food history will not get reset after every death
    B:food.history.persists.through.death=false

    # Rounding mode used on the hunger value of foods
    # Valid options: 'round', 'floor', 'ceiling'
    S:food.hunger.rounding.mode=ceiling

    # Uses the EvalEx expression parser
    # See: https://github.com/uklimaschewski/EvalEx for syntax/function documentation
    # 
    # Available variables:
    # 	count : The number of times the food (or its food group) has been eaten within the food history
    # 	max_history_length : The maximum length of the food history (see food.history.length)
    # 	cur_history_length : The current length of the food history (<= max_history_length)
    # 	food_hunger_value : The default amount of hunger the food would restore in hunger units (1 hunger unit = 1/2 hunger bar)
    # 	food_saturation_mod : The default saturation modifier of the food
    # 	cur_hunger : The current hunger value of the player in hunger units (20 = full)
    # 	cur_saturation : The current saturation value of the player
    # 	total_food_eaten : The all-time total number of times any food has been eaten by the player
    # 
    S:food.modifier.formula=MAX(0, 1 - MAX(0, (count-4)/5))

    # The number of times a new player (by World) needs to eat before this mod has any effect
    I:new.player.food.eaten.threshold=36

    # See 'foodgroups' settings category
    B:use.food.groups=false

    # If true, food.history.length will use amount of hunger restored instead of number of foods eaten for its maximum length
    # For example, a food.history.length length of 12 will store a max of 2 foods that restored 6 hunger each, 
    # 3 foods that restored 4 hunger each, 12 foods that restored 1 hunger each, etc
    # NOTE: food.history.length uses hunger units, where 1 hunger unit = 1/2 hunger bar
    B:use.hunger.restored.for.food.history.length=true
}


