Architectury API (UNUSED)

Architectury API (UNUSED)

9M Downloads

PlayerEvent.PlayerClone reversed parameters on Fabric.

RedPxnda opened this issue ยท 2 comments

commented

As the title says, the player clone event reversed the parameters specifically on fabric. Forge still works fine.

Fabric's Player Clone Event Mixin:

@Inject(method = "copyFrom", at = @At("TAIL"))
   private void onCopyFrom(ServerPlayer oldPlayer, boolean alive, CallbackInfo ci) {
       ServerPlayerEvents.COPY_FROM.invoker().copyFromPlayer(oldPlayer, (ServerPlayer) (Object) this, alive);
   }

Arch's:

    private void restoreFrom(ServerPlayer serverPlayer, boolean bl, CallbackInfo ci) {
        PlayerEvent.PLAYER_CLONE.invoker().clone((ServerPlayer) (Object) this, serverPlayer, bl);
    }

PlayerEvent.PLAYER_CLONE.invoker().clone((ServerPlayer) (Object) this, serverPlayer, bl);

Edit: fixed code blocks

commented

This was fixed in b1e7c89

commented