InvUI v2.0.0-alpha.19
Pre-release
Pre-release
New features
- Window state tracking with
Window#setWindowState,Window#getClientWindowState. This sends a ping packet to the viewer of the window, with the acknowledgement being stored in the window's client window state. This can be used to track things like which bundle slot index is selected client-side when a bundle select handler is fired. ItemBuilder#setGlintSlotElementSupplier: an ingredient that supplies all slots of a GUI at once (and therefore has more information thanSupplier<SlotElement>)- A custom handler for exceptions from user code that were caught by InvUI can now be set using
InvUI#setExceptionHandlerthis defaults to logging the exception using the plugin's logger like before. - invui-kotlin: DSL: added
maxLinein scroll GUI DSL - invui-kotlin: Added
Inventory.get(IntRange)operator for getting anObscuredInventoryof the given slot range
Changes
ScrollGui<?>now also works with uneven line lengths and interrupted lines. Such GUIs will be treated as if there was something in front of a scroll GUI with even lines (i.e. content will be hidden "behind" those slots)ScrollGui<Gui>no longer "flattens" the GUIs if the line length doesn't match the GUI's widthPaged<Gui>&TabGuican now also have "obstructed" content list slots (e.g. holes in the layout), behaving likeScrollGui<?>PagedGui<Gui>&TabGuino longer "flattens" the GUIs if the line length doesn't match the GUI's width- Setting a gui as an ingredient in a structure no longer "flattens" the GUI if the line lengths don't match. Similarly to
TabGui, this also supports obstructed slots. Window,Gui,Itemnow implementObserver/Observable- Added overloads
Gui#notifyWindow(char),Gui#notifyWindows(char, char)to prevent calls tonotifyWindowsfrom incorrectly resolving toGui#notifyWindows(int)andGui#notifyWindow(int, int) - Removed
VirtualInventoryresizing VirtualInventory#serialize(OutputStream)andVirtualInventory#deserialize(InputStream)now throwIOExceptioninstead of catching and logging themCompositeInventoryandObscuredInventorycan now have event handlers, custom iteration order and custom gui priority- invui-kotlin: DSL: parameters of handler functions like
onClickhave been moved to the receiver
Fixes
- Fixed an issue where the items retrieved from
ReferencingInventorywere not copied