[Tutorial] Custom Grass morphing into Custom Dirt if a block is placed up to it!

Started by BLDragon V2 on

Topic category: User side tutorials

Last seen on 14:00, 6. Apr 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] Custom Grass morphing into Custom Dirt if a block is placed up to it!

Hello! Today im just going to do a small tutorial, hope it's easy to read AND to follow!

1. Creating your Custom Grass

First of all, you want to create your custom grass. This should be easy, so im not going to picture it.

2. Creating the Custom Dirt

Next, we need the dirt block. You're going to do it like the grass, and I guess you can use the bottom texture of your grass block to serve as all the face textures of your block!

3. Procedures

Next, the harder part : Procedures!

First, you want to add a " if... do... else... " block. It'll serve us to locate the block upon and do an action that depends of it

Picture

 

Next, we want to test if the block up to the grass is air. We're going to add this block to the " if " condition in order to test it

 

Test with " is air ".

 

Now, we're going to make it so the grass will stay a grass block if the block up to it is considered air. I don't know if it's required, but let's not miss it all up!

Custom Grass in an indefinite loop

By the same way, we will place the same order in else, but with the dirt block !

Dirt replacement

And now, it is done! You can now place the procedure in the grass's Update tick ( Though it'll look less Minecraft-ish, as it'll erase the grass instantly ) or Random tick update event ( To make it random ). Have a nice day !

Last seen on 17:18, 11. Feb 2020
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
noice
Sat, 08/03/2019 - 14:36

noice

Last seen on 16:24, 9. Mar 2021
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i did has you did, my grass…
Mon, 02/24/2020 - 11:07

i did has you did, my grass is not spawning when there is no air, but if there is one side of the block that has air, it will stay the same and not change, i only want it to change when there is a block above

Last seen on 14:00, 6. Apr 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try to change some stuff. If…
Mon, 04/06/2020 - 12:40

Try to change some stuff. If it still doesnt work, its probably because of the changes from the latest MCreator versions!

Last seen on 00:42, 22. Feb 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Under update tick for your…
Tue, 05/12/2020 - 02:14

Under update tick for your custom grass, create an if-else statement, if there is an air block above (at x y+1 z), do nothing, else place your custom dirt block at x y z.

Last seen on 17:21, 24. Dec 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you make it generate…
Thu, 01/14/2021 - 12:11

How do you make it generate all over the custom dirt block though? Like reguler Grass does? I am makinga grass like alternative for end stone and I want it to generate in specific biomes in the way grass does over dirt, instead of small groups here and there.