Custom Crystals - XFactHD/BuddingCrystals GitHub Wiki
Custom crystals can be defined by adding a JSON file to the buddingcrystals folder in the game directory.
This folder will be created when the mod is loaded for the first time.
This document covers the second version of the format, see this revision for the legacy format.
The file name should be the name of the material and must follow a few rules:
- All lowercase
- Only
a-z0-9_characters are allowed, no dashes, spaces or special characters - Must start with a character
Single source texture for crystals and budding block:
{
"translation": "Iron",
"texture": "minecraft:item/iron_ingot",
"growth_chance": 1,
"dropped_item": "minecraft:iron_ingot",
"normal_drop_chance": 7,
"max_drop_chance": 10
}Separate source textures for crystals and budding block:
{
"translation": "Iron",
"texture": {
"crystal_texture": "minecraft:item/iron_ingot",
"budding_texture": "minecraft:block/iron_block"
},
"growth_chance": 1,
"dropped_item": "minecraft:iron_ingot",
"normal_drop_chance": 7,
"max_drop_chance": 10
}All keys are required unless stated otherwise
-
translation: The english translation of the material, used for dynamic resourcepack -
compat_mod: The mod ID of the mod that provides the resource, used to disable recipe loading when the mod is not present to avoid datapack errors -
texture: Either the source texture used to generate the textures of both the growing crystals and the budding block or an object containing separate textures used to generate the textures of the growing crystals (key:crystal_texture) and the budding block (key:budding_texture) respectively -
growth_chance: The inverse chance of a crystal to grow in a random tick. A value of 1 means it will grow every random tick, higher values lead to a lower chance. Must be higher than 1 -
recipe_item: The item to use in the recipe for the budding block (optional) -
dropped_item: The item to be dropped when the fully grown crystal is broken. Also used as the recipe ingredient for the budding block whenrecipe_itemis not present -
normal_drop_chance: The nominal amount of items dropped when the fully grown crystal is broken or blown up. Floating point value, must be higher than 0 -
max_drop_chance: The nominal amount of items dropped when the fully grown crystal is broken with a tool tagged withminecraft:cluster_max_harvestables. Floating point value, must be higher than 0
Certain values of the definition can be reloaded while the game is running through a resource or datapack reload.
Values reloaded by a resource reload (F3 + T or switching resource pack):
translationtexture
Values reloaded by a datapack reload (/reload command)
recipe_itemdropped_itemnormal_drop_chancemax_drop_chance
The builtin crystal definitions can be overriden by providing a JSON file with the material name (can be found from the crystal item names of the respective material).
The runtime generated resource pack and datapack are placed at the lowest priority and can therefore be overriden by providing the entries to replace in a normal resource pack or datapack.
The names and paths of the relevant generated files are as follows:
- Blockstates:
buddingcrystals/blockstates/<block name>.json - Block models:
buddingcrystals/models/block/<block name>.json - Item models:
buddingcrystals/models/item/<block name>.json - Translations:
buddingcrystals/lang/<language>.json - Recipe advancements:
buddingcrystals/advancements/recipes/<block name>.json - Loot tables:
buddingcrystals/loot_tables/blocks/<block name>.json - Recipes:
buddingcrystals/recipes/<block name>.json
Examples of those files in the form of the data for the builtin crystals can be found in the mentioned paths here: https://github.com/XFactHD/BuddingCrystals/tree/1.18.x/src/generated/resources
- If the texture(s) specified in the crystal definition file are located in the resources folder of KubeJS, they will not be available for the generation of the block and item textures. This is a limitation in the interaction of DynamicAssetGenerator and KubeJS in 1.18.2 (and potentially also 1.19.2). To get around this, you need to place the textures in a proper resource pack.