Modonomicon

Modonomicon

29M Downloads

in datagen, category offset gets calculated using map dimensions before removal of whitespace

Tina-Joos opened this issue ยท 0 comments

commented

Describe the bug
in my datagen code, I use entry maps with a lot of spaces to make room for more readable location names, like this:

@Override
    protected String[] generateEntryMap() {
        return new String[]{
                "_   _   _   _   _   _   _   _   _   _   _   _   _   _   ",
                "_   (g1)_   (w1)_   (e1)_   _   (st)_   _   (+1)_   (#1)",
                "_   (g2)_   (w2)_   (e2)_   _   _   _   _   (+2)_   _   ",
                "_   (g3)_   (w3)_   (e3)_   _   _   _   _   _   _   _   ",
                "_   (g4)_   _   _   (e4)_   _   (dw)_   _   _   _   _   ",
                "_   _   _   _   _   (e5)_   _   _   _   _   _   _   _   ",
                "_   _   _   _   _   _   _   _   _   _   _   _   _   _   ",
                "_   _   _   _   _   _   _   _   _   _   _   _   _   _   "
        };
    }

when i put the generated data into the game and try to look at the category, everything is shifted way to the left and some entries are off-screen, even when fully zoomed out.

To Reproduce
Steps to reproduce the behavior:

  1. Run datagen with an entry map similarly laid out to the one provided above
  2. Open a book containing the generated category
  3. Zoom out all the way to be able to see just the rightmost entries

Expected behavior
Being able to see all the entries

Screenshots

Image

System (please complete the following information):

  • Modonomicon Version: 1.77.3
  • OS: Win11
  • Minecraft Version: 1.20.1
  • Modpack Link and Version, or list of mods: I'm developing

Additional context
I included a suggested fix in the provided screenshot.
What I think happened here is just that a couple "this"s were forgotten in CategoryEntryMap.setMap.