-
Notifications
You must be signed in to change notification settings - Fork 29
User API 2.5.x
This section displays the current Schemas for the User API (2.5.x) series. If you found an error or would like to make suggestions on how to improve the document, please open an issue.
From here on, basic understanding of how to write JSON files is needed, if you have no idea what JSON is, you probably shouldn't be reading this yet.
From this point on $MINECRAFT
will refer to your minecraft installation directory (normally ~/.minecraft
for *nix users, and %APPDATA%\.minecraft
for Windows).
$CONFIG
will refer to $MINECRAFT/config
, and $GRC_CONFIG
will refer to $CONFIG/growthcraft
All paths will be referred to using use UNIX, /
instead of Windows \
.
If Growthcraft does strange things, or you feel something is missing, try removing the json config files and allow Growthcraft to rebuild them, then re-apply your edits and test again.
Growthcraft WILL skip any invalid items, blocks, entries to the best of its ability.
If you think something is broken, or missing, try setting the "debug" option in $GRC_CONFIG/*.conf
and watching the console output, where * is the module you wish to debug.
Growthcraft will load some config files during INIT and some during POST-INIT*, this is done to ensure all items, blocks and compatibility layers have been initialized and registered.
Throughout this document, you will encounter certain common schemas types:
BlockKeySchema {
"comment": String,
"mod_id": String,
"name": String,
"meta": Integer
}
ItemStackSchema {
"comment": String,
"mod_id": String,
"name": String,
"meta": Integer,
"amount": Integer
}
OreItemSchema {
"comment": String,
"name": String,
"amount": Integer
}
// Allows you to specify either or both an item and ore dictionary name
ItemKeySchema extends ItemStackSchema {
"ore": String
}
FluidStackSchema {
"comment": String,
"name": String,
"amount": Integer
}
ResidueSchema extends ItemKeySchema {
"pomace": Float
}
You may notice the inclusion of a comment field, this is completely optional and does nothing.
Previously mentioned, ItemKeySchemas are a combined version of the OreItemSchema and ItemStackSchema This allows you to specify an item OR an ore dictionary name to use in place of the item, you may specify both, but its recommended only to use one or the other.
To specify an Item, use the ItemStackSchema form:
{
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"meta": 0,
"amount": 1
}
To specify an OreDictionary item, use this:
{
"ore": "yeast",
"amount": 1
}
NOTE Notice the use of "ore" instead of "name", name is specific to the ItemStackSchema, the only thing shared is the amount.
If you want, you can specify both, all items found will be registered for the recipe, IF supported (all recipes have been updated to support this so far)
{
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"meta": 0,
"ore": "yeast",
"amount": 1
}
Valid Bee Box Bees may be added via the $GRC_CONFIG/bees/bees.json
The JSON structure is UserBeesEntries
UserBeeEntry {
"comment": String,
"item": ItemKeySchema
}
UserBeesEntries {
"comment": String,
"data": Array<UserBeeEntry>
}
{
"comment": "",
"data": [
{
"comment": "Growthcraft's default bee",
"item": {
"comment": "Bee",
"mod_id": "Growthcraft|Bees",
"name": "grc.bee",
"amount": 1,
"meta": 0
}
}
]
}
Valid Bee Box flowers may be added via the $GRC_CONFIG/bees/flowers.json
The JSON structure is UserFlowersEntries
UserFlowerEntry {
"comment": String,
"entry_type": String,
"block": BlockKeySchema
}
UserFlowersEntries {
"comment": String,
"data": Array<UserFlowerEntry>
}
Note Flower entries have a entry_type
field, this is used to control the type of Flower block registered,
whether it be "generic"
(uses canPlaceBlockAt to determine if the flower can be placed), OR "forced"
, in which the block goes through common block placement checks, but never relies on the canPlaceBlockAt
behaviour, use this entry_type for flowers from BiomesOPlenty or other mods where the flowers cannot be placed under normal circumstances. Please use "forced"
with caution, as it can cause odd behavior with some flowers.
{
"comment": "",
"data": [
{
"comment": "",
"entry_type": "generic",
"block": {
"comment": "tile.flower2.name",
"mod_id": "minecraft",
"name": "red_flower",
"meta": 32767
}
},
{
"comment": "",
"entry_type": "generic",
"block": {
"comment": "tile.flower1.name",
"mod_id": "minecraft",
"name": "yellow_flower",
"meta": 32767
}
}
]
}
Brewing Recipes may be added via the $GRC_CONFIG/cellar/brewing.json
The JSON structure is UserBrewingRecipes
UserBrewingRecipe {
"comment": String,
"item": ItemKeySchema,
"input_fluid": FluidStackSchema,
"output_fluid": FluidStackSchema,
"residue": ResidueSchema,
"time": Integer
}
UserBrewingRecipes {
"comment": String,
"data": Array<UserBrewingRecipe>
}
{
"comment": "",
"data": [
{
"comment": "",
"item": {
"comment": "Brewers Yeast",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"amount": 1,
"meta": 0
},
"input_fluid": {
"comment": "Mead",
"name": "grc.honeymead0",
"amount": 1
},
"output_fluid": {
"comment": "Mead",
"name": "grc.honeymead1",
"amount": 1
},
"time": 24000
}
]
}
Culturing Recipes may be added via the $GRC_CONFIG/cellar/culturing.json
The JSON structure is UserCultureRecipes
UserCultureRecipe {
"comment": String,
"input_fluid": FluidStackSchema,
"output_item": ItemKeySchema,
"required_heat": Float,
"time": Integer
}
UserCultureRecipes {
"comment": String,
"data": Array<UserCultureRecipe>
}
{
"comment": "",
"data": [
{
"comment": "",
"output_item": {
"comment": "Starter Culture",
"mod_id": "Growthcraft|Milk",
"name": "grcmilk.StarterCulture",
"amount": 1,
"meta": 0
},
"input_fluid": {
"comment": "Skim Milk",
"name": "grcmilk.skimmilk",
"amount": 250
},
"required_heat": 0.7,
"time": 200
}
]
}
Fermenting Recipes may be added via the $GRC_CONFIG/cellar/fermenting.json
The JSON structure is UserFermentingRecipes
Note Fermenting recipes will IGNORE any fluid amount
specified. unless you specified zero, in which case the behaviour is undefined, to be safe just set it as 1 and leave it be.
UserFermentingRecipe {
"comment": String,
"item": ItemKeySchema,
"input_fluid": FluidStackSchema,
"output_fluid": FluidStackSchema,
"time": Integer
}
UserFermentingRecipes {
"comment": String,
"data": Array<UserFermentingRecipe>
}
{
"comment": "",
"data": [
{
"item": {
"comment": "Brewers Yeast",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"meta": 0,
"amount": 1
},
"input_fluid": {
"name": "grc.sake0",
"amount": 1
},
"output_fluid": {
"name": "grc.sake1",
"amount": 1
},
"time": 12000
}
]
}
Heat sources may be added via the $GRC_CONFIG/cellar/heatsources.json
The JSON structure is UserHeatSourceEntries
UserHeatSourceEntry {
"comment": String,
"mod_id": String,
"block_name": String,
"states": Map<Integer, Float> {
"metadata": Float
}
}
UserHeatSourceEntries {
"comment": String,
"data": Array<UserHeatSourceEntry>
}
metadata
is replaced with the Block's metadata, OR "-1", OR "32767", where the latter 2 are wildcards, any value less than 0 will be treated as a wildcard.
Due to the JSON format, all keys must be Strings
, and so metadata is written as a String
rather than its Integer
format.
# YES
"-1": 1.0f
# NO
-1: 1.0f
As of this writing (2016/01/30) the default entries are:
{
"comment": "",
"data": [
{
"comment": "Fire!",
"mod_id": "minecraft",
"block_name": "fire",
"states": {
"32767": 1.0
}
},
{
"comment": "We need to register both states of lava, this when its flowing",
"mod_id": "minecraft",
"block_name": "flowing_lava",
"states": {
"32767": 0.7
}
},
{
"comment": "And when its a still pool.",
"mod_id": "minecraft",
"block_name": "lava",
"states": {
"32767": 0.7
}
},
{
"comment": "This is Nitor.",
"mod_id": "Thaumcraft",
"block_name": "blockAiry",
"states": {
"1": 1.0
}
}
]
}
Pressing Recipes may be added via the $GRC_CONFIG/cellar/pressing.json
The JSON structure is UserPressingRecipes
UserPressingRecipe {
"comment": String,
"item": ItemKeySchema,
"fluid": FluidStackSchema,
"time": Integer,
"residue": ResidueSchema
}
UserPressingRecipes {
"comment": String,
"data": Array<UserPressingRecipe>
}
-
comment
any comment you like. -
item
the item you wish to press. -
fluid
the fluid created by pressing theitem
. -
time
how long does the pressing take? (in ticks) -
residue
residue produced by pressing theitem
.
{
"comment": "",
"data": [
{
"item": {
"mod_id": "minecraft",
"name": "apple",
"amount": 1,
"meta": 0
},
"fluid": { "name": "grc.appleCider0", "amount": 40 },
"time": 40,
"residue": {
"mod_id": "minecraft",
"name": "dye",
"amount": 1,
"meta": 15,
"pomace": 0.3
},
}
]
}
Yeast items can be registered to biomes via the $GRC_CONFIG/cellar/yeast.json
The JSON structure is UserYeastEntries
UserYeastEntry {
"comment": String,
"item": ItemKeySchema,
"weight": Integer,
"biome_types": Array<String>,
"biome_names": Array<String>
}
UserYeastEntries {
"comment": String,
"data": Array<UserYeastEntry>
}
-
comment
anything you like, describe the item, or give it's localized name for easy identification. -
item
is the ItemStack you wish to spawn in the yeast generator (usually a Culture Jar). -
weight
when multiple yeast types are present in the given biome scopes, how likely is this yeast to spawn? higher values mean more frequent. -
biome_types
a list of BiomeDictionary.Type. -
biome_names
the unlocalized names of biomes you wish to spawn.
As of (2016/03/25), these are the default entries:
{
"comment": "Default Yeast Config v1.1.0",
"data": [
{
"comment": "Brewers yeast is the default yeast, which appears in all other biomes that are filled by the Lager or Ethereal",
"item": {
"comment": "Brewers Yeast",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"amount": 1,
"meta": 0
},
"weight": 1,
"biome_types": [
"HOT",
"SPARSE",
"DENSE",
"WET",
"DRY",
"SAVANNA",
"CONIFEROUS",
"JUNGLE",
"SPOOKY",
"DEAD",
"LUSH",
"NETHER",
"END",
"OCEAN",
"RIVER",
"WATER",
"MESA",
"FOREST",
"PLAINS",
"MOUNTAIN",
"HILLS",
"SWAMP",
"SANDY",
"SNOWY",
"WASTELAND",
"BEACH",
"DESERT",
"FROZEN"
],
"biome_names": []
},
{
"comment": "Ethereal yeast is found in MAGICAL biomes, because its special",
"item": {
"comment": "Origin Yeast",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"amount": 1,
"meta": 3
},
"weight": 10,
"biome_types": [
"MAGICAL"
],
"biome_names": []
},
{
"comment": "Lager yeast is found in COLD biomes, think snow places!",
"item": {
"comment": "Lager Yeast",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"amount": 1,
"meta": 1
},
"weight": 10,
"biome_types": [
"COLD"
],
"biome_names": []
},
{
"comment": "Origin yeast is found in MUSHROOM biomes.",
"item": {
"comment": "",
"mod_id": "Growthcraft|Cellar",
"name": "grc.yeast",
"amount": 1,
"meta": 4
},
"weight": 10,
"biome_types": [
"MUSHROOM"
],
"biome_names": []
}
]
}
Growthcraft uses a built-in Fluid Dictionary for catergorizing and tagging fluids, user's may also tag external fluids for use in Growthcraft.
Vine entries can be registered via the $GRC_CONFIG/core/fluid_dictionary.json
The JSON structure is UserFluidDictionaryEntries
UserFluidDictionaryEntry {
"comment": String,
"fluid_name": String,
"tags": Array<String>,
}
UserFluidDictionaryEntries {
"comment": String,
"data": Array<UserFluidDictionaryEntry>
}
{
"comment": "Example",
"data": [
{
"comment": "Some external Milk",
"fluid_name": "other_milk",
"tags": ["milk"]
},
{
"comment": "Some external Cider",
"fluid_name": "other_cider",
"tags": ["cider"]
}
]
}
Blocks that are treated as vines in Growthcraft can be defined here, any block defined here will be subject to the vine drop routines (dropping Grape or Hops, etc..)
Vine entries can be registered via the $GRC_CONFIG/core/vines.json
The JSON structure is UserVineEntries
UserVineEntry {
"comment": String,
"block": BlockKeySchema
}
UserVineEntries {
"comment": String,
"data": Array<UserVineEntry>
}
{
"comment": "",
"data": [
{
"comment": "Vines",
"block": {
"comment": "Vines",
"mod_id": "minecraft",
"name": "vine",
"meta": 32767
}
},
{
"comment": "",
"block": {
"comment": "",
"mod_id": "BiomesOPlenty",
"name": "willow",
"meta": 32767
}
},
{
"comment": "",
"block": {
"comment": "",
"mod_id": "BiomesOPlenty",
"name": "ivy",
"meta": 32767
}
}
]
}
Fish Trap entries can be registered via the $GRC_CONFIG/fishtrap/entries.json
The JSON structure is UserFishTrapEntries
UserFishTrapEntry {
"comment": String,
"item": ItemKeySchema,
"weight": Integer,
"damage_variance": Float,
"group": Enum<String>["treasure", "junk", "fish"]
}
UserFishTrapEntries {
"comment": String,
"data": Array<UserFishTrapEntry>
}
{
"comment": "",
"data": [
{
"comment": "",
"group": "junk",
"weight": 10,
"item": {
"comment": "Leather Boots",
"mod_id": "minecraft",
"name": "leather_boots",
"amount": 1,
"meta": 0
},
"damage_variance": 0.9,
"enchanted": false
},
{
"comment": "",
"group": "treasure",
"weight": 1,
"item": {
"comment": "Lily Pad",
"mod_id": "minecraft",
"name": "waterlily",
"amount": 1,
"meta": 0
},
"damage_variance": 0.0,
"enchanted": false
},
{
"comment": "",
"group": "fish",
"weight": 60,
"item": {
"comment": "Raw Fish",
"mod_id": "minecraft",
"name": "fish",
"amount": 1,
"meta": 0
},
"damage_variance": 0.0,
"enchanted": false
},
]
}
Fish Trap entries can be registered via the $GRC_CONFIG/milk/churn_recipes.json
The JSON structure is UserChurnRecipes
UserChurnRecipe {
"comment": String,
"input_fluid": FluidStackSchema,
"output_fluid": FluidStackSchema,
"output_item": ItemKeySchema,
"churns": Integer
}
UserChurnRecipes {
"comment": String,
"data": Array<UserChurnRecipe>
}
{
"comment": "",
"data": [
{
"comment": "",
"input_fluid": {
"comment": "Cream",
"name": "grcmilk.cream",
"amount": 1000
},
"output_fluid": {
"comment": "Butter Milk",
"name": "grcmilk.buttermilk",
"amount": 500
},
"output_item": {
"comment": "Butter (Unsalted)",
"mod_id": "Growthcraft|Milk",
"name": "grcmilk.Butter",
"amount": 2,
"meta": 0
},
"churns": 16
}
]
}
[General Information](General Information)
In-Game Documentation
Growthcraft Apples
Growthcraft Bamboo
Growthcraft Bees
Growthcraft Cellar
Growthcraft Cellar - Yeast
Growthcraft Fishtrap
Growthcraft Grapes
Growthcraft Hops
Growthcraft Milk
Growthcraft Rice
API Documentation
Dev Documentation
Module Contribution Guide
How-To Build Growthcraft
Modpack Documentation