diff --git a/common/src/main/java/com/unlikepaladin/pfm/client/screens/widget/PFMOptionListWidget.java b/common/src/main/java/com/unlikepaladin/pfm/client/screens/widget/PFMOptionListWidget.java index e9f976182..58ba09649 100644 --- a/common/src/main/java/com/unlikepaladin/pfm/client/screens/widget/PFMOptionListWidget.java +++ b/common/src/main/java/com/unlikepaladin/pfm/client/screens/widget/PFMOptionListWidget.java @@ -68,12 +68,14 @@ public PFMOptionListWidget(PFMConfigScreen parent, MinecraftClient client) { PFMRuntimeResources.runAsyncResourceGen(); MinecraftClient.getInstance().reloadResourcesConcurrently(); })); - this.addEntry(new ButtonEntry(Side.SERVER, new TranslatableText("pfm.option.regenData"), new TranslatableText("pfm.config.regen"), new TranslatableText("pfm.option.regenData.tooltip"), button -> { + ButtonEntry entry = new ButtonEntry(Side.SERVER, new TranslatableText("pfm.option.regenData"), new TranslatableText("pfm.config.regen"), new TranslatableText("pfm.option.regenData.tooltip"), button -> { PFMFileUtil.deleteDir(PFMRuntimeResources.getDataPackDirectory().toFile()); PFMDataGenerator.FROZEN = false; PFMRuntimeResources.prepareAsyncDataGen(true); PFMRuntimeResources.runAsyncResourceGen(); - })); + }); + entry.button.active = !PFMConfigScreen.isOnServer; + this.addEntry(entry); } public void save() {