githubEdit

seedlingCrops

Crops

circle-exclamation
circle-exclamation

This page is under construction...

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_seed

Put 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.

chevron-rightMore info about model_texture_keyhashtag

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.

  • width by default is 1.0

  • length by default is 1.0

  • height by default is 1.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

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

Minimum light level above the crop for growth to occur.

Sounds

Sounds settings.

  • place_sound

  • break_sound

  • interact_sound

multipliers

Used to determine how fast/slow the crop grows on some conditions.

  • bonemeal: When interacted with Bone Meal

  • max_moisture: When moisture is at max level (7). Value of 0.5 means plants grow 2x faster at max moisture.

  • rain: When it rains

  • thunderstorm: When there is a thunderstorm

  • snow: When it snows

Loots

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

This is the property where you can list all the loots for this crop.

trigger

By default: BREAK.

  • BREAK: block broken normally

  • INTERACT: user clicked/used the crop

  • TRAMPLE: stepped on

  • WATER: removed by flowing water

  • LAVA: removed by lava

  • FARMLAND_DRY: soil turned to dirt when no longer hydrated

triggers

Alternative to trigger, you can set multiple triggers.

Example

decrease_age

This is used to make the crop lose age instead of being broken.

age

Age when the loot will be satisfied.

age_range

Alternative to age which allows for further customization of the age range when the loot should be dropped.

biomes

List of biomes where the loot should be dropped.

worlds

List of worlds where the loot should be dropped.

tools

List 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

Is used to stop other loots to drop whenever a loot already was satisfied and was just dropped.

commands

List of commands to be triggered.

Each command has a set of properties:

  • command: command to be executed

  • as_console (default: true): if executed as console

  • silent (default: false): if silent or show a message in console

Example

exp_drop

Drops some experience.

exp_drops

Alternative to exp_drop that allows more than 1 entry to be set.

Example

item_drop

Drops an item.

item_drops

Alternative to item_drop to drop more than 1 item.

bottom_block

Allow 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)

You can use crop_cross as an alternative model, similar to vanilla sweet_berries.

Custom crops models

circle-exclamation

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.

chevron-rightItems creationhashtag

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

circle-info

This method works with any ItemsAdder version.

circle-info

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