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

Started by BLDragon V2 on Sat, 08/03/2019 - 12:44

Topic category: User side tutorials

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
[Tutorial] Custom Grass morphing into Custom Dirt if a block is placed up to it!
Sat, 08/03/2019 - 12:44

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
User points:

User statistics:

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

noice

Last seen on 19:53, 15. Mar 2020
Joined Dec 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 16:34, 7. Jul 2020
Joined Apr 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.