Skip to content

feat(BlockPosSetting): Add button to set coordinates#262

Open
IceTank wants to merge 2 commits intolambda-client:1.21.11from
IceTank:feature/add-block-set-button-to-BlockPosSetting-to-set-coordinates-to-current-block-under-cursor
Open

feat(BlockPosSetting): Add button to set coordinates#262
IceTank wants to merge 2 commits intolambda-client:1.21.11from
IceTank:feature/add-block-set-button-to-BlockPosSetting-to-set-coordinates-to-current-block-under-cursor

Conversation

@IceTank
Copy link
Contributor

@IceTank IceTank commented Mar 8, 2026

Sets coordinates in the BlockPosSetting to the block you are currently looking at. Don't have to type out coordinates in chat anymore.

@IceTank IceTank changed the title Add button to BlockPosSetting to set coordinates feat(BlockPosSetting): Add button to set coordinates Mar 8, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Kanban Mar 11, 2026
@beanbag44 beanbag44 self-requested a review March 11, 2026 19:42
Copy link
Member

@beanbag44 beanbag44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please test the code before publishing a pr

}
lambdaTooltip(setting.description)
sameLine()
button("Set") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this displays even when the dropdown is closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is on purpose. The idea is that you need to expand the tree node to see the coordinates. Otherwise coordinates will always show.

}

fun trySetValue(newValue: R) {
fun trySetValue(newValue: R, logResponse: Boolean = true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think a logResponse parameter is required here. The button has the tooltip to explain what it does and the built-in log functionality offers an option to revert to the old value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it this way because the default response in chat shows coordinates of the setting you changed

@beanbag44
Copy link
Member

hm ok i see the point of the drop-down and different chat command now. The drop-down / button combination is still buggy though. When hovering over the drop-down, the highlight bar goes through the button, and i think for most people, they wont be clicking the button while streaming for example as its too close to opening the drop-down and leaking coordinates. Its prob best just to keep the set button in the drop-down. Maybe there could be an option once we add a Client module to obfuscate coordinates in settings unless clicked to edit them. Then the button could definitely be placed inside the drop-down, or even remove the drop-down as a whole.

@beanbag44
Copy link
Member

im still not a huge fan of overriding the default command print in chat as it completely removes the guarantee of an undo button. Im not sure the best way to do this, maybe adding an open command print function to SettingCore which appends the undo on the end would be a good way of keeping coherence between setting commands. For now i think just stick with the standard command and we can come up with a more flexible system in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants