diff --git a/build.gradle b/build.gradle index 3ea6d8c..14c7ecd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import net.fabricmc.loom.task.RemapJarTask plugins { - id 'fabric-loom' version '1.10-SNAPSHOT' + id 'fabric-loom' version '1.11-SNAPSHOT' id 'io.github.ladysnake.chenille' version '0.14.0' } diff --git a/gradle.properties b/gradle.properties index fbf8e46..02c9ffb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx4G # Fabric Properties # check these on https://fabricmc.net/use -minecraft_version=1.21.6 -yarn_mappings=1.21.6+build.1 -loader_version=0.16.14 +minecraft_version=1.21.9-rc1 +yarn_mappings=1.21.9-rc1+build.1 +loader_version=0.17.2 # Fabric API -fabric_version=0.127.0+1.21.6 +fabric_version=0.133.13+1.21.9 elmendorf_version = 0.15.0 # Mod Properties -mod_version = 1.14.0 +mod_version = 1.15.0 maven_group = io.github.ladysnake archives_base_name = pal @@ -22,7 +22,7 @@ display_name = PlayerAbilityLib license_header = LGPL gpl_version = 3 curseforge_id = 359522 -curseforge_versions = 1.21.6 +curseforge_versions = 1.21.9-snapshot cf_requirements = fabric-api modrinth_id = DHQA06r4 release_type = release diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f853b..ca025c8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/io/github/ladysnake/pal/impl/PlayerAbilityView.java b/src/main/java/io/github/ladysnake/pal/impl/PlayerAbilityView.java index a3c401a..f8090cd 100644 --- a/src/main/java/io/github/ladysnake/pal/impl/PlayerAbilityView.java +++ b/src/main/java/io/github/ladysnake/pal/impl/PlayerAbilityView.java @@ -42,7 +42,7 @@ public interface PlayerAbilityView { * @return a view for the player's abilities */ static PlayerAbilityView of(PlayerEntity player) { - if (player.getWorld().isClient) { + if (player.getEntityWorld().isClient()) { throw new IllegalStateException("Player abilities must be accessed from the logical server (check !world.isClient)"); } return (PlayerAbilityView) player; diff --git a/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java b/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java index be66d5a..7bcc524 100644 --- a/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java +++ b/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java @@ -73,8 +73,8 @@ public void checkConflict() { } private static GameMode getGamemode(PlayerEntity player) { - if (player.getWorld().isClient) { - PlayerListEntry playerListEntry = Objects.requireNonNull(MinecraftClient.getInstance().getNetworkHandler()).getPlayerListEntry(player.getGameProfile().getId()); + if (player.getEntityWorld().isClient()) { + PlayerListEntry playerListEntry = Objects.requireNonNull(MinecraftClient.getInstance().getNetworkHandler()).getPlayerListEntry(player.getGameProfile().id()); return playerListEntry != null ? playerListEntry.getGameMode() : GameMode.SURVIVAL; } else { return ((ServerPlayerEntity) player).interactionManager.getGameMode(); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 495b31f..f51940f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -27,8 +27,8 @@ } ], "depends": { - "fabric": "*", - "minecraft": ">=1.19.3" + "fabric-api": "*", + "minecraft": ">=1.21.9-" }, "custom": { "modmenu:api": true diff --git a/src/main/resources/mixins.playerabilitylib.common.json b/src/main/resources/mixins.playerabilitylib.common.json index 182f8b9..05ada9e 100644 --- a/src/main/resources/mixins.playerabilitylib.common.json +++ b/src/main/resources/mixins.playerabilitylib.common.json @@ -1,7 +1,7 @@ { "required": true, "package": "io.github.ladysnake.pal.impl.mixin", - "compatibilityLevel": "JAVA_17", + "compatibilityLevel": "JAVA_21", "minVersion": "0.7.11-SNAPSHOT", "mixins": [ "ServerPlayerEntityMixin", diff --git a/src/testmod/java/io/github/ladysnake/paltest/BadFlightItem.java b/src/testmod/java/io/github/ladysnake/paltest/BadFlightItem.java index c8b118b..ca842e8 100644 --- a/src/testmod/java/io/github/ladysnake/paltest/BadFlightItem.java +++ b/src/testmod/java/io/github/ladysnake/paltest/BadFlightItem.java @@ -41,7 +41,7 @@ public BadFlightItem(Settings settings) { @Override public ActionResult use(World world, PlayerEntity user, Hand hand) { - if (!world.isClient) { + if (!world.isClient()) { // Direct ability access, issues abound ! user.getAbilities().allowFlying = !user.getAbilities().allowFlying; user.getAbilities().flying &= user.getAbilities().allowFlying;