Tectato / BetterCommandBlockUI

A fabric mod providing a more usable UI for Bommand Blocks
Creative Commons Zero v1.0 Universal
32 stars 7 forks source link

Features request #22

Open NnicanBuak opened 1 year ago

NnicanBuak commented 1 year ago

Three things will be very handy:

  1. auto-closing brackets - when setting an opening bracket, set a closing bracket and move the cursor inside the bracket.
  2. Setting Enter as a line break (this will be treated as a space for the command line). 2.1 In this regard, it will be a useful option to ask you to exit the command block, since Enter will no longer save the state of the command line.
  3. Formatting: Placing the cursor in front of a closing parenthesis will move it to the next level of indentation.

Before:

image

After:

Снимок экрана 2023-10-22 232525

and an additional formatting option is a line break after the disclosed nbt tag:

Снимок экрана 2023-10-22 233847

NnicanBuak commented 1 year ago

Looks like the latter has already been requested in #13

NnicanBuak commented 1 year ago

And along with the addition of the ability to write on the plates on both sides of minecraft, the problem with formatting the single quotation mark symbol ' became apparent.

https://minecraft.fandom.com/wiki/Sign#Block_data /setblock ~ ~1 ~ oak_hanging_sign{front_text:{messages:['[""]','["front"]','["text"]','[""]']},back_text:{messages:['[""]','["back"]','["text"]','[""]']}} replace

These single quotes are knocked out of the formatting system.:

image image

NnicanBuak commented 1 year ago

I would like to make these changes, but I didn't figure it out and didn't find a file that uses formatting/indentation of the command line😵‍💫

NnicanBuak commented 1 year ago

Well, after half an hour of researching the source code, I found the part of the code where the text is formatted!

NnicanBuak commented 1 year ago

Is it possible to integrate feature of the Better Selection mod to improve the UX of the command block interface🤔 Because without this mod when I try to delete one word with Ctrl+Backspace I delete half of the command, which is extremely inconvenient. Also missing is the ability to move with the arrows Up, Down ignoring sentences.

Tectato commented 9 months ago

I'll try to address these issues once I add a proper config screen

Tectato commented 9 months ago

In terms of making "Enter" act as a line break, that would require a complete rework of how this mod does it's line breaks. Right now it's all based on parentheses and commas with no extra data, so adding a manual line break in there in a way that doesn't affect the command that is then sent to the server would require saving all those line breaks clientside, which kinda goes against the philosophy of this mod

Tectato commented 9 months ago

I'd appreciate a look at this: https://github.com/Tectato/BetterCommandBlockUI/issues/30