Adding Foods - wyldmods/KitchenCraft GitHub Wiki

After first launch, your foodAdditions.json file will look something like this:

{"foods":
	[
		
    ]
}

Your entries will go in-between the brackets. All values for foods have a default value, so it is perfectly legitimate to define a food as such:

{"foods":
	[
	    {}
    ]
}

This will give you a food ingame called "null". That's not very interesting though, so let's move on to the values you can define:

Value Type Description Default
name String The name of the food. The name is used in many places. The actual food item will be called "item.kc.[name].name" ingame (we will get into localizing this later). "null"
food Integer The food value of the food. Each point represents 1/2 a hunger stick, so a value of 4, for example, would restore 2 entire hunger sticks. 4
saturation Decimal The saturation value of the food. This is a lesser known property that all foods have, and is basically the amount of time after eating this food that you will begin to lose hunger again. Higher values here mean you are more "full" from eating this food. 0.2
isMeat Boolean Whether the food is a meat. If a food is defined to be meat, it will not have a seed or a plant generated for it, and it will be able to be fed to wolves. false
isFruit Boolean If a food is a fruit, it will grow as a tree instead of a crop. This cannot be used on meats. false
color Integer The color of the seed for this food. If a seed is generated for this food, it will have the color defined here. The color is an int-converted hex value of 0xRRGGBB. For help on defining colors, see here. 0xFFFFFF (white)
makeSeed Boolean If this food is not a meat, you can define this value to false and a seed will not be generated. Useful for things like fruit that you may want to drop from leaves, but not be grown in the ground. true
isEdible Boolean Whether this food can be eaten. Useful for ingredient items (e.g. salt) that aren't edible, but you still want to be used in recipes. true
seedRecipe Boolean Whether to generate a 1-to-1 food to seed recipe for this food. true
isDrink Boolean If this food is a drink. If this value is true, it will perform the drinking animation instead of eating. false
isAlwaysEdible Boolean If this food is always edible. This means that it can be eaten even when the player is "full." false
oreDictNames String Array An array of the ore dictionary names to assign to this food. "food[Name]"
flavorText String An optional string to be shown on the tooltip of the food. Can be formatted with the usual minecraft format codes. null
container String An optional string to be the container item of the food, e.g. a bowl. Will be deposited into the player's inventory when the food is eaten. null
hasCropTexture Boolean If this option is enabled, the crop block will use custom textures that you define. These textures will be of the format foodName_cropStage0, where 0 is the stage of the crop (0-7) false
dimWhitelist Boolean If this option is enabled, the dims field will act as a whitelist instead of a blacklist. false
dims Integer Array An array of dimension IDs that the crop cannot grow in. Use the above dimWhitelist field to make this a whitelist instead. []

That's all the values for a basic food, but there are some more advanced values for more customized foods. For details on that, see here.