mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 06:28:54 +00:00
Minecraft 1.21 (#500)
* 1.21 * address URL constructor deprecation * Update metadata * Update loom to 1.7
This commit is contained in:
1 parent
c9a3f2c35d
commit
6b786911b7
8 files changed
+16
-13
No files matched your search
@@ -81,7 +81,8 @@ publishMods.modrinth {
|
||||
minecraftVersions.addAll(
|
||||
"1.20.4",
|
||||
"1.20.5",
|
||||
"1.20.6"
|
||||
"1.20.6",
|
||||
"1.21",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ hangarPublish.publications.register("plugin") {
|
||||
apiKey = providers.environmentVariable("HANGAR_UPLOAD_KEY")
|
||||
platforms.paper {
|
||||
jar = project(":carbonchat-paper").platformJar()
|
||||
platformVersions.add("1.20.4-1.20.6")
|
||||
platformVersions.add("1.20.4-1.21")
|
||||
dependencies {
|
||||
url("LuckPerms", "https://luckperms.net/")
|
||||
hangar("Essentials") {
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -98,7 +99,7 @@ public final class CarbonMessageSource implements IMessageSource<Audience, Strin
|
||||
if (sourceUrl.getProtocol().equals("jar")) {
|
||||
final int exclamationIdx = sourceUrl.getPath().lastIndexOf('!');
|
||||
if (exclamationIdx != -1) {
|
||||
sourceUrl = new URL(sourceUrl.getPath().substring(0, exclamationIdx));
|
||||
sourceUrl = URI.create(sourceUrl.getPath().substring(0, exclamationIdx)).toURL();
|
||||
}
|
||||
}
|
||||
return Paths.get(sourceUrl.toURI());
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
@@ -92,7 +93,7 @@ public record UpdateChecker(Logger logger) {
|
||||
|
||||
private Releases fetchReleases() throws IOException {
|
||||
final JsonArray result;
|
||||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("https://api.github.com/repos/%s/releases".formatted(GITHUB_REPO)).openStream(), StandardCharsets.UTF_8))) {
|
||||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(URI.create("https://api.github.com/repos/%s/releases".formatted(GITHUB_REPO)).toURL().openStream(), StandardCharsets.UTF_8))) {
|
||||
result = GSON.fromJson(reader, JsonArray.class);
|
||||
}
|
||||
|
||||
@@ -117,7 +118,7 @@ public record UpdateChecker(Logger logger) {
|
||||
}
|
||||
final String classFilePath = resource.toString().replace("\\", "/");
|
||||
final String archivePath = classFilePath.substring(0, classFilePath.length() - classLocation.length());
|
||||
try (final InputStream stream = new URL(archivePath + "/META-INF/MANIFEST.MF").openStream()) {
|
||||
try (final InputStream stream = URI.create(archivePath + "/META-INF/MANIFEST.MF").toURL().openStream()) {
|
||||
return new Manifest(stream);
|
||||
} catch (final IOException ex) {
|
||||
return null;
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class FabricChatHandler extends ChatListenerInternal implements ServerMessageEvents.AllowChatMessage {
|
||||
|
||||
public static final ResourceLocation CHAT_TYPE_KEY = new ResourceLocation("carbonchat", "chat");
|
||||
public static final ResourceLocation CHAT_TYPE_KEY = ResourceLocation.fromNamespaceAndPath("carbonchat", "chat");
|
||||
|
||||
private final CarbonChatFabric carbonChat;
|
||||
private @MonotonicNonNull ResourceKey<ChatType> chatTypeResourceKey;
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
"carbonchat.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.15.4",
|
||||
"fabricloader": ">=0.15.11",
|
||||
"fabric": "*",
|
||||
"cloud": "*",
|
||||
"adventure-platform-fabric": "*",
|
||||
"minecraft": "~1.20.4",
|
||||
"minecraft": "~1.21",
|
||||
"luckperms": ">=5.0.0"
|
||||
},
|
||||
"suggests": {
|
||||
|
||||
@@ -12,7 +12,7 @@ mod-publish-plugin = "0.5.1"
|
||||
gremlin = "0.0.6"
|
||||
runTask = "2.3.0"
|
||||
|
||||
adventure = "4.16.0"
|
||||
adventure = "4.17.0"
|
||||
cloud = "2.0.0-rc.2"
|
||||
cloudMinecraft = "2.0.0-beta.9"
|
||||
cloudModded = "2.0.0-beta.7"
|
||||
@@ -29,11 +29,11 @@ registry = "1.0.0-SNAPSHOT"
|
||||
kyoriMoonshine = "2.0.4"
|
||||
guice = "7.0.0"
|
||||
velocityApi = "3.3.0-SNAPSHOT"
|
||||
minecraft = "1.20.6"
|
||||
minecraft = "1.21"
|
||||
fabricLoader = "0.15.11"
|
||||
fabricApi = "0.100.4+1.20.6"
|
||||
fabricApi = "0.100.4+1.21"
|
||||
fabricPermissionsApi = "0.3.1"
|
||||
adventurePlatformFabric = "5.13.0"
|
||||
adventurePlatformFabric = "5.14.0"
|
||||
luckPermsApi = "5.4"
|
||||
essentialsx = "2.20.1"
|
||||
discordsrv = "1.27.0"
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||
id("quiet-fabric-loom") version "1.6-SNAPSHOT"
|
||||
id("quiet-fabric-loom") version "1.7-SNAPSHOT"
|
||||
}
|
||||
|
||||
rootProject.name = "CarbonChat"
|
||||
|
||||
Reference in new issue
Block a user