mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 11:27:29 +00:00
remove the deprecated update checker
This commit is contained in:
7 files changed
-233
No files matched your search
@@ -44,7 +44,6 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
guiFactory = Tags.GROUPNAME + ".internal.config.LibraryGuiFactory",
|
||||
acceptableRemoteVersions = "*")
|
||||
public class FalsePatternLib {
|
||||
public static final String UPDATE_URL = "https://falsepattern.com/mc/api/v2/versions.json";
|
||||
public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(Tags.MODID);
|
||||
|
||||
@SidedProxy(clientSide = Tags.GROUPNAME + ".internal.proxy.ClientProxy",
|
||||
|
||||
@@ -31,13 +31,6 @@ public class LibraryConfig {
|
||||
ConfigurationManager.selfInit();
|
||||
}
|
||||
|
||||
@Config.Comment({"Used to control whether FalsePatternLib should check for outdated mods.",
|
||||
"If you're building a public modpack, you should turn this off so that your users don't "
|
||||
+ "get nagged about outdated mods."})
|
||||
@Config.LangKey("config.falsepatternlib.updatecheck")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean ENABLE_UPDATE_CHECKER;
|
||||
|
||||
@Config.Comment({"Fixes the mod options menu in-game.",
|
||||
"By default, the mod options when in already in a game will show \"Test1, Test2, DISABLED\" in bright red.",
|
||||
"This replaces that interface with the one from the main menu."})
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.falsepattern.lib.internal.impl.config.net.SyncReply;
|
||||
import com.falsepattern.lib.internal.impl.config.net.SyncReplyHandler;
|
||||
import com.falsepattern.lib.internal.impl.config.net.SyncRequest;
|
||||
import com.falsepattern.lib.internal.impl.config.net.SyncRequestHandler;
|
||||
import com.falsepattern.lib.updates.UpdateChecker;
|
||||
import lombok.val;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice and this permission notice
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.falsepattern.lib.updates;
|
||||
|
||||
import com.falsepattern.lib.DeprecationDetails;
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@Data
|
||||
@StableAPI(since = "0.8.0")
|
||||
@DeprecationDetails(deprecatedSince = "1.0.0",
|
||||
replacement = "None, the update checker system is being removed.")
|
||||
@DeprecationDetails.RemovedInVersion("1.1.0")
|
||||
@Deprecated
|
||||
public class ModUpdateInfo {
|
||||
@NonNull
|
||||
@StableAPI.Expose
|
||||
public final String modID;
|
||||
@NonNull
|
||||
@StableAPI.Expose
|
||||
public final String currentVersion;
|
||||
@NonNull
|
||||
@StableAPI.Expose
|
||||
public final String latestVersion;
|
||||
@NonNull
|
||||
@StableAPI.Expose
|
||||
public final String updateURL;
|
||||
|
||||
@StableAPI.Expose
|
||||
public void log(Logger logger) {
|
||||
logger.info("Updates are available for mod {}: Currently installed version is {}, "
|
||||
+ "latest available version is {}. Update URL: {}",
|
||||
modID,
|
||||
currentVersion,
|
||||
latestVersion,
|
||||
updateURL.isEmpty() ? "unavailable" : updateURL);
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice and this permission notice
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.falsepattern.lib.updates;
|
||||
|
||||
import com.falsepattern.lib.DeprecationDetails;
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@StableAPI(since = "0.8.3")
|
||||
@DeprecationDetails(deprecatedSince = "1.0.0",
|
||||
replacement = "None, the update checker system is being removed.")
|
||||
@DeprecationDetails.RemovedInVersion("1.1.0")
|
||||
@Deprecated
|
||||
public class UpdateCheckException extends Exception {
|
||||
@StableAPI.Internal
|
||||
public UpdateCheckException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
@StableAPI.Internal
|
||||
public UpdateCheckException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
@StableAPI.Internal
|
||||
public UpdateCheckException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
@StableAPI.Internal
|
||||
protected UpdateCheckException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice and this permission notice
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.falsepattern.lib.updates;
|
||||
|
||||
import com.falsepattern.lib.DeprecationDetails;
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
import com.falsepattern.lib.internal.FPLog;
|
||||
import com.falsepattern.lib.internal.Share;
|
||||
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@StableAPI(since = "0.8.0")
|
||||
@DeprecationDetails(deprecatedSince = "1.0.0",
|
||||
replacement = "None, the update checker system is being removed.")
|
||||
@DeprecationDetails.RemovedInVersion("1.1.0")
|
||||
@Deprecated
|
||||
public final class UpdateChecker {
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@StableAPI.Expose(since = "0.11.0")
|
||||
public static CompletableFuture<List<ModUpdateInfo>> fetchUpdatesAsyncV2(String url) {
|
||||
FPLog.deprecatedWarning(new Throwable());
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@StableAPI.Expose(since = "0.11.0")
|
||||
public static List<ModUpdateInfo> fetchUpdatesV2(String url) throws UpdateCheckException {
|
||||
FPLog.deprecatedWarning(new Throwable());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obsolete, marked for removal.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static List<IChatComponent> updateListToChatMessages(String initiator, List<ModUpdateInfo> updates) {
|
||||
FPLog.deprecatedWarning(new Throwable());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice and this permission notice
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This package used to contain a system for checking for updates to mods.
|
||||
* This system is being removed, and this package is being kept for backwards compatibility.
|
||||
* Reasons for removal:
|
||||
* - In older versions of the mod, this used to show a message in chat when an update was available. This was annoying and
|
||||
* not very useful, so it was removed.
|
||||
* - In 0.12, the updates were shown only in the console, which is not very visible, so people didn't notice them.
|
||||
* - The update checker system was very complicated and hard to maintain, and required externally hosted JSON files.
|
||||
* <p>
|
||||
* For anyone who wants to implement their own update checker, don't. Nobody cares about mod updates anyway,
|
||||
* they will keep playing on ancient versions of the mod no matter what you do or how many critical bugs you fix.
|
||||
*/
|
||||
@DeprecationDetails(deprecatedSince = "1.0.0",
|
||||
replacement = "None, the update checker system is being removed.")
|
||||
@DeprecationDetails.RemovedInVersion("1.1.0")
|
||||
@Deprecated
|
||||
package com.falsepattern.lib.updates;
|
||||
|
||||
import com.falsepattern.lib.DeprecationDetails;
|
||||
Reference in new issue
Block a user