This tutorial will guide you in the creation of a custom plant. A plant is a specific kind of block with some properties: it can only grow on certain blocks, it ticks randomly, and it generates on the surface. As such, plants share many of their properties with blocks. If you're planning to make a block, check How to make a Block instead.
Creating the texture
Before creating your plant, you'll need a texture for it. You can use external programs such as Paint.net or Gimp, or you can use the built-in texture editor. The texture has to be saved as a block texture. For more info, you can check the page Making a new Texture.
Creating the plant
- Open your workspace
- Click on Add new mod element
- Select Plant from the list, or press y
- Enter the name of your mod element
- Click on Create new plant
Texture and type
- Choose a texture
- Choose the type of your plant:
- Static plants behave like flowers. They can be planted on grass and dirt, and won't change over time
- Growable plants behave like sugar canes. Unlike static plants, they have additional parameters
- Plant type: determines where the plant can be planted
- Max. Height: the plant will grow until it reaches this height.
- Click Next page
- Name in GUI: This is the name of your plant when you hover over it in any GUI
- Creative inventory tab: This is where your plant will be in the creative inventory. Usually, plants are found in Decorations.
- Plant color on the map: This is what color your plant will appear as on maps. If it's set to Default, the color will be FOLIAGE.
- Hardness: This is how long it takes to mine the plant. An higher value means it takes longer to mine.
- Resistance: This is how the plant reacts to explosions. An higher value means the plant is more resistant to explosions.
- Sound on step: This is the type of sounds your plant will make when placed, destroyed or walked on. It's usually set to Plant
- Luminance: This is how much light the plant gives off, as a value between 0 and 1. If it's set to 0, the plant won't emit any light. If it's set to 1, the plant will have a light value of 15 (same as Glowstone).
- Is unbreakable: If checked, the plant can't be destroyed, behaving like Bedrock.
- Is replaceable: If checked, the plant can be replaced by other blocks. If you're making custom grass, this option should be enabled.
- Is flammable: If checked, fire can spread to and stay on this plant.
- Creative pick item: This is the item that will appear in your inventory when you "pick" (middle-click with mouse) the plant. If empty, the item will be the plant itself.
- Custom drop: This option makes it so the plant drops something else. You'll need at least one item or block before setting this option.
- Drop amount: How many items are dropped when the plant is broken. It shouldn't be higher than 1 if the plant drops itself.
- Ore dictionary name: This is what your block will be registered as in the ore dictionary. You can choose one of the default options or write a custom one. Leave empty to not register the block.
- After checking these parameters, you can press Next page
Generation and events
Plant spawning settings
- Spawn frequency on chunks: This options determines how often chunks try to generate this plant. Plants aren't generated individually, but in patches. For example, setting this value to 1 does NOT mean there's only one plant in each chunk; instead, each chunk will have (at most) one cluster of these plants. Because of this, setting this value to a low amount (4 or less) is enough for most purposes.
- Spawn dimensions: Plants will try to spawn in all the dimensions that appear in the list. Keep in mind plants won't generate if there's no block that can hold them. For example, static plants won't appear in the End.
- Restrict spawning by biome: Check this option if you want your plant to generate only in certain biomes (e.g. only in Plains)
- Restriction biomes: If the previous option is checked, your plant will spawn only in the biomes you picked here.
- When neighbor block changes: Triggers a procedure when a block around the plant is changed in any way
- Update tick: Triggers a procedure when the plant recieves a random update tick
- When plant destroyed by player: Triggers a procedure when the player breaks this plant
- When plant destroyed by explosion: Triggers a procedure when this plant is broken by an explosion
- When start to destroy: Triggers a procedure when a player starts to destroy this plant
- When mob/player collides with plant: Triggers a procedure when a mob passes through this plant
- When plant right clicked: Triggers a procedure when the player right-clicks this plant. It won't be called if the player is sneaking
You can now click on Save mod element. Your plant is now done!
If you prefer to watch the video, you can find the wiki page above summarized in a video: