Skip to content

v1.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Jan 22:31
· 1 commit to main since this release
b07d98e

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 (ClickableTextWidget and ClickableMultiLineTextWidget) have been removed in favour of their vanilla counterparts StringWidget and MultiLineTextWidget.
  • The vanilla widgets need to be configured with a click handler in order to handle click events. SheepLib now provides the TextWidgets util object to do this:
    • TextWidgets.singleLine and TextWidgets.multiLine create new string widgets with click handlers preconfigured
    • <T : AbstractStringWidget> T.withSheepLibClickHandler installs 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.Main to the coroutines module, which runs coroutines on the render thread.
  • Fixed padding not correctly being applied for linear layouts.
  • Added LinearLayoutBuilder.defaultAlignment function to set how items are aligned by default.
  • Added missing property ComponentBuilder.italic.

Full Changelog: v1.4.7...v1.5.0