Skip to content

Commit

Permalink
Update to 1.16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Aug 13, 2020
1 parent faa9437 commit 1cefbf8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
------------------------------------------------------
Version 1.2.1
------------------------------------------------------
- Updated to 1.16.2
- Clarified the error when accessing abilities from a client

------------------------------------------------------
Version 1.2.0
------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16-pre7
yarn_mappings=1.16-pre7+build.1
loader_version=0.8.7+build.201
fabric_version=0.12.4+build.365-1.16
minecraft_version=1.16.2
yarn_mappings=1.16.2+build.6
loader_version=0.9.1+build.205
fabric_version=0.17.2+build.396-1.16

# Mod Properties
mod_version = 1.2.0
mod_version = 1.2.1
maven_group = io.github.ladysnake
archives_base_name = Pal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface PlayerAbilityView {
*/
static PlayerAbilityView of(PlayerEntity player) {
if (player.world.isClient) {
throw new IllegalStateException("Player abilities must be accessed from the logical server !");
throw new IllegalStateException("Player abilities must be accessed from the logical server (check !world.isClient)");
}
return (PlayerAbilityView) player;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntity implements Pl
@Unique
private final Map<PlayerAbility, AbilityTracker> palAbilities = new LinkedHashMap<>();

public ServerPlayerEntityMixin(World world, BlockPos pos, GameProfile profile) {
super(world, pos, profile);
public ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile profile) {
super(world, pos, yaw, profile);
}

@Inject(method = "<init>", at = @At("RETURN"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class ServerPlayerInteractionManagerMixin {
method = "setGameMode",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/GameMode;setAbilitites(Lnet/minecraft/entity/player/PlayerAbilities;)V"
target = "Lnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)V"
))
private void saveFlying(GameMode newMode, GameMode previousMode, CallbackInfo info) {
PAL_FLYING.set(player.abilities.flying);
Expand All @@ -52,7 +52,7 @@ private void saveFlying(GameMode newMode, GameMode previousMode, CallbackInfo in
method = "setGameMode",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/GameMode;setAbilitites(Lnet/minecraft/entity/player/PlayerAbilities;)V",
target = "Lnet/minecraft/world/GameMode;setAbilities(Lnet/minecraft/entity/player/PlayerAbilities;)V",
shift = AFTER
))
private void keepAbilities(GameMode newMode, GameMode previousMode, CallbackInfo info) {
Expand Down

0 comments on commit 1cefbf8

Please sign in to comment.