From c1541b47cc2c549fbb47f9b1be85c9371db201c2 Mon Sep 17 00:00:00 2001 From: codedsakura Date: Sat, 11 Jun 2022 14:14:27 +0300 Subject: [PATCH] update to 1.19 --- .editorconfig | 3 +++ build.gradle | 3 ++- gradle.properties | 6 +++--- .../java/dev/codedsakura/blossom/tpa/BlossomTpa.java | 11 +++++++---- src/main/resources/fabric.mod.json | 2 +- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7226357..6d94d96 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ ij_continuation_indent_size = 8 [*.{json,md}] indent_size = 2 + +[*.properties] +ij_properties_keep_blank_lines = true diff --git a/build.gradle b/build.gradle index b055448..c905a48 100644 --- a/build.gradle +++ b/build.gradle @@ -4,10 +4,11 @@ plugins { id 'maven-publish' } -version = project.mod_version +version = "${project.mod_version}+${project.minecraft_version}" group = project.maven_group repositories { + mavenLocal() maven { url "https://maven.pkg.github.com/BlossomMods/BlossomLib" credentials { diff --git a/gradle.properties b/gradle.properties index e552c70..593f3f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,9 +8,9 @@ archives_base_name=blossom-tpa # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.18.2 -yarn_mappings=build.3 -loader_version=0.14.3 +minecraft_version=1.19 +yarn_mappings=build.2 +loader_version=0.14.7 # Dependencies blossomlib_version=1.2.0 diff --git a/src/main/java/dev/codedsakura/blossom/tpa/BlossomTpa.java b/src/main/java/dev/codedsakura/blossom/tpa/BlossomTpa.java index ca90a66..c57ea16 100644 --- a/src/main/java/dev/codedsakura/blossom/tpa/BlossomTpa.java +++ b/src/main/java/dev/codedsakura/blossom/tpa/BlossomTpa.java @@ -56,6 +56,9 @@ public void onInitialize() { private int runTpa(CommandContext ctx, boolean tpaHere) throws CommandSyntaxException { ServerPlayerEntity initiator = ctx.getSource().getPlayer(); + if (initiator == null) { + throw ServerCommandSource.REQUIRES_PLAYER_EXCEPTION.create(); + } ServerPlayerEntity receiver = EntityArgumentType.getPlayer(ctx, "target"); if (initiator.equals(receiver)) { @@ -124,7 +127,7 @@ private int resolveTpa(CommandContext ctx, ServerPlayerEnti return Command.SINGLE_SUCCESS; } - private int resolveTpaAuto(CommandContext ctx, ResolveState resolveState) throws CommandSyntaxException { + private int resolveTpaAuto(CommandContext ctx, ResolveState resolveState) { List candidates; if (resolveState == ResolveState.CANCEL) { ServerPlayerEntity initiator = ctx.getSource().getPlayer(); @@ -152,7 +155,7 @@ private int resolveTpaAuto(CommandContext ctx, ResolveState } - private int acceptTpaAuto(CommandContext ctx) throws CommandSyntaxException { + private int acceptTpaAuto(CommandContext ctx) { return resolveTpaAuto(ctx, ResolveState.ACCEPT); } @@ -163,7 +166,7 @@ private int acceptTpaTarget(CommandContext ctx) throws Comm } - private int denyTpaAuto(CommandContext ctx) throws CommandSyntaxException { + private int denyTpaAuto(CommandContext ctx) { return resolveTpaAuto(ctx, ResolveState.DENY); } @@ -174,7 +177,7 @@ private int denyTpaTarget(CommandContext ctx) throws Comman } - private int cancelTpaAuto(CommandContext ctx) throws CommandSyntaxException { + private int cancelTpaAuto(CommandContext ctx) { return resolveTpaAuto(ctx, ResolveState.CANCEL); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 733080b..afd172d 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -22,7 +22,7 @@ "mixins": [], "depends": { "fabricloader": ">=0.14.3", - "minecraft": "1.18.2", + "minecraft": "1.19.x", "blossom-lib": "^${blossomlib_version}" }, "suggests": {