2024.1 custom leaves decay

Started by fenixgalax on

Topic category: Help with modding (Java Edition)

Last seen on 17:34, 31. Jul 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2024.1 custom leaves decay

Hello everyone!

Im creating this trees  mod and im almost done. Just few minor bugs to fix and one of them is leaves decay.

ive been trying to find out what how where for over a week now but couldnt find a topic or tutorial that would help me, so here i am.

 

Before any suggestions i must list where i am at.

both custom leaves and logs are in their respective minecraft tag section under logs and leaves respectively.

ive tried replacing leaves on the structure using replace command with and without [persistent:false] where it seems that my leaves blocks dont even suport persistent tag. only waterloggable.

im building on mcreator 2024.1 neoforge so maybe that is the reason, i dont know.

i also found many topics with similiar problem however, all of them are unanswered.

please help

thank you  in advance.

Last seen on 17:34, 31. Jul 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For anyone who encounters…
Sun, 06/30/2024 - 13:38

For anyone who encounters same problem, i have managed to create a primitive solution. 

all i had to do is create 2 procedures and aditional blockstate for the leaves block. 

in the leaves block tick update i have created procedure where it checks if its not connected to any logs and is connected to atleast 1 decay leaves block state if logic is true it turns itself into leaves decay block state. 

all that is innitiated by breaking log block where procedure checks if block is broken and transforms all connected blocks of leaves to that log block into decay block state of the blocks.

 

 

And as for you advanced users im asking you to find or provide more optimised solution if it exist. 

thank you in advance.