Block "see the sky" doesn't work correctly

Started by Ellse on

Topic category: Troubleshooting, bugs, and solutions

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block "see the sky" doesn't work correctly

I have a dimension in which I want to remove certain blocks placed by the player. 

But when checked in the "see the sky" block it always returns false. 

How to fix it? 

Everything works without it, and I think it's mcreator's error.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm pretty sure the 'block…
Mon, 12/11/2023 - 12:39

I'm pretty sure the 'block is placed' trigger returns the position of the block you right clicked on to place, not the position of the new block. (It's the only reason why this wouldn't be working.) It would be checking if the block you placed it against is copper, and then it wouldn't be able to see the sky because the block at y+1 would be the block you just placed? 

Otherwise, I'm not totally sure. It's possible the sky function is broken for custom dimensions, but if so you could either do this based on the y value of the block, or by making your own sky function. (You would need a while loop with a local number variable that returns true if the variable plus the y position equals the build limit, false if the block at the variable plus the y position is solid, and adds one to the variable and does nothing if the block at the current position is air.) 

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for fast answer. I…
Mon, 12/11/2023 - 14:00

Thank you for fast answer. I was already convinced that “see the sky” DOES NOT work in this version of MCreator, so I implemented its functionality myself:

For this work, you need to create 2 variables:
i, check.

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have made a much simpler…
Thu, 11/14/2024 - 03:15

I have made a much simpler version because the block was broken for me as well, and adding to the y didnt do anything either. just in case the image isnt working ill just say what the code is:
if "get world surface height at (x, z)" = "y"

Image:
code
https://ibb.co/xJYcY4q

the original block is flawed, if you check the code for the original block the function's name is "CanBlockSeeSkyFromBelowWater" so i dont think its meant to be used like this

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ah wait i put the wrong link…
Thu, 11/14/2024 - 03:17

ah wait i put the wrong link for the image mb

theere we go