Skip to content

4.0 migration guide

Juuxel edited this page May 27, 2021 · 2 revisions
  • Replace all ScreenDrawing methods that don't take MatrixStacks with their MatrixStack variants.
  • CottonHud methods are now static, so replace CottonHud.INSTANCE with CottonHud.
  • Default background painters no longer have any padding applied. If you're manually setting a root panel, you can achieve the same end result by doing setInsets(Insets.ROOT_PANEL) on your root panel. This must be done before adding any widgets!
  • Any mouse handling methods now return an InputResult describing whether the input action was processed or ignored. As a rule of thumb: If your widget responds to doing things with the mouse, return PROCESSED.
  • Replace LibGuiClient.config.darkMode with LibGui.isDarkMode()