Crops
Crops
Seed
Create a new yml file for your crop.
This is a simple seed item.
info:
namespace: my_crops
items:
red_crop_seed:
name: Crop Seed
graphics:
texture: item/red_crop_seedPut the texture into ItemsAdder/contents/my_crops/textures/item/red_crop_seed.png.
Model
ItemsAdder can auto generate the models for you. In this example I want to create a model based on the vanilla crop model, but with custom texture.
Set seed to the seed item id (red_crop_seed).
Set parent to minecraft:block/crop in order to use it as base model.
Set textures_prefix to block/red_crop_stage_ to find any texture that starts by that text, so it automatically gets them based on the max_age (7).
model_texture_key is used to replace the texture key inside the json model, in this example crop.
More info about model_texture_key
Here you can see a preview of the original parent model, with the #crop text that will be replaced by the model_texture_key.
Put all the textures inside ItemsAdder/contents/my_crops/textures/block/.

Hitbox
You can automatically increase the hitbox based on the crop age by using the property hitbox_auto_height_step.
hitbox_auto_height_step: default value is 0.
This will make the crop hitbox grow with the model proportionally.
You can also decide a starting hitbox size.
widthby default is1.0lengthby default is1.0heightby default is1.0
If you want more customization you can set per-age hitbox sizes. All options are optional, you can override a single one or all.
Growing settings
avg_seconds_per_stage
avg_seconds_per_stage It uses the value set in config.yml by default.
Average time in seconds for a plant to grow one stage under optimal conditions.
Used to calculate growth probability at each check (p = checkInterval / avgSecondsPerStage).
Lower values make crops grow faster, higher values make them grow slower.
min_light
min_lightMinimum light level above the crop for growth to occur.
Sounds
Sounds settings.
place_soundbreak_soundinteract_sound
multipliers
multipliersUsed to determine how fast/slow the crop grows on some conditions.
bonemeal: When interacted with Bone Mealmax_moisture: When moisture is at max level (7). Value of0.5means plants grow 2x faster at max moisture.rain: When it rainsthunderstorm: When there is a thunderstormsnow: When it snows
Loots
drop_seed_if_immature
drop_seed_if_immature(default: true) This property makes 1 crop seed drop when player breaks the crop that has not reached the max stage and didn't already drop anything (to avoid duplication).
loots
lootsThis is the property where you can list all the loots for this crop.
trigger
triggerBy default: BREAK.
BREAK: block broken normallyINTERACT: user clicked/used the cropTRAMPLE: stepped onWATER: removed by flowing waterLAVA: removed by lavaFARMLAND_DRY: soil turned to dirt when no longer hydrated
triggers
triggersAlternative to trigger, you can set multiple triggers.
Example
decrease_age
decrease_ageThis is used to make the crop lose age instead of being broken.
age
ageAge when the loot will be satisfied.
age_range
age_rangeAlternative to age which allows for further customization of the age range when the loot should be dropped.
biomes
biomesList of biomes where the loot should be dropped.
worlds
worldsList of worlds where the loot should be dropped.
tools
toolsList of tools that can trigger the loot.
Supports wildcard * and use hand to allow hand to trigger the loot.
By default hand is used.
stop_on_first_success
stop_on_first_successIs used to stop other loots to drop whenever a loot already was satisfied and was just dropped.
commands
commandsList of commands to be triggered.
Each command has a set of properties:
command: command to be executedas_console(default:true): if executed as consolesilent(default:false): if silent or show a message in console
Example
exp_drop
exp_dropDrops some experience.
exp_drops
exp_dropsAlternative to exp_drop that allows more than 1 entry to be set.
Example
item_drop
item_dropDrops an item.
item_drops
item_dropsAlternative to item_drop to drop more than 1 item.
bottom_block
bottom_blockAllow only this particular block to be a valid placement base for the crop. Usually set to farmland.
Done!
Your custom crop is ready.
Just generate your resourcepack using /iazip.



Performance optimization

The plugin uses a method to optimize the crops rendering, called billboard.
A billboard is basically a simpler model used to show crops that are far away.
By default the plugin already creates billboard for your models, but if you want to use different models you can do that with some properties. By default the billboard model is just a flat surface, which is the same logic used by many videogames.
Auto generate billboard based on custom parent and custom textures
Auto genereate billboard based on custom models
Alternative crops models (cross)
cross)You can use crop_cross as an alternative model, similar to vanilla sweet_berries.
Custom crops models
DO NOT USE TOO DETAILED MODELS FOR YOUR CROPS, OR YOU WILL GET PERFORMACE ISSUES!
2-4 cubes is more than enough for custom plants.
You can use some custom models for your crops.
Instead of using models_by_textures you have to use models_by_items.
You have to create a single model for each one of your crops stages + billboards.
blue_crop_stage_: is the prefix that will be used to find the items used for the stages and for the billboard.
Simple method
This method works with any ItemsAdder version.
This method is limited and doesn't allow creating custom modelled crops. It's a lightweight method to add some simple crops into the game.
To show custom crops you can decide a vanilla model to be re-used, for example SWEET_BERRY_BUSH, CARROTS etc.
Last updated