# 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
    B:food.modifier.enabled=false
}


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

client {
    # If true, left clicking the air while holding a food container will open it (so that it can be eaten from)
    B:left.click.opens.food.containers=false
}


##########################################################################################################
# foodgroups
#--------------------------------------------------------------------------------------------------------#
# Food groups are defined using .json files in /config/SpiceOfLife/
# See /config/SpiceOfLife/example-food-group.json
##########################################################################################################

foodgroups {
}


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

server {
    # If true, foods' hunger value will be multiplied by the current nutritional value
    # Setting this to false and affect.food.saturation.modifiers to true will make diminishing returns affect saturation only
    B:affect.food.hunger.values=true

    # If true, foods' saturation modifier will be multiplied by the current nutritional value
    # NOTE: When affect.food.hunger.values is true, saturation bonuses of foods will automatically decrease as the hunger value of the food decreases
    # Setting this to true when affect.food.hunger.values is true will make saturation bonuses decrease disproportionately more than hunger values
    # Setting this to true and affect.food.hunger.values to false will make diminishing returns affect saturation only
    B:affect.food.saturation.modifiers=false

    # If true, foods with negative hunger values will be made more negative as nutritional value decreases
    # NOTE: affect.food.hunger.values must be true for this to have any affect
    B:affect.negative.food.hunger.values=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=false

    # The chance for food to drop from an open food container when the player jumps
    # Temporarily disabled while a better implementation is written (this config option will do nothing)
    D:food.containers.chance.to.drop.food=0.25

    # The maximum stacksize per slot in a food container
    I:food.containers.max.stacksize=16

    # The maximum time it takes to eat a food after being modified by food.eating.speed.modifier
    # The default eating duration is 32. Set this to 0 to remove the limit on eating speed.
    # Note: If this is set to 0 and food.eating.speed.modifier is > 0, a food with 0% nutrtional value will take nearly infinite time to eat
    I:food.eating.duration.max=0

    # If set to greater than zero, food eating speed will be affected by nutritional value
    # (meaning the lower the nutrtional value, the longer it will take to eat it)
    # Eating duration is calcualted using the formula (eating_duration / (nutritional_value^eating_speed_modifier))
    D:food.eating.speed.modifier=1.0

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

    # 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=round

    # 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
    # 	hunger_count : The total amount of hunger that the food (or its food group) has restored within the food history (1 hunger unit = 1/2 hunger bar)
    # 	saturation_count : The total amount of saturation that the food (or its food group) has restored within the food history (1 saturation unit = 1/2 saturation bar)
    # 	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
    # 	food_group_count : The number of food groups that the food belongs to
    # 	distinct_food_groups_eaten : The number of distinct food groups in the player's current food history
    # 	total_food_groups : The total number of enabled food groups
    # 	exact_count : The number of times the food (ignoring food groups) has been eaten within the food history
    # 
    S:food.modifier.formula=MAX(0, (1 - count/12))^MIN(8, food_hunger_value)

    # If true, a food journal will be given to each player as a starting item
    B:give.food.journal.as.starting.item=false

    # If true, a food journal will be given to each player once diminishing returns start for them
    # Not given if a player was given a food journal by give.food.journal.as.starting.item
    B:give.food.journal.on.dimishing.returns.start=false

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

    # If true, any foods not in a food group will be excluded from diminishing returns
    B:use.food.groups.as.whitelists=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=false

    # If true, food.history.length will use time (in Minecraft days) instead of number of foods eaten for its maximum length
    # For example, a food.history.length length of 12 will store all foods eaten in the last 12 Minecraft days.
    # Note: On servers, time only advances for each player while they are logged in unless use.time.progress.time.while.logged.off is set to true
    # Also note: use.hunger.restored.for.food.history.length must be false for this config option to take effect
    B:use.time.for.food.history.length=false

    # If true, food history time will still progress for each player while that player is logged out.
    # NOTE: use.time.for.food.history.length must be true for this to have any affect
    B:use.time.progress.time.while.logged.off=false
}


