diff --git a/changelog.md b/changelog.md index cd81e96..86e19c1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +------------------------------------------------------ +Version 1.3.0 +------------------------------------------------------ +- Updated to 21w10a + ------------------------------------------------------ Version 1.2.1 ------------------------------------------------------ diff --git a/gradle.properties b/gradle.properties index ef29c89..2c1f056 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,13 +3,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use -minecraft_version=20w45a -yarn_mappings=20w45a+build.31 -loader_version=0.10.6+build.214 -fabric_version=0.25.4+1.17 +minecraft_version=21w10a +yarn_mappings=21w10a+build.2 +loader_version=0.11.2 +#Fabric api +fabric_version=0.32.1+1.17 # Mod Properties -mod_version = 1.3.0-nightly.20w45a +mod_version = 1.3.0-nightly.21w10a maven_group = io.github.ladysnake archives_base_name = Pal @@ -18,7 +19,7 @@ owners = Ladysnake license_header = LGPL gpl_version = 3 curseforge_id = 359522 -curseforge_versions = 1.16 +curseforge_versions = 1.17 cf_requirements = fabric-api release_type = release changelog_url = https://github.com/Ladysnake/PlayerAbilityLib/blob/master/changelog.md 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 3586cff..53a66ab 100644 --- a/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java +++ b/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java @@ -76,7 +76,7 @@ public void checkConflict() { private static GameMode getGamemode(PlayerEntity player) { if (player.world.isClient) { PlayerListEntry playerListEntry = Objects.requireNonNull(MinecraftClient.getInstance().getNetworkHandler()).getPlayerListEntry(player.getGameProfile().getId()); - return playerListEntry != null ? playerListEntry.getGameMode() : GameMode.NOT_SET; + return playerListEntry != null ? playerListEntry.getGameMode() : GameMode.SURVIVAL; } else { return ((ServerPlayerEntity) player).interactionManager.getGameMode(); } diff --git a/src/main/java/io/github/ladysnake/pal/impl/mixin/ServerPlayerEntityMixin.java b/src/main/java/io/github/ladysnake/pal/impl/mixin/ServerPlayerEntityMixin.java index 7d8cb11..6c1c76d 100644 --- a/src/main/java/io/github/ladysnake/pal/impl/mixin/ServerPlayerEntityMixin.java +++ b/src/main/java/io/github/ladysnake/pal/impl/mixin/ServerPlayerEntityMixin.java @@ -56,7 +56,7 @@ public ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile } @Inject(method = "", at = @At("RETURN")) - private void init(MinecraftServer server, ServerWorld world, GameProfile profile, ServerPlayerInteractionManager interactionManager, CallbackInfo ci) { + private void init(MinecraftServer server, ServerWorld world, GameProfile profile, CallbackInfo ci) { PalInternals.populate(this, this.palAbilities); } @@ -92,7 +92,7 @@ private void checkAbilityConsistency(CallbackInfo ci) { } } - @Inject(method = "writeCustomDataToTag", at = @At("RETURN")) + @Inject(method = "writeCustomDataToNbt", at = @At("RETURN")) private void writeAbilitiesToTag(CompoundTag tag, CallbackInfo ci) { ListTag list = new ListTag(); for (Map.Entry entry : this.palAbilities.entrySet()) { @@ -105,8 +105,8 @@ private void writeAbilitiesToTag(CompoundTag tag, CallbackInfo ci) { } @Inject( - method = "readCustomDataFromTag", - at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;readCustomDataFromTag(Lnet/minecraft/nbt/CompoundTag;)V", shift = At.Shift.AFTER) + method = "readCustomDataFromNbt", + at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;readCustomDataFromNbt(Lnet/minecraft/nbt/CompoundTag;)V", shift = At.Shift.AFTER) ) private void readAbilitiesFromTag(CompoundTag tag, CallbackInfo ci) { for (Tag t : tag.getList("playerabilitylib:abilities", NbtType.COMPOUND)) {