A unique feature to Resourceful Bees. traits group together:
Particle Effects
Damage and Potion Immunities
Damage Types and Potion Effects
Special Abilities
and Auras
Traits enable users to breathe life into infinite variations of bees that can be godly, pesky, helpful, or just downright evil.
Identifier
The root JSON of the trait customization component looks like this:
The identifier of the component is as such:
Customization Options
auraRange
The range within which players would be affected by the aura. This value is the number of blocks.
Name: Aura Range
Key:auraRange
Type: Integer
Range: 3 - 20
Example
traits
The list of traits given to the bee.
Name: Traits List
Key:traits
Type: String[]
Default:Optional/Empty
Example
Mutation Data
Mutations are the repurposing of a vanilla mechanic: pollination effect. When a bee pollinates a flower and is returning to a hive, any flower it flies over has a chance to be fertilized (have a growth tick applied to it). It can do this up to 10 times before it needs to visit a hive to reset the counter.
Mutations reuse the vanilla mechanic by allowing bees to transform one object into another. The bee would simply fly over a target item|block|fluid|entity and the target would be transformed into different item|block|fluid|entity.
The mutation customization component simply contains the recipe ID for the mutations which the bee can perform and the mutation limit.
Potion Effect
Customization Options
Default:10
Identifier
The root JSON of the mutation customization component looks like this:
The identifier of the component is as such:
Customization Options
count
The number of mutations that can be performed before the bee needs to visit a hive to reset the counter.
Name: Mutation Count
Key:count
Type: Integer
Default:10
Example
mutation
The ID for the mutation recipe. The format is that of a ResourceLocation.
The ResourceLocation for any registered MobEffect, including modded ones.
Name: Effect
Key:effect
Type: ResourceLocation
Default:minecraft:luck
Example
{"auras":[{
strength
The strength of the potion effect.
Name: Strength
Key:strength
Type: Integer
Range: 0 - 4
Default: 1
Example
Color Data
The color customization component handles the Bee Jar and Spawn Egg colors.
Customization Options
spawnEggPrimaryColor
Sets the primary color used on the spawn egg item.
Name: Primary Spawn Egg Color
Key:spawnEggPrimaryColor
Type: Color
Default: No Color
spawnEggSecondaryColor
Sets the secondary color used on the spawn egg item.
Name: Secondary Spawn Egg Color
Key:spawnEggSecondaryColor
Type: Color
Default: No Color
jarColor
The color used on the jar when the bee is in the bee jar.
Name: Bee Jar Color
Key:jarColor
Type: Color
Default: No Color
Creating A Custom Bee
Resourceful Bees more modern, codec-driven API, enables pack developers and players to create custom bees varying in degree of complexity easily. Bee creation can feel overwhelming at first, but luckily for creators, a vast majority of available customization options are optional and most options have some kind of default value available, with vanilla-matching values provided where necessary.
When the default value for an available option is desired, it is acceptable to omit the entry from the JSON.
Fundamental Overview
At the most basic, high-level view, the creation of a custom bee requires a minimal number of key components to come to life. Below we will highlight the absolute bare minimum required to make a bee as well as additional customizations:
Minimum Requirements
Simply placing a properly structured JSON file in the right location will create a bee. However, the bee may not have the right appearance, create honeycombs, spawn, breed, etc without some additional context.
Additional Customizations
In addition to the bee JSON, a player or pack developer may want to provide custom textures, translations, models, animations, traits, mutations, honeys and honeycombs, various recipes, and more:
Custom textures, models, and animations will all affect the appearance of the bee.
Translations make any text associated with the bee display in the proper language.
Honeys and honeycombs can be created independently from bees so that more than one bee can utilize a honey or honeycomb.
File Structure
Traits, bees, honeys, and honeycombs are all customized in the resourcefulbees config folder. They can also be customized via the datapack data folder as well. The datapack location is useful for supporting mods which may want to add their own custom bees when loaded alongside Resourceful Bees, however the config folder is a better location for pack developers and players due to the caveats associated with how bees, honeys, and combs are registered to the game.
The bee_traits folder is where all custom traits should go.
<pack instance>/config/resourcefulbees/bee_traits
The bees folder is where all custom bees should go.
<pack instance>/config/resourcefulbees/bees
Language Files
Language files allow text displayed in game to be displayed in various languages. Not providing an entry in a language file will cause names to appear something like this:
item.resourcefulbees.blaze_honeycomb
For new mod installs, run the game at least once so all necessary config files and folders can be generated
Creating a Language File
Locate the resourcefulbees config folder inside the main config folder.
Before we begin the process of adding a language file we need to verify that specific resource and data pack files have been generated:
Inside the resourcefulbees folder there should be another folder labeled resources
You do not need multiple language files. You only need one with new lines added for each custom bee:
Custom Bee Caveats
Mutation Recipe
todo: move this to a separate recipes category
Mutations utilize the recipe system to make them more data pack friendly. One benefit of using the recipe system is that a mutation can be created once and shared among many different bees.
Recipe Type
Every recipe JSON is required to have a type. For mutations the type is resourcefulbees:mutation
Customization Options
input
The item/block/fluid/entity being transformed.
Name: Mutation Input
Key:input
Type:
Default:
Example
outputs
A list of possible transformation results, which can be an item, block, fluid, or entity.
Name: Mutation Outputs
Key:outputs
Type:
Default:
Example
Damage Effect
Customization Options
source
The ResourceLocation for any registered MobEffect, including modded ones.
Name: Damage Source
Key:source
Type: ResourceLocation
Default:minecraft:cactus
Example
hasEntity
If the damage source is sourced from an entity, this should be marked as true. This allows for the death messages to be displayed correctly in the event the target entity dies.
The weighting of how likely the child is to be selected among potential candidates
The chance the child is created if selected
Customization Options
weight
For all possible children these two parents can create how likely is it this one will be picked? Weight affects the result distribution among potential outcomes.
Calculating Weight Distributions:
A pair of parents has five different child options.
The weights are as follows:
The chances each child has of being selected are as follows:
To calculate the chance:
Add up all the weights
Divide the weight you wish to check by the total in step 1
Name: Weight
Key:weight
Type: Double
Range: ≥0.0
Default: 10
Example
chance
Once this child has been chosen as the result type, what is the chance that it will be created?
Note: The value has a range of 0.0 - 1.0.
A value of 0.5 = a 50% chance of the child being created.
Name: Chance
Key:chance
Type: Double
Range: 0.0 - 1.0
Default: 1
Example
parent1
The ID of the first parent.
If not provided family will be ignored!
Name: Parent 1
Key:parent1
Type: String
Default: 1
Required: If not provided family will be ignored.
Example
parent2
The ID of the second parent.
If not provided family will be ignored!
Name: Parent 2
Key:parent2
Type: String
Default: 1
Required: If not provided family will be ignored.
Example
associated lore
the honeycombs produced, if any
Identifier
The root JSON of the core customization component looks like this:
The identifier of the component is as such:
Customization Options
honeycombVariation
The identifier of the honeycomb variation produced by the bee. More information about honeycomb variation can be found in the Custom Honeycombs section.
Name: Honeycomb Variation
Key:honeycombVariation
Type: String
Default: No Honeycomb
Example
flower
Specifies what flower(s) the bee can pollinate. With the use of Miscellaneous, the syntax will vary based on the definition. The flower can be defined as a tag, a list of blocks, or a single block. See the examples below for further understanding.
When the flower a bee can pollinate is an entity, entityflower must be used instead. The syntax used remains the same as blocks. See the examples below for further understanding.
The base amount of time a bee spends in a hive. This value is modified based on the hive tier.
Name: Max Time in Hive
Key:maxTimeInHive
Type: Integer
Range: ≥600
Default: 2400
Example
lore
Lore is cosmetic text displayed in JEI tooltips when hovering over the bee with the cursor. It can be extremely useful for providing players with hints on how to obtain the bee or it can be useful for memes and credits.
"resourcefulbees:core/v1": {
"entityFlower": [
"minecraft:cow",
"minecraft:sheep"
],
"maxTimeInHive": 4000,
"lore": [
{
"text": "This bee is a dummy and does not exist"
},
{
"text": "Bee happy...--``-..-``---."
}
],
"honeycombVariation": "dummy_honeycomb",
"flower": [
"minecraft:diamond_block",
"minecraft:emerald_block"
]
}
"resourcefulbees:core/v1": {
...
}
resourcefulbees:core/v1
Render Data
The render customization component is responsible for defining how the bee looks. The data is only used on the client. There are several visual aspects of a bee that can be modified:
Size
Model
Animations
Textures/Layers
UI Colors
Identifier
The root JSON of the rendering customization component looks like this:
The identifier of the component is as such:
Customization Options
layers
Layers are used to add custom textures on top of the base texture and allow them to have special effects or be enabled by special means.
Warning: Increasing the number of textures rendered on a bee will impact performance. It is recommended to use the least number of layers necessary!
Name: Layers
Key:layers
Type:
Default: Empty List
Example
ColorData
Color data is used to set the colors for things like jars and spawn eggs.
Name: Color Data
Key:ColorData
Type:
Default:
Example
model
The location where the is stored.
Beware: The more complex the model is, the more impact it will have on performance. It is highly recommended to keep custom models as simple as possible!
Name: Model
Key:model
Type:
Default:
Example
texture
The base texture for the bee. Each texture requires two versions to exist: normal and angry. The angry texture should use the same name as the normal texture with the suffix _angry appended to it.
creeper.png
creeper_angry.png
Name: Texture
Key:texture
Type: String
Default: Missing Texture
Example
animation
The location where the is stored.
Name: Texture
Key:texture
Type:
Default:
Example
Note: Only vanilla bee animations are currently supported!
sizeModifier
The scale of the bee when rendered in-game.
Note: A value of 2.0 would double the size of the bee, while a value of 0.5 would shrink the bee to half its normal size.
Name: Size Modifier
Key:sizeModifier
Type: Float
Range: 0.5 - 2.0
Example
Combat Data
The combat customization component is responsible for defining a bee's survival ability and hostility:
Is the bee passive?
Does it lose its stinger after attacking?
Does it inflict poison?
Can it take damage?
General attributes of the entity such as:
Max health
Armor
Identifier
The root JSON of the combat customization component looks like this:
The identifier of the component is as such:
Customization Options
isPassive
When true, the bee will not attack entities back.
Name: Passive
Key:isPassive
Type: Boolean
Default:false
Example
removeStingerOnAttack
When true, the bees stinger will be removed on attack. If a bees stinger is removed, it has a chance of randomly dying a bit after the stinger was removed.
Name: Remove Stinger
Key:removeStingerOnAttack
Type: Boolean
Default:true
Example
inflictsPoison
When true, the targeted entity will be inflicted with poison when attacked.
Name: Inflict Poison
Key:inflictsPoison
Type: Boolean
Default:true
Example
isInvulnerable
When true, the bee will not take any damage.
Name: Invulnerable
Key:isInvulnerable
Type: Boolean
Default:false
Example
attributes
A map of and their values. The keys are the Attribute ID's and the values are the attribute value.
Name: Invulnerable
Key:attributes
Type: Map<, Double>
Default:
Example
Bee Aura
Resourceful Bees provides a set number of predefined Auras (with customizable values) out of the box:
Burning
Players within the aura's range are set on fire.
Potion
Players within the aura's range have a potion effect applied to them.
The "key" names act as identifiers under which the data is registered and used and follow the namespace:path format. The path generally follows a type/version format.
"resourcefulbees:trade/v1"
This syntax allows for the customizable options to evolve over time with minimal upkeep required since data mappers can be written to upgrade older API versions to newer ones.
Key Components
Below is a list of the key customization components provided by the mod. Additional components can be created by other mods via our API.
The layer customization component is responsible for defining key aspects of a specific render layer. There are several aspects of a layer that can be modified:
Effect
Pulse Frequency
Color
Texture
Visibility when carrying pollen
Customization Options
color
The color that will be applied to the layers texture, this should not be set if your texture is not made to be colored.
Name: Color
Key:color
Type: Color
Default: Optional
texture
The texture for the layer. Each texture requires two versions to exist: normal and angry. The angry texture should use the same name as the normal texture with the suffix _angry appended to it.
creeper.png
creeper_angry.png
Name: Texture
Key:texture
Type: String
Default: Missing Texture
Example:
layerEffect
The effect the layer will have. There are 3 options available:
This effect does nothing. It is the default option and does not need to be set explicitly.
This effect applies the enchantment glint effect to the layer.
This is used to apply a fullbright glow to the texture similar to the flash a creeper makes.
This combined with the pulseFrequency field will allow for the same effect as a creeper.
Name: Layer Effect
Key:layerEffect
Type: Enum | LayerEffect
Default:NONE
This does not have to be set explicitly. The two examples below do the same thing:
isPollen
When true, this layer will only be visible if the bee is carrying pollen.
Name: Pollen Layer
Key:isPollen
Type: Boolean
Default:false
Example:
pulseFrequency
Used with the GLOWlayerEffect to create a flashing effect.
Name: Pulse Frequency
Key:pulsefrequency
Type: Float
Range: 5.0 - 100.0
Example:
Trade Data
The villager trade customization component is reused across several JSON files within Resourceful Bees. It is responsible for defining the costs and rewards of certain trade items depending on which file it is used in. Not including a villager trade customization component prevents the associated items from being added to the pool of trades.
Below are the JSON files which can have a villager trade customization component and the trades they create.
When the component is used in a custom bee JSON, a filled bee jar will be added to the Level 5 trade pool.
When the component is used in a custom honeycomb JSON, the honeycomb and honeycomb block will be added to the Level 3 trade pool.
Default: 0
The component can be used in three different sections of a custom honey JSON:
When used in the honey bottle section, a honey bottle will be added to the Level 3 trade pool.
When used in the honey block section, a honey block will be added to the Level 3 trade pool.
When used in the honey fluid section, a honey bucket will be added to the Level 3 trade pool.
Adding an empty villager trade component will add the trade to the pool using all default values.
Identifier
The root JSON of the villager trade customization component looks like this:
The identifier of the component is as such:
In custom honeycomb and honey JSON's the identifier is tradeData:
Customization Options
amount
The max amount of filled bee jars that can potentially be received in a single trade.
When trades are being populated, the amount actually used is a randomized value between the min and the max, therefore, not all trades will always have this amount.
Name: Amount
Key:amount
Type: UniformInt
Default: 1, 64
Example
secondaryItem
The item needed, when the trade requires a secondary item, in addition to golden flowers.
Name: Secondary Item
Key:secondaryItem
Type: ItemStack
Default:ItemStack.EMPTY
Example
secondaryItemCost
The max base cost for the secondary item.
When trades are being populated, the amount actually used is a randomized value between the min and the max, therefore, not all trades will always have this amount.
Name: Secondary Item Cost
Key:secondaryItemCost
Type: UniformInt
Default: 1, 4
Example
priceMultiplier
When demand goes up, so does the price. Use this value to scale the price increase.
Most vanilla trades have a price multiplier of 0.05
Name: Price Multiplier
Key:priceMultiplier
Type: Float
Range: 0.00 - 1.00
Default:0.05
Example
maxTrades
The max number of trades that can be performed before a restock is needed.