Resource Source
Defines where resources are loaded from and saved to. Each source has the following common properties:
Properties
type string
The type of the source. There are currently two types directory and sql.
overwriteExisting boolean
Whether to overwrite existing resources with resources from this destination.
propagateSavedResources boolean
Whether resources saved to this destination should propagate to destinations of lower priority.
filter Filter optional
Filter to specify which resources to save to this destination.
Directory
A source that loads the resources from the defined directory.
Properties
path string
The path to the directory that contains the resources. This path may be a relative or absolute path.
- relative: A path within the
<cc_root>/resourcesdirectory - absolute: A full path starting with the system root e.g.
/
The specified directory will contain the resource type-specific directories such as recipes.
So the final path for recipes would be <source_path>/recipes/*/**/<recipe>.conf
Example
type = "directory"
overwriteExisting = true
// relative path in `<cc_root>/resources`
path = "path/to/resources"
// absolute path; Make sure CustomCrafting has read/write access!
path = "/home/user/path/to/resources"SQL Source
Defines a source that connects to an SQL database.
Properties
connection Connection
The connection type for the SQL database. Multiple different types are supported.
type = "sql"
connection {
type = <database type>
// type-specific settings
}SQL Connections Connection
All database connection types use similar properties. CustomCrafting abstracts the specific connection string by passing the properties into the type-specific url templates.
sqlite
Connection to an SQLite database using local database files.
type = sqlite
path = "/path/to/database.sqlite"h2
Connection to an H2 database using local database files.
type = "h2"
path = "/path/to/database_file"Other Databases
The following database connections are supported.mariadb, mysql, oracle, postgresql, mssqlserver
The mentioned databases all use the same properties:
Properties
host string
The host of the database with port
database string
The name of (or the path to) the database
user string
The username for the connection
password string
The password for that user
Example:
type = mariadb
host = "localhost:3306"
database = "test"
user = "user"
password = "user_pwd"