diff --git a/src/main/java/com/cleanroommc/modularui/widget/WidgetTree.java b/src/main/java/com/cleanroommc/modularui/widget/WidgetTree.java index 1ba6c55ef..e136014f5 100644 --- a/src/main/java/com/cleanroommc/modularui/widget/WidgetTree.java +++ b/src/main/java/com/cleanroommc/modularui/widget/WidgetTree.java @@ -8,6 +8,7 @@ import com.cleanroommc.modularui.api.widget.IGuiElement; import com.cleanroommc.modularui.api.widget.ISynced; import com.cleanroommc.modularui.api.widget.IWidget; +import com.cleanroommc.modularui.network.NetworkUtils; import com.cleanroommc.modularui.screen.ModularPanel; import com.cleanroommc.modularui.screen.viewport.ModularGuiContext; import com.cleanroommc.modularui.theme.WidgetTheme; @@ -231,6 +232,7 @@ public static void onUpdate(IWidget parent) { } public static void resize(IWidget parent) { + if (!NetworkUtils.isClient()) return; // TODO check if widget has a parent which depends on its children // resize each widget and calculate their relative pos if (!resizeWidget(parent, true) && !resizeWidget(parent, false)) {