[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:28, 31. Aug 2019
Joined Aug 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
[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:27, 16. Sep 2019
Joined Mar 2018
User points:

Statistics:

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

noice