Add single bedrock app
Find single bedrock on top of the nether.
Just like the "Bedrock Ceiling" feature of BoundingBoxOutlineReloaded.
Type /single_bedrock to turn on rendering, and type again to turn off.
It checks 9x9 chunks around the player on every 20gt.
It seems that carpet shapes can be occluded by blocks. (Is there an option to make shapes always visible behind blocks?)
So if the boxes are occluded, type /single_bedrock bottom to make it from y=0 to y=127, type again to turn off.
Tested on 1.18.2.
Screenshots:

The app works great, tested it on 1.17.1. I would still like to provide suggestions for some enhancements,
- Since this was inspired by BBOR, having a rendering system similar to it would be much more user friendly/short than this one imo. BBOR makes all boxes, boundaries, etc. based on the player's Y level (or it used to at least). So what I am proposing is, check the player's Y position and draw box from there to the y-128 location. With the current system, everyone almost always has to use the bottom sub command if they are below nether roof.
Bottomwill still retain its use case, but when a player wants something quick, BBOR style of rendering might be easier.
Everything following this are minor nitpicks,
'_tick'runs even if the player is not moving'on_move'event might come in handy here.EnabledandDisableddepends on gamerulesendCommandFeedback. Traditional print might be better for servers that have it disabled.- After removing all bedrock from a column, the box still persists. While this does not affect much on a smaller scale, if the
draw_radiusis increased and someone goes near a mob farm with roof broken in a massive area. I think the large amount of boxes can cause some performance issues. - I don't know enough about
task()but I think it would help a lot, if someone increases the draw radius to a big number. - Afaik
strictdoes not really serve any purpose here. - I was confused with all the 'constants' being stored as a variable, looking at
chunk_size&block_namespecifically.
Regardless of these nitpicks, the app works great with my limited testing.
@SurfingDude-1182 Thank you for your suggestions!
- BBOR renders only one block and can be occluded by blocks:

- I think
on_movewould trigger more frequent. It's a good idea to check player's chunk before calculating. - I will change it.
- I will change it.
- I think using
task()would not increasing MSPT, becauseScheduled functions run at the end of the tick(link). I will try usingtask()to see if it's better. - I will change it.
- It seems that there's no constants system in carpet script, so I use global variables as constants.
It's very slow when using task(). I set DRAW_RADIUS to 4, with task it takes 2138ms, without task only 73ms.
Updated. Add shapes cache. It will only calculate when the player move to another chunk.
Updated. Add shapes cache. It will only calculate when the player move to another chunk.
Yep, this is exactly what I had in mind.