Properly disable clientside "Cancel all tasks" button in pattern screen when player is in creative

This commit is contained in:
DBotThePony 2025-02-09 13:51:07 +07:00
parent 691fe66797
commit 61343b416f
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -84,7 +84,10 @@ class MatterPanelScreen(
{ menu.cancelAll.accept(null) }
)
}
).also { it.tooltips.add(TranslatableComponent("otm.gui.matter_panel.cancel_all")) }
).also {
it.tooltips.add(TranslatableComponent("otm.gui.matter_panel.cancel_all"))
it.isDisabled = !menu.cancelAll.test(minecraft!!.player!!)
}
)
val scrollBar = DiscreteScrollBarPanel(this, frame, {