Keep original model bit flags after copying

This commit is contained in:
Sollace 2023-09-02 16:57:54 +01:00
parent 806538858e
commit 0d7df76c9c
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -185,6 +185,9 @@ public class MindSwapSpell extends MimicSpell implements ProjectileDelegate.Enti
final UUID aUUid = a.getUuid();
final UUID bUUid = b.getUuid();
final byte aModelBits = a.getDataTracker().get(PlayerAccess.getModelBitFlag());
final byte bModelBits = b.getDataTracker().get(PlayerAccess.getModelBitFlag());
final ServerPlayerEntity aClone = clonePlayer(a);
final ServerPlayerEntity bClone = clonePlayer(b);
@ -197,6 +200,9 @@ public class MindSwapSpell extends MimicSpell implements ProjectileDelegate.Enti
a.setUuid(aUUid);
b.setUuid(bUUid);
a.getDataTracker().set(PlayerAccess.getModelBitFlag(), aModelBits);
b.getDataTracker().set(PlayerAccess.getModelBitFlag(), bModelBits);
a.interactionManager.changeGameMode(aMode);
b.interactionManager.changeGameMode(bMode);