[Bug Report] Selection box not movable by buttons
Bug Report
Current Behaviour:
Clicking the "move point 1" or "move point 2" or the "move box" buttons whilst applying keyboard input (WASD or space or shift) for the desired direction doesn't result in any movement.
Expected behavior:
When I click an hold one of the "move point 1" or "move point 2" or the "move box" button, the respective selection points (or the whole bounding box) should be moved in the desired direction indicated by the WASD keypress or up (space) or down (Shift) direction.
Steps To Reproduce:
- Open a world in Amulet
- Select some area by left clicking
- Click one of the 3 Buttons (see attached screenshot) whilst applying keyboard input in any of the WASD or up (space) or down (Shift) direction
- See that selection bounding box is not moved.
Environment:
- OS: OSX Ventura 13.4.1 on Apple Silicon (M1 Pro Chip)
- Minecraft Platform: Java
- Minecraft Version: 1.20.1
- Amulet Version: 0.10.18
Additional context
Amulet is being run from source on python version 3.11.4.
Attachments
Screenshots
Clicking any of the 3 buttons in the lower left corner and simultaniously pressing WASD / Space / Shift keys has no behaviour.
Worlds
Any Minecraft World has this problem, for example this one: New World.zip
I don't know why this would happen. It may have something to do with the layer fighting.
I also noticed that the x1, y1, z1 text fields as well as the x2, y2, z2 text fields seem to be empty (i.e. have 0's in them) all the time, even when a box is selected.
I must be passing the wrong type in. It seems to handle it on some operating systems but not others.
Try changing line 286 in /Users/myUserName/opt/anaconda3/envs/amulet/lib/python3.11/site-packages/amulet_map_editor/programs/edit/plugins/tools/select.py to this
x1, y1, z1, x2, y2, z2 = map(int, (*point1, *point2))
Thanks, this fixes the second issue:
However the buttons still don't have any behaviour.
I just played around with some debug printlns in /Users/myUsername/opt/anaconda3/envs/amulet/lib/python3.11/site-packages/amulet_map_editor/programs/edit/plugins/tools/select.py in the _on_held function.
It seems like evt.action_ids only ever has the value {'ACT_BOX_CLICK'} or is an empty set. This means that x, y, and z will always be 0 and no nudging will occur.
There also seems to be a problem with keybindings. When I try to rebind any control, any keyboard input isn't recognized. Only the mouse input is recognized once I close the window.
This might be related.
It sounds like the button isn't active. Those controls are for the canvas. The button just uses normal clicking.
Those controls are for the canvas.
Perhaps I didn't explain properly. I know the "controls" are for navigating in the world (which works).
However, in the "Press the key you want assigned" Pop-Up-Window when changing keybindings (last post upper left), no keyboard input is recognized. Example: If I close said pop-up-window by left-clicking on the red x button, then MOUSE_LEFT is saved as the action to move forward.
So now we have two cases in which keyboard input isn't recognized (the button clicks themselves seem to be registered though (see my debug println experiments above), which I checked with some print statements) which is why I mentioned this behaviour as well.
Thanks, this fixes the second issue
I created #961 to avoid confusion.