[Solved] Right-clicking leaf-based block updates adjacent leaf-based blocks (+ another problem)

Started by Sajevius on

Topic category: Troubleshooting, bugs, and solutions

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] Right-clicking leaf-based block updates adjacent leaf-based blocks (+ another problem)
Fri, 03/05/2021 - 13:25 (edited)

I wanted to make special leaves known as "fruiting juniper leaves" for my mod. currently, I have 2 leaf blocks: one that's normal, and one that has juniper berries (which are actually seed cones btw. the more you know). I set both leaf variants to tick randomly, and I've made 2 procedures:


  1. a procedure that, on random ticks, will replace the normal leaves w/ fruiting juniper leaves (this procedure is used by the normal leaves)
  2. a block right-clicked procedure for the fruiting leaves that spawns 1-3 juniper berry items, which works similar to harvesting sweet berries from their respective berry bushes (this procedure on the other hand is used by the fruiting leaves)


but the problem is, whenever I right-click a fruiting juniper leaves block, the block/s next to it (regular juniper leaves, in particular) gets tick-updated, even if I set both leaves to tick randomly! and this has also caused a really ridiculous bug in my juniper tree structure's generation.


when generated in the world, they used to look like this:


old juniper trees


 


but now they only generate and look like this:


new (and bugged) juniper trees


 


yeah, that's all of the naturally generating juniper leaves getting replaced by fruiting leaves somehow...



also, the other problem is that when I place a normal juniper leaf block, it doesn't grow berries even on random ticks! I've tried setting a higher value for randomTickSpeed using the /gamerule command, but no matter what it just doesn't turn into fruiting juniper leaves!


is this a bug? an intentional Minecraft feature? or am i just doing something wrong? what workaround/s can you suggest that doesn't replace all the naturally-generating leaves with fruiting ones, makes the leaves effectively grow berries on random tick update, and also allows for berry harvesting when the fruiting leaf is right-clicked, all of the mechanics working similarly to those of sweet berries/berry bushes?


 


thanks in advance!

Edited by Sajevius on Fri, 03/05/2021 - 13:25
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
uh... i kinda need help with…
Sun, 02/28/2021 - 09:55

uh... i kinda need help with this urgently. anyone?

P.S. I'm on MCreator 2020.5 (still) and on 1.15 if it helps.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
actually, here's what I…
Sun, 02/28/2021 - 13:19

actually, here's what I wanted to do: I wanted the juniper berries to be renewable. the way I've thought of achieving this was making 2 leaf blocks, as I said. (since MCreator doesn't support blockstates without custom code yet, I just stuck to making a separate block.) the normal leaves were supposed to grow renewable berries on random tick update (compare the sweet berry bush, which can produce theoretically infinite sweet berries, given enough time), and when the leaves with fruits are to be right-clicked, they'll spawn juniper berry items and get replaced by the normal leaves. 

I've tried regenerating code, and... nothing changed. so it might not be a code generation bug on MCreator...

 

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
huh, guess I'll move on for…
Sun, 02/28/2021 - 22:28

huh, guess I'll move on for now. but I'll be waiting patiently for someone to suggest a fix :/

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
guys... I just figured it…
Mon, 03/01/2021 - 12:27

guys... I just figured it out! it seems that the "leaves" block base is what's causing the problem. 

but then again, how can I fix it? coz if I don't set "leaves" as their block base, they won't have the "persistent" blockstate, which means they'll never decay and work like actual leaves! :(

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I even tried messing with…
Tue, 03/02/2021 - 00:49

I even tried messing with the block's code and saw that tickRandomly & tickRate were both present in the normal leaf, even tho I've already set it to tick randomly and the random tick function is already in its code, tickRandomly(). strangely, the tickRate wasn't even in the fruiting juniper leaves! I swear I set both blocks to tick randomly in the WYSIWYG editor/generator. but i doubt that's the true problem. I think that leaves ticking works differently somehow, and maybe that's the problem?

(this problem isn't fixed yet...)

 

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I wish someone could help me…
Tue, 03/02/2021 - 22:04

I wish someone could help me soon, I'm really stuck in this problem once more...

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could you force it to tick…
Tue, 03/02/2021 - 22:57

Could you force it to tick normally (every tick), then just create a random delay with procedures? This should keep Minecraft/MCreator's way of ticking blocks randomly, which is clearly bugged, out of it.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@rmsandegs it seems to me…
Tue, 03/02/2021 - 23:06

@rmsandegs

it seems to me that the leaf block base's ticking system is the one that's bugged. I tried setting the base block of both the leaves to "default basic block" and, surprisingly, they started to random-tick properly. (though that just removes their leaf properties which I wanna keep.) but I'll give what you said a try. thx for suggesting!

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well, what do you know, the…
Fri, 03/05/2021 - 13:24

well, what do you know, the workaround suggestion actually works! thank you so much, @rmsandegs!