Why Isn't this Working--Block-Check Procedure (image included)

Started by ViperousDeer on

Topic category: Help with MCreator software

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why Isn't this Working--Block-Check Procedure (image included)
Mon, 12/27/2021 - 11:30 (edited)

https://imgur.com/a/PXvYWxR

I've tried "if" statements, I've tried "if else" statements, I've tried using "not", using "= false", I've rearranged the "or" layouts, I've watched videos and researched for a solution.
Nothing.

This procedure and all the variations I made work perfectly fine before I add the water condition.
The moment this block in any way checks for water, even if its through a different trigger, in game when I place it it just deletes and drops itself. Whether its in water or in air, whether its against the custom brown block or not. I don't understand why and I've literally spent all day rewriting/researching to get it to work. 

Procedure is attached to a coral block with the trigger "when block is placed by". What I need it to do is be in water AND be touching that custom brown block on any side, if it doesn't do that it breaks.

I have other procedures that check for water at x y z and that same custom brown block as x y-1 z. They work just fine.

Asking for help is my last resort. So please help, at this point I'm at a complete loss.

Edited by ViperousDeer on Mon, 12/27/2021 - 11:30
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to use conditions…
Thu, 12/30/2021 - 06:03

You need to use conditions. I'm working on a piece of code that I can give to you that will solve your issue.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, so from what I…
Thu, 12/30/2021 - 06:26

Ok, so from what I understand you want a block(Coral) that can be only placed in water and has to have at least one brown block next to it(Ground). If that's correct then I have made a procedure that does this. In your "Coral" block go to advanced properties and in the bottom left you will see "Block valid placement condition". Left-click on the green button with the white plus and name your procedure then select create procedure. Inside the procedure copy this code in...

https://imgur.com/a/mS0IWtl

You can find the return blocks at the bottom of the flow control category. They don't show in the search bar for some reason?

The water is "still water" not "water" and the blocks are whatever ground block you choose. You also need to go to Visual and in the top right, check the "Is block waterloggable" for the coral block. The rest of the settings you can customize yourself. This means that the block will not place until the requirements are met. Change the procedure if you want to make different requirements.

 

Hope this helps.