Amulet-Map-Editor icon indicating copy to clipboard operation
Amulet-Map-Editor copied to clipboard

[Bug Report] Selection box not movable by buttons

Open Scroogeee opened this issue 2 years ago • 9 comments

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:

  1. Open a world in Amulet
  2. Select some area by left clicking
  3. 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
  4. 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

Bildschirmfoto 2023-08-26 um 19 40 50

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

Scroogeee avatar Aug 26 '23 17:08 Scroogeee

I don't know why this would happen. It may have something to do with the layer fighting.

gentlegiantJGC avatar Aug 26 '23 19:08 gentlegiantJGC

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.

Scroogeee avatar Aug 27 '23 10:08 Scroogeee

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))

gentlegiantJGC avatar Aug 27 '23 10:08 gentlegiantJGC

Thanks, this fixes the second issue: Bildschirmfoto 2023-08-27 um 12 22 58

However the buttons still don't have any behaviour.

Scroogeee avatar Aug 27 '23 10:08 Scroogeee

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.

Scroogeee avatar Aug 27 '23 11:08 Scroogeee

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.

Bildschirmfoto 2023-08-27 um 13 09 40

Scroogeee avatar Aug 27 '23 11:08 Scroogeee

It sounds like the button isn't active. Those controls are for the canvas. The button just uses normal clicking.

gentlegiantJGC avatar Aug 27 '23 12:08 gentlegiantJGC

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.

Scroogeee avatar Aug 27 '23 21:08 Scroogeee

Thanks, this fixes the second issue

I created #961 to avoid confusion.

Scroogeee avatar Sep 02 '23 13:09 Scroogeee