Modonomicon

Modonomicon

1M Downloads

Inconsistent max pan makes it impossible to reach certain entries / all entries can leave the screen

DaFuqs opened this issue · 2 comments

commented

Case 1

Describe the bug
I have one rather large category with entry locations ranging from x:0 - x:29.
Depending on the size of the Minecraft window, I am sometimes unable to view every entry in that category, since the category view does not allow me to pan right enough.

To Reproduce
Steps to reproduce the behavior:

  1. Create category that makes use of big x or y values of 30+
  2. Launch the game and look at the category ingame
  3. Repeatedly pan the entries as far right as possible,
  4. Notice that in some cases, some entries to the right/bottom can never be reached

Expected behavior
Me being able to consistently view all entries.

Screenshots
In all those screenshots I scrolled as far right, as I could. Not in all cases was I able to get all entry nodes on the screen.

image
image
image

Case 2

Describe the bug
In not so big categories, I am able to shift the entries in a way where not a single entry node is rendered in view anymore. Defining a limit to how much the player can move around the entries might be nice.

Expected behavior
Me being not able to shift the category screen in such a way most entries leave the screen entirely.

Screenshots
I took a random category from my book and scrolled as far up as I could. At some point I was so high that no entry was on screen anymore.

image

For both cases, the vanilla advancement screen might be a good reference point: It checks the min and max coordiates of the advancement nodes and uses that as a reference on how much the player is able to move around the nodes.

System:

  • Modonomicon Version: 1.73.0
  • OS: Windows
  • Minecraft Version: 1.20.1
commented

Hmm that is a tricky one! The whole zoom/pan stuff is super black magic to avoid issues with the background image.
Although I since added some render improvements so maybe restrictions on zoom pan can be lifted/changed. I'll experiment!

commented

I am going to add a setting for the max scroll on x and y axis.
To shift your entries to fit you can use this.entryMap().setAdditionalOffset() in additionalSetup of the category provider.
you can also use setOffset() to completely overwrite the automatically calculated offset but that is probably more work than it is worth.

The advancement screen is sadly not directly applicable as it does not feature the zoom in/out (that really messes with things).

EDIT: See https://klikli-dev.github.io/modonomicon/docs/basics/structure/categories#max_scroll_x-integer-optional and below