Well, you have the idea already. Pretty much copy what vanilla does. You need to make a block that extends BlockCrops. Then you should go through all the methods in BlockCrops and see if there is anything you want to change. For example, the canSustainBush() method in vanilla looks for FARMLAND, but maybe you want your crop to grow in a different type of soil so you would change that. the canBlockStay() method also refers to the block below to check if it recognizes your plant using its canSustainPlant() method so you probably want to change that to also check for your soil preference. You will definitely want to override the getSeed() and getCrop() methods as they default to wheat. That's probably it.
Then you need to make the seed item. Depending on what you want you should extend ItemSeedFood or ItemSeeds. Again just go through the methods and override the ones that need to be changed for what you need.
Of course you also need to register your block and item and also make sure you have all the blockstate, model and texture assets in proper locations. Again look at an existing crop to get ideas on what should go into those files.
Now, all the of the above will make a regular crop that is 1 block high. To make a crop that is 2 blocks high takes a little bit of thought. There are a few ways to do it, but probably good to follow the way that double tall grass does it. This block is called BlockDoublePlant so you should look at that code. In that code you'll notice that there is an additional property called HALF which indicates whether the block is the bottom or the top half. So you need to add a similar property to your block.
Then, basically you use the property as follows:
- initially when planted the first block should have the HALF property set to bottom. So you would do this in your ItemSeedFood code, when the block is set you make sure the state is set correctly.
- in your block's grow() method, you should check the HALF property. If it is bottom and there is still more grow stages left, then just grow it. But once you have reached max grow stage the grow method should place another block above it, this time with the HALF property set to top.
- in your block's harvest-related methods you should look at BlockDoublePlant for ideas on how to code yours. Basically, it you harvest the top block it should also destroy the bottom block.
That's mostly it. Just follow the vanilla code as example, change what you need to change, and combine the properties from the BlockCrops with BlockDoublePlant.
1
There is an nbt tag that handles the radius at which it detects players, just use /blockdata (in 1.12.2 and before) or /data (in recent 1.13 snapshots) to change the nbt tag "RequiredPlayerRange" and set it to the distance you want it to detect players.
1
You need an image editor capable of handling alpha (Transparency). Try using a program like GIMP.
and if you want to just darken the texture create a new layer over the base image, fill it in with a solid dark color and adjust the opacity of the layer.
1
an armor stand randomizer would be more random i believe, you can see an example here: