Skip to content

Commit

Permalink
Update to 21w10a
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Mar 11, 2021
1 parent 839901a commit 5aaa6ad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 1.3.0
------------------------------------------------------
- Updated to 21w10a

------------------------------------------------------
Version 1.2.1
------------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile
}

@Inject(method = "<init>", 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);
}

Expand Down Expand Up @@ -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<PlayerAbility, AbilityTracker> entry : this.palAbilities.entrySet()) {
Expand All @@ -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)) {
Expand Down

0 comments on commit 5aaa6ad

Please sign in to comment.