Datapacks - ACCBDD/complicated_bees GitHub Wiki
The vast majority of configuration for this mod can be done through datapacks. Certain things that get added will also need corresponding resource pack lang file entries - see the Resource Pack section for more information.
Recipes
There are a few blocks that have datapack support for recipes. In the datapack structure, these are located in
the recipes
folder, much like vanilla datapack recipes. They are defined as follows:
Centrifuge
{
"type": "complicated_bees:centrifuge",
"input": {
"item": "RESOURCE LOCATION",
"count": "POSITIVE INT - OPTIONAL, DEFAULT 1",
"nbt": {
"NBT DATA - OPTIONAL, DEFAULT EMPTY"
}
},
"outputs": [
"COMMA SEPARATED LIST OF Products - OPTIONAL, DEFAULT EMPTY"
]
}
- The
type
field is always"complicated_bees:centrifuge"
. - The
input
field is an item definition - this has support for specific nbt data/counts of the input item, but does NOT have support for tags.- Note: the
nbt
field matches weakly - only keys defined in the object will be checked.
- Note: the
- The
output
field defines Products the recipe will produce.
Mutator
{
"type": "complicated_bees:mutator",
"input": {
"VANILLA MINECRAFT INGREDIENT JSON"
},
"modifier": 4.0
}
- The
type
field is always"complicated_bees:mutator"
. - The
input
field follows vanilla minecraft ingredient schema - an ID, a tag with a#
, or an array containing IDs. - The
modifier
field is the multiplier added to the mutation chance of a bee.
Temperature Unit
{
"type": "complicated_bees:temp_unit",
"input": {
"VANILLA MINECRAFT INGREDIENT JSON"
},
"temp_change": "ONE OF THE FOLLOWING: up_5, up_4, up_3, up_2, up_1, down_5, down_4, down_3, down_2, down_1",
"use_chance": 0.1
}
- The
type
field is always"complicated_bees:temp_unit"
. - The
input
field follows vanilla minecraft ingredient schema - an ID, a tag with a#
, or an array containing IDs. - The
temp_change
field is the modifier added to the climate of the mellarium. - The
use_chance
field is the percentage chance that the recipe will consume the item every bee tick.
Hydroregulator
{
"type": "complicated_bees:hydroregulator",
"input": {
"VANILLA MINECRAFT INGREDIENT JSON"
},
"output": {},
"humidity_change": "ONE OF THE FOLLOWING: up_5, up_4, up_3, up_2, up_1, down_5, down_4, down_3, down_2, down_1",
"use_chance": 0.1
}
- The
type
field is always"complicated_bees:temp_unit"
. - The
input
field follows vanilla minecraft ingredient schema - an ID, a tag with a#
, or an array containing IDs. - The
output
field defines a Product that this recipe will produce - this will only produce the output when theuse_chance
is triggered. - The
humidity_change
field is the modifier added to the climate of the mellarium. - The
use_chance
field is the percentage chance that the recipe will consume the item every bee tick.
Honey Generator
{
"type": "complicated_bees:honey_generator",
"burn_time": 400,
"input": {
"BANILLA MINECRAFT INGREDIENT JSON"
}
- The
type
field is always"complicated_bees:honey_generator"
. - The
burn_time
field is how long the item will burn for in the honey generator. - The
input
field follows vanilla minecraft ingredient schema - an ID, a tag with a#
, or an array containing IDs.
Genetics
There are a variety of things you can change and/or add on the genetic side of things - new species of bees, mutations, and combs, for example.
Product
A Product is an internal data structure that is used in Comb and Species definitions. It is essentially a representation for an item stack that can take nbt data, item count, and chance. It is defined as follows:
{
"item": "RESOURCE LOCATION",
"tag": "RESOURCE LOCATION",
"count": "POSITIVE INT - OPTIONAL, DEFAULT 1",
"nbt": {
"NBT DATA - OPTIONAL, DEFAULT EMPTY"
},
"chance": "FLOAT BETWEEN 1 AND 0 - OPTIONAL, DEFAULT 1"
}
The fields here are self-explanatory. One of either item
or tag
must be defined; if a tag
is defined, the recipe
will select the first item in the tag, sorted alphabetically (including namespace).
Chromosome
A Chromosome is an internal data structure that is used in Species definitions. It is a representation for a list of genes and their data. It is generally defined as follows:
{
"GENE RESOURCE LOCATION": {
"data": "DATA - OPTIONAL, DEFAULT VARIES BY GENE",
"dominant": "BOOLEAN - OPTIONAL, DEFAULT TRUE"
},
"GENE RESOURCE LOCATION": {
"data": "DATA - OPTIONAL, DEFAULT VARIES BY GENE",
"dominant": "BOOLEAN - OPTIONAL, DEFAULT TRUE"
},
...
}
The fields here are self-explanatory. For more information on the available base mod genes, check out the Genes page.
Comb
Combs are special items that a centrifuge can generally turn into other items. In the datapack folder structure, they
belong in
the complicated_bees/comb
folder. They are defined as follows:
{
"outer_color": "HEX STRING",
"inner_color": "HEX STRING"
}
- The
outer_color
andinner_color
fields define the tinting of the comb item.
Species
A Species defines a species of bee available in the mod. Each species definition also has a translation key and three
flavor text keys - for more information on those, check the Resource Pack section of the wiki. In
the datapack folder structure, they belong in the complicated_bees/species
folder. These can also be generated
using this handy tool. They are defined as follows:
{
"dominant": "BOOLEAN - OPTIONAL, DEFAULT TRUE",
"foil": "BOOLEAN - OPTIONAL, DEFAULT FALSE",
"models": [
"RESOURCE KEY FOR DRONE MODEL OVERRIDE - OPTIONAL, DEFAULT 'complicated_bees:item/drone'",
"RESOURCE KEY FOR PRINCESS MODEL OVERRIDE - OPTIONAL, DEFAULT 'complicated_bees:item/princess'",
"RESOURCE KEY FOR QUEEN MODEL OVERRIDE - OPTIONAL, DEFAULT 'complicated_bees:item/queen'"
],
"color": "HEX STRING - OPTIONAL, DEFAULT -1",
"nest_color": "HEX STRING - OPTIONAL, DEFAULT -1",
"products": [
"COMMA SEPARATED LIST OF Products - OPTIONAL, DEFAULT EMPTY"
],
"specialty_products": [
"COMMA SEPARATED LIST OF Products - OPTIONAL, DEFAULT EMPTY"
],
"default_chromosome": {
"Chromosome DEFINITION - OPTIONAL, DEFAULT EMPTY"
}
}
- The
dominant
field defines whether this species is dominant. - The
foil
field defines whether bees with this species are shown with an enchantment glint. - The
models
field defines three model overrides for the drone, princess, and queen versions of the species - you must have three entries here, if the field is defined. Please note thatlayer1
in the model file will be tinted according to the Species'color
field. - The
color
field defines the outline color of bees where this species is genetically active. - The
hive_color
field defines the color of this species hive - if it is -1 (the default value), then hives will use thecolor
field instead. - The
products
field defines Products this species will normally produce. - The
specialty_products
field defines Products this species will produce when ecstatic (all bee requirements are exactly satisfied - i.e. temperature and humidity are exact, not tolerated) - The
default_chromosome
field defines a Chromosome that the species will use as its 'purebred' version dropping from hives as well as the chromosome that will generate on a bee when aMutation
creates this species.
Please note, if you would like to disable a built-in species, you must replace its entry in your datapack with a file
containing an empty json object {}
.
Flower
A Flower is a set of blocks that will count as satisfying a complicated_bees:flower
gene pointing to said Flower. In
the datapack folder structure, they belong in the complicated_bees/flower
folder. They are defined as follows:
{
"blocks": [
"COMMA SEPARATED LIST OF RESOURCE LOCATIONS - OPTIONAL, DEFAULT EMPTY"
],
"tags": [
"COMMA SEPARATED LIST OF BLOCK TAGS - OPTIONAL, DEFAULT EMPTY"
]
}
- The
blocks
field defines a list of blocks that will count as thisFlower
. - The
tags
field defines a list of block tags that will count as thisFlower
.
Mutation
A Mutation is a 'recipe' that takes two species and has a chance of producing a third species. Every time two
chromosomes combine, if the two chromosomes can result in a Mutation
, the mod will roll to see if a Mutation
occurs.
If it does, the game wholesale replaces the resulting chromosome with the
result Species' default_chromosome
. They are defined as follows:
{
"first": "Species RESOURCE LOCATION",
"second": "Species RESOURCE LOCATION",
"result": "Species RESOURCE LOCATION",
"chance": "FLOAT BETWEEN 1 AND 0",
"conditions": {
"OPTIONAL": "DEFAULT BLANK"
}
}
- The
first
,second
, andresult
fields are resource locations pointing to Species for their respective roles. - The
chance
field defines the chance that a collision of thefirst
andsecond
species will result in theresult
Species. - The
conditions
field defines special conditions that must be met for the mutation to occur; all conditions need to be satisfied for the mutation to be possible.
Worldgen
Complicated Bees adds two special things to worldgen - a bee_nest_decorator
tree decorator as well as
a complicated_bee_nest
feature type. Since bee nests are block entities, not block states, you can't use the
vanilla attached_to_leaves
or simple_block
feature to place them.
bee_nest_decorator
This tree decorator is used like any other tree
decorator - see the minecraft wiki on how to use this in datapacks. It works
similarly to the vanilla beehive
decorator - it looks for trunk blocks one y-level below the lowest leaf and checks a
probability before it attaches a single bee nest on a cardinal direction to one.
{
"type": "complicated_bees:bee_nest_decorator",
"probability": "FLOAT BETWEEN 1 AND 0",
"species": "Species RESOURCE LOCATION"
}
- The
type
field is the type of the decorator. It will always be"complicated_bees:bee_nest_decorator"
- The
probability
field is the chance that this decorator places a bee nest. - The
species
field is a resource location pointing to a Species that the nest will be associated with.
complicated_bee_nest
This feature type defines a single bee nest associated with a single species. It works similarly to the simple_block
feature in vanilla.
{
"type": "complicated_bees:complicated_bee_nest",
"config": {
"species": "Species RESOURCE LOCATION"
}
}
- The
type
field is the type of the feature. It will always be"complicated_bees:complicated_bee_nest"
- The
species
field is a resource location pointing to a Species that the nest will be associated with.
Loot
Complicated Bees adds a special loot function inherit_hive_species
meant specifically for bee nests. It takes
the "species"
NBT tag of a bee nest entity and sets the item's genome to one where both chromosomes are
the default_genome
of that Species. Generally, this should be applied to drone, princess, or queen items
dropped from a bee nest.
{
"function": "complicated_bees:inherit_hive_species"
}
- There are no fields for this function.