architectury-api
architectury-api copied to clipboard
PlayerEvent.PlayerClone reversed parameters on Fabric.
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);
}
https://github.com/architectury/architectury-api/blob/cca739db53e9e451a74435c21c9b4cefd0d8d538/fabric/src/main/java/dev/architectury/mixin/fabric/MixinServerPlayer.java#L40
Edit: fixed code blocks
#391
This was fixed in https://github.com/architectury/architectury-api/commit/b1e7c89ffb3d2ba95799748cd1ab4ef67e68cbe4