Vanilla structure block bounding boxes as vanilla replacements for shapes
altrisi opened this issue ยท 5 comments
(mostly for me, if I get bored enough at some point)
It has been brought to my attention a few+ days ago in the Fabric discord about someone rendering the structure block bounding boxes to vanilla clients as shapes. That could be a better replacement for box displayes in vanilla clients, except that not sure if you can color them.
I'll try to investigate how hard it would be to implement that somehow, at some point, unless you don't think it would be a better replacement if possible.
Edit: Fabric discord's message link: https://discord.com/channels/507304429255393322/523251999899385875/842744772090658876 (+next one)
I think I'll deem this unfeasible.
It could work, but would probably do more harm than good. In order to work, it would require to send the creativeMode
ability as true
, and while that doesn't change the player gamemode, it triggers some code paths that make the client "behave" as it is, like not using items in composters, durability, etc. While from a server that would get reverted since the player doesn't have those abilities, was only told so, there would probably be some desync issues with clients, and I'm not sure how it would affect singleplayer actually wouldn't affect singleplayer given it always has Carpet installed.
I'll therefore close this issue for now, unless you want me to continue it, or something changes in the game's code.
Unless...
Can we spoof the GameMode
in the PlayerListEntry
related to the player? That would not break that bad, but still break...
Hm.... not really sure if it's worth it.
In practice, there would be some limitations when rendering shapes as structure block bounding boxes:
- The shape must be a cuboid.
- No side of the cuboid shall exceed 48 blocks in length.
- All eight vertices of the cuboid must align to the corner of a given block.
- The shape would only be visible to players in Creative mode.
All in all remember it's a replacement, and it's definitely better than particles (more visible and useful).
- Will only replace cuboids
- I'll check if that's actually a requirement of the packet and adjust it
- Same as above, or maybe rounding?
- That's not actually true... If you are in Fabric Discord, see the linked message, they got it in to render in survival