Skip to content

Commit

Permalink
update to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
CodedSakura committed Jun 11, 2022
1 parent 78a4aa0 commit c1541b4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ ij_continuation_indent_size = 8

[*.{json,md}]
indent_size = 2

[*.properties]
ij_properties_keep_blank_lines = true
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions src/main/java/dev/codedsakura/blossom/tpa/BlossomTpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public void onInitialize() {

private int runTpa(CommandContext<ServerCommandSource> 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)) {
Expand Down Expand Up @@ -124,7 +127,7 @@ private int resolveTpa(CommandContext<ServerCommandSource> ctx, ServerPlayerEnti
return Command.SINGLE_SUCCESS;
}

private int resolveTpaAuto(CommandContext<ServerCommandSource> ctx, ResolveState resolveState) throws CommandSyntaxException {
private int resolveTpaAuto(CommandContext<ServerCommandSource> ctx, ResolveState resolveState) {
List<TpaRequest> candidates;
if (resolveState == ResolveState.CANCEL) {
ServerPlayerEntity initiator = ctx.getSource().getPlayer();
Expand Down Expand Up @@ -152,7 +155,7 @@ private int resolveTpaAuto(CommandContext<ServerCommandSource> ctx, ResolveState
}


private int acceptTpaAuto(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException {
private int acceptTpaAuto(CommandContext<ServerCommandSource> ctx) {
return resolveTpaAuto(ctx, ResolveState.ACCEPT);
}

Expand All @@ -163,7 +166,7 @@ private int acceptTpaTarget(CommandContext<ServerCommandSource> ctx) throws Comm
}


private int denyTpaAuto(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException {
private int denyTpaAuto(CommandContext<ServerCommandSource> ctx) {
return resolveTpaAuto(ctx, ResolveState.DENY);
}

Expand All @@ -174,7 +177,7 @@ private int denyTpaTarget(CommandContext<ServerCommandSource> ctx) throws Comman
}


private int cancelTpaAuto(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException {
private int cancelTpaAuto(CommandContext<ServerCommandSource> ctx) {
return resolveTpaAuto(ctx, ResolveState.CANCEL);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"mixins": [],
"depends": {
"fabricloader": ">=0.14.3",
"minecraft": "1.18.2",
"minecraft": "1.19.x",
"blossom-lib": "^${blossomlib_version}"
},
"suggests": {
Expand Down

0 comments on commit c1541b4

Please sign in to comment.