NichtStudioCode / InvUI

A spigot library for creating custom inventory-based GUIs.
MIT License
242 stars 19 forks source link

PageItem class are broken from 1.13-1.19 #53

Closed PizzaThatCodes closed 9 months ago

PizzaThatCodes commented 11 months ago

Using a PagedGUI with trying the examples of the Forward/Back buttons on the documentation causes the buttons to not switch the pages. The last working version of the Forward/Back items is InvUI version 1.12, not sure if one of the functions changed and the documentation hasn't been updated, or if the check was removed.

NichtStudioCode commented 11 months ago

Works fine for me on InvUI v1.19 with Spigot 1.20.2

https://github.com/NichtStudioCode/InvUI/assets/51272202/44bc22ff-3686-4e9d-82c0-4a273d3d55a9

PizzaThatCodes commented 11 months ago

Currently running version InvUI 1.19 (I tried 1.18, 1.19, 1.13, and 1.12 worked) the server is Pufferfish version git-Pufferfish-15 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 30537a0 on HEAD)

Using default items that were on https://xenondevs.xyz/docs/invui/guis/paged/ (except for the ArrayList)

When using ArrayList<Item> items = new ArrayList<>();` using AbstractItem for each of the items. It seems to get all the correct items from the ArrayList for the first page, but when trying to switch the page does not work at all, zero errors inside the console, and the items are the same on the first page. Without changing any of the code 1.12 works perfectly fine, switching between the pages, while 1.13,1.18,1.19 doesn't. Something must of changed between 1.12 and 1.13 to cause AbstractItem inside of the arraylist to somehow break switching pages I guess.

The example list does appear to work, but yeah, to use an ArrayList with abstract items appear to break it quietly for some reason which makes no sense.

It's weird how it works on 1.12 compared to 1.13, 1.18, 1.19 though, not sure why tbh.