Minecraft 1.21 (#500)

* 1.21

* address URL constructor deprecation

* Update metadata

* Update loom to 1.7
This commit is contained in:
Jason Penilla authored and GitHub committed 2024-07-05 10:01:23 -07:00
1 parent c9a3f2c35d
commit 6b786911b7
8 files changed
+16 -13

No files matched your search

@@ -81,7 +81,8 @@ publishMods.modrinth {
minecraftVersions.addAll( minecraftVersions.addAll(
"1.20.4", "1.20.4",
"1.20.5", "1.20.5",
"1.20.6" "1.20.6",
"1.21",
) )
} }
+1 -1
View File
@@ -18,7 +18,7 @@ hangarPublish.publications.register("plugin") {
apiKey = providers.environmentVariable("HANGAR_UPLOAD_KEY") apiKey = providers.environmentVariable("HANGAR_UPLOAD_KEY")
platforms.paper { platforms.paper {
jar = project(":carbonchat-paper").platformJar() jar = project(":carbonchat-paper").platformJar()
platformVersions.add("1.20.4-1.20.6") platformVersions.add("1.20.4-1.21")
dependencies { dependencies {
url("LuckPerms", "https://luckperms.net/") url("LuckPerms", "https://luckperms.net/")
hangar("Essentials") { hangar("Essentials") {
@@ -27,6 +27,7 @@ import java.io.InputStreamReader;
import java.io.Reader; import java.io.Reader;
import java.io.Writer; import java.io.Writer;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@@ -98,7 +99,7 @@ public final class CarbonMessageSource implements IMessageSource<Audience, Strin
if (sourceUrl.getProtocol().equals("jar")) { if (sourceUrl.getProtocol().equals("jar")) {
final int exclamationIdx = sourceUrl.getPath().lastIndexOf('!'); final int exclamationIdx = sourceUrl.getPath().lastIndexOf('!');
if (exclamationIdx != -1) { 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()); return Paths.get(sourceUrl.toURI());
@@ -27,6 +27,7 @@ import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.URI;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
@@ -92,7 +93,7 @@ public record UpdateChecker(Logger logger) {
private Releases fetchReleases() throws IOException { private Releases fetchReleases() throws IOException {
final JsonArray result; 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); result = GSON.fromJson(reader, JsonArray.class);
} }
@@ -117,7 +118,7 @@ public record UpdateChecker(Logger logger) {
} }
final String classFilePath = resource.toString().replace("\\", "/"); final String classFilePath = resource.toString().replace("\\", "/");
final String archivePath = classFilePath.substring(0, classFilePath.length() - classLocation.length()); 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); return new Manifest(stream);
} catch (final IOException ex) { } catch (final IOException ex) {
return null; return null;
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
public class FabricChatHandler extends ChatListenerInternal implements ServerMessageEvents.AllowChatMessage { 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 final CarbonChatFabric carbonChat;
private @MonotonicNonNull ResourceKey<ChatType> chatTypeResourceKey; private @MonotonicNonNull ResourceKey<ChatType> chatTypeResourceKey;
+2 -2
View File
@@ -24,11 +24,11 @@
"carbonchat.mixins.json" "carbonchat.mixins.json"
], ],
"depends": { "depends": {
"fabricloader": ">=0.15.4", "fabricloader": ">=0.15.11",
"fabric": "*", "fabric": "*",
"cloud": "*", "cloud": "*",
"adventure-platform-fabric": "*", "adventure-platform-fabric": "*",
"minecraft": "~1.20.4", "minecraft": "~1.21",
"luckperms": ">=5.0.0" "luckperms": ">=5.0.0"
}, },
"suggests": { "suggests": {
+4 -4
View File
@@ -12,7 +12,7 @@ mod-publish-plugin = "0.5.1"
gremlin = "0.0.6" gremlin = "0.0.6"
runTask = "2.3.0" runTask = "2.3.0"
adventure = "4.16.0" adventure = "4.17.0"
cloud = "2.0.0-rc.2" cloud = "2.0.0-rc.2"
cloudMinecraft = "2.0.0-beta.9" cloudMinecraft = "2.0.0-beta.9"
cloudModded = "2.0.0-beta.7" cloudModded = "2.0.0-beta.7"
@@ -29,11 +29,11 @@ registry = "1.0.0-SNAPSHOT"
kyoriMoonshine = "2.0.4" kyoriMoonshine = "2.0.4"
guice = "7.0.0" guice = "7.0.0"
velocityApi = "3.3.0-SNAPSHOT" velocityApi = "3.3.0-SNAPSHOT"
minecraft = "1.20.6" minecraft = "1.21"
fabricLoader = "0.15.11" fabricLoader = "0.15.11"
fabricApi = "0.100.4+1.20.6" fabricApi = "0.100.4+1.21"
fabricPermissionsApi = "0.3.1" fabricPermissionsApi = "0.3.1"
adventurePlatformFabric = "5.13.0" adventurePlatformFabric = "5.14.0"
luckPermsApi = "5.4" luckPermsApi = "5.4"
essentialsx = "2.20.1" essentialsx = "2.20.1"
discordsrv = "1.27.0" discordsrv = "1.27.0"
+1 -1
View File
@@ -77,7 +77,7 @@ pluginManagement {
plugins { plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" 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" rootProject.name = "CarbonChat"