Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The color customization component handles the Bee Jar and Spawn Egg colors.
spawnEggPrimaryColor
Sets the primary color used on the spawn egg item.
spawnEggSecondaryColor
Sets the secondary color used on the spawn egg item.
jarColor
The color used on the jar when the bee is in the bee jar.
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
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.
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
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.
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.
pulseFrequency
Used with the GLOW
layerEffect
to create a flashing effect.
Custom Bee Data is the main JSON object comprised of several customization objects which are defined using a "key": { value }
syntax.
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.
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.
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 core customization component is responsible for defining four key aspects of nearly every bee imaginable:
the flower(s) which a bee uses for pollination
the base amount of time the bee spends in the hive
associated lore
the honeycombs produced, if any
The root JSON of the core customization component looks like this:
The identifier of the component is as such:
honeycombVariation
flower
entityFlower
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.
maxTimeInHive
The base amount of time a bee spends in a hive. This value is modified based on the hive tier.
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.
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
Attack damage
Knockback
Any registered attribute vanilla or modded can be customized
The root JSON of the combat customization component looks like this:
The identifier of the component is as such:
isPassive
When true
, the bee will not attack entities back.
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.
inflictsPoison
When true
, the targeted entity will be inflicted with poison when attacked.
isInvulnerable
When true
, the bee will not take any damage.
attributes
The breeding customization component is responsible for defining relationships between bees. Bees can have many different breeding relationships.
The root JSON of the breeding customization component looks like this:
The identifier of the component is as such:
parents
A list of bee pairs that can be used to breed this bee.
feedItem
The item(s) which can be fed to the bee to trigger its love state.
Note: This value only applies when this bee is being used to breed another bee
feedReturnItem
Item returned to the player after the feed item has been consumed. Useful for returning container-like items after consuming the contents.
Note: This value only applies when this bee is being used to breed another bee
feedAmount
The amount of feed items required to be given to the bee to trigger its love state.
Note: This value only applies when this bee is being used to breed another bee
childGrowthDelay
The time in ticks that a baby bee will stay a baby bee.
breedDelay
The time in ticks until the bee's love state can be triggered again.
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
The root JSON of the rendering customization component looks like this:
The identifier of the component is as such:
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!
ColorData
Color data is used to set the colors for things like jars and spawn eggs.
model
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!
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
animation
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.
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.
The root JSON of the mutation customization component looks like this:
The identifier of the component is as such:
count
The number of mutations that can be performed before the bee needs to visit a hive to reset the counter.
mutation
The identifier of the honeycomb variation produced by the bee. More information about honeycomb variation can be found in the section.
Specifies what flower(s) the bee can pollinate. With the use of , 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.
Type:
Type:
Type:
A map of and their values. The keys are the Attribute ID's and the values are the attribute value.
Type: Map<, Double>
Type:
Type:
Type:
Type:
The location where the is stored.
Type:
The location where the is stored.
Type:
The ID for the mutation recipe. The format is that of a .
Type:
A bee family consists of four key pieces of information necessary for breeding a bee:
The first parent required
The second parent required
The weighting of how likely the child is to be selected among potential candidates
The chance the child is created if selected
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.
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.
parent1
The ID of the first parent.
If not provided family will be ignored!
parent2
The ID of the second parent.
If not provided family will be ignored!
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.
The root JSON of the trait customization component looks like this:
The identifier of the component is as such:
auraRange
The range within which players would be affected by the aura. This value is the number of blocks.
traits
The list of traits given to the 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.
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:
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.
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.
Traits and mutations can also be created independently so as to be reusable.
Various supporting recipes can be created for blocks such as the centrifuge, solidifier, flow hive, breeder, etc.
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
The honey
folder is where all custom honeys should go.
<pack instance>/config/resourcefulbees/honey
The honeycombs
folder is where all custom honeycombs should go.
<pack instance>/config/resourcefulbees/honeycombs
The resources
folder functions as any normal resource pack resources
folder would.
<pack instance>/config/resourcefulbees/resources
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
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
Open this folder and verify there is a file inside called pack.mcmeta
This file is needed for the loading of the language files.
If you do not see this file then reload the mod/pack to generate it.
Inside the resources
folder we need to add the following nested folders: assets/resourcefulbees/lang
The structure should appear as the following image:
Inside the lang
folder, creating a file called en_us.json
will create an English US language file.
Every custom bee added should have language entries similar to the Blaze example below:
You can either restart the game or use F3+T to reload assets and have the language file take effect.
You do not need multiple language files. You only need one with new lines added for each custom bee:
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.
Every recipe JSON is required to have a type. For mutations the type is resourcefulbees:mutation
input
The item/block/fluid/entity being transformed.
outputs
A list of possible transformation results, which can be an item, block, fluid, or entity.
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.
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.
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
:
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.
secondaryItem
The item needed, when the trade requires a secondary item, in addition to golden flowers.
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.
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
maxTrades
The max number of trades that can be performed before a restock is needed.
xp
The XP awarded each trade.
aura
The Aura Type determines the effect that the aura has on the player. It is a required value for the Aura to load properly.
damageEffect
potionEffect
modifier
The modifier value is used with the HEALING
, EXPERIENCE
, and EXPERIENCE_DRAIN
aura types.
When used with the HEALING
aura type, the value equals the amount healed.
When used with the EXPERIENCE
aura type, the value equals the amount of experience received.
When used with the EXPERIENCE_DRAIN
aura type, the value equals the amount of experience taken.
calmingDisabled
The aura can be disabled by the "calming" status effect when this value is set to true
.
You can specify a different language using any one of the language codes found under the Available languages section.
Type:
Type:
Used when the aura type is DAMAGING
The damage source and strength values are defined in the .
Type:
Used when the aura type is POTION
The effect and strength values are defined in the .
Type:
source
The ResourceLocation for any registered MobEffect, including modded ones.
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.
strength
The strength of the damage effect.
type
A mutation can be one of four different types:
The type object is used for defining the Mutation Type, associated data, and the likelihood of obtaining, when used as an output option.