Releases: NichtStudioCode/InvUI
Releases · NichtStudioCode/InvUI
InvUI v2.0.0-alpha.19
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#setGlint
SlotElementSupplier
: 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#setExceptionHandler
this defaults to logging the exception using the plugin's logger like before. - invui-kotlin: DSL: added
maxLine
in scroll GUI DSL - invui-kotlin: Added
Inventory.get(IntRange)
operator for getting anObscuredInventory
of 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>
&TabGui
can now also have "obstructed" content list slots (e.g. holes in the layout), behaving likeScrollGui<?>
PagedGui<Gui>
&TabGui
no 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
,Item
now implementObserver
/Observable
- Added overloads
Gui#notifyWindow(char)
,Gui#notifyWindows(char, char)
to prevent calls tonotifyWindows
from incorrectly resolving toGui#notifyWindows(int)
andGui#notifyWindow(int, int)
- Removed
VirtualInventory
resizing VirtualInventory#serialize(OutputStream)
andVirtualInventory#deserialize(InputStream)
now throwIOException
instead of catching and logging themCompositeInventory
andObscuredInventory
can now have event handlers, custom iteration order and custom gui priority- invui-kotlin: DSL: parameters of handler functions like
onClick
have been moved to the receiver
Fixes
- Fixed an issue where the items retrieved from
ReferencingInventory
were not copied
InvUI v2.0.0-alpha.18
New features
invui-kotlin
: DSL: addedingredients { }
block for sharing ingredients between guis on the same "layer"invui-kotlin
: DSL: improved provider dsl properties: you can now call provider functions like.map { }
on provider dsl properties while still being able to swap out the underlying provider withby
Changes
- Packet listeners are now injected at an earlier
PlayerJoinEvent
stage. This allows listeners onPlayerJoinEvent
with normal priority to reliably open windows - Improved exception messages when trying to bind a specialized BoundItem to an unsupported gui type
Fixes
- Fixed an issue where
Gui.notifyWindows(char key, char... keys)
would only notify the elements of the first key - Fixed an issue where scroll guis with no content list slots would try to divide by zero and throw an exception
- Fixed an issue where
frozen
,ignoreObscuredInventorySlots
, andbackground
were ignored when building normal guis
InvUI v2.0.0-alpha.17
Java code examples are now available in the InvUI Documentation
New features
invui-kotlin
: Added experimental dsl for creating windows, guis, and items- Added overloads for
Item.Builder#addClickHandler
,Item.Builder#addBundleSelectHandler
accepting functional interfaces with fewer arguments - Added
Item#EMPTY
- an empty item that does nothing
Changes
- Exceptions thrown in user code (e.g. in
Item#getItemProvider
) are now caught and logged in more scenarios - The gui of the merged window (
Window#mergedBuilder
) now defaults to an empty gui of dimensions (9, 10) (previously this threw an exception if left unspecified)
InvUI v2.0.0-alpha.16
Alongside the Javadoc, there is now also additional documentation available for InvUI v2. Note that this documentation is not yet fully complete. Most notably, all code examples are currently only in Kotlin.
New features
- Added
BrewingWindow
,GrindstoneWindow
,SmithingWindow
- Cartography windows now support setting the view mode (normal, duplicate, small, lock)
- Inventory gui priority and iteration order is now categorized
- Animations can now be configured to not freeze the gui
- Bound items can now be unbound and will be automatically unbound if removed from the gui
Changes
- Renamed
CraftingTableWindow
toCraftingWindow
CartographyWindow
: RenamedoutputGui
toresultGui
, MovedMapIcon
,MapPatch
toCartographyWindow.MapIcon
,CartographyWindow.MapPatch
Animation
no longer holds state. This was moved to a newAnimation.State
class- Localization now uses the mini message translator. This means that arguments are now referenced with
<arg:index>
instead of%s
- Slot element suppliers for inventories and guis will now throw an exception if they've reached their end instead of cycling back to the first slot
- Windows no longer write the slot number of all displayed UI items into their persistent data container
invui-kotlin
: removed provider-combining overloads forItem.Builder
, added provider-mapping overloads (without combing, so only one provider) to everything
Fixes
- Fixed an issue where an exception was thrown when creating a
StonecutterWindow
without defining the buttons gui - Fixed an issue where an incorrect enchantment cost would be displayed in the
AnvilWindow
- Fixed an issue where the cartography window would not show the result slot if the input slot is empty
- Fixed various issues where inventory interactions would ignore the Gui's frozen state
InvUI v2.0.0-alpha.15
- Fixed an issue where InvUI's internal netty channel handler name was not unique
InvUI v2.0.0-alpha.14
- Updated to 1.21.6
- Removed
Gui#remove(...)
in favor ofGui#setSlotElement(..., null)
- Added
CraftingTableWindow
andFurnaceWindow
InvUI v1.46
- 1.21.6 Support
InvUI v2.0.0-alpha.13
- invui-kotlin: Updated
commons-provider
InvUI v2.0.0-alpha.12
- Updated to Paper 1.21.5-76
InvUI v2.0.0-alpha.11
- Fixed an issue where windows would not work if ProtocolLib was installed