Minecraft 1.21.11
SheepLib now targets Minecraft 1.21.11, which completely reworked text rendering, which has resulted in some SheepLib changes:
- SheepLib's custom text widgets (
ClickableTextWidgetandClickableMultiLineTextWidget) have been removed in favour of their vanilla counterpartsStringWidgetandMultiLineTextWidget. - The vanilla widgets need to be configured with a click handler in order to handle click events. SheepLib now provides the
TextWidgetsutil object to do this:TextWidgets.singleLineandTextWidgets.multiLinecreate new string widgets with click handlers preconfigured<T : AbstractStringWidget> T.withSheepLibClickHandlerinstalls SheepLib's click handler onto an existing widget- Alternatively, set your own handler with
AbstractStringWidget.setComponentClickHandler.
Other changes
- Update to Kotlin 2.3.0.
- Fixed a bug where dialogs could be dragged with right click in a very buggy way.
- Added
MinecraftDispatchers.Mainto the coroutines module, which runs coroutines on the render thread. - Fixed padding not correctly being applied for linear layouts.
- Added
LinearLayoutBuilder.defaultAlignmentfunction to set how items are aligned by default. - Added missing property
ComponentBuilder.italic.
Full Changelog: v1.4.7...v1.5.0