Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel force_shown does not work #2471

Open
tastybento opened this issue Aug 19, 2024 · 1 comment
Open

Panel force_shown does not work #2471

tastybento opened this issue Aug 19, 2024 · 1 comment

Comments

@tastybento
Copy link
Member

Expected behavior

If the panel yml has force_shown: 6 then the panel should show 6 rows

Observed/Actual behavior

It does not change.

Steps/models to reproduce

Example on the cobble stone generator:

main_panel:
  title: stone-generator.gui.titles.player-panel
  type: INVENTORY
  background:
    icon: BLACK_STAINED_GLASS_PANE
    title: "&b&r" # Empty text
  border:
    icon: BLACK_STAINED_GLASS_PANE
    title: "&b&r"  # Empty text
  force-shown: 6

BentoBox version

2.5.0

Plugin list

No response

Other

No response

@tastybento
Copy link
Member Author

Line 136 of TemplatedPanel.

  • Why is a boolean array used for what is essentially just a number?
  • If the itemArrray doesn't have sufficient rows to begin with then it won't be reduced anyway.
  • forcedRows should be used to make the GUI big to begin with, not in this method

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

No branches or pull requests

1 participant