Prevent the temporary player from being ticked

This commit is contained in:
Sollace 2023-09-02 16:32:54 +01:00
parent 0e75b8e5ff
commit 3a18054752
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -208,7 +208,12 @@ public class MindSwapSpell extends MimicSpell implements ProjectileDelegate.Enti
} }
private static ServerPlayerEntity clonePlayer(ServerPlayerEntity player) { private static ServerPlayerEntity clonePlayer(ServerPlayerEntity player) {
ServerPlayerEntity clone = new ServerPlayerEntity(player.getServer(), player.getServerWorld(), player.getGameProfile()); ServerPlayerEntity clone = new ServerPlayerEntity(player.getServer(), player.getServerWorld(), player.getGameProfile()) {
@Override
public void tick() {
discard();
}
};
NbtCompound compound = player.writeNbt(new NbtCompound()); NbtCompound compound = player.writeNbt(new NbtCompound());
compound.remove("Dimension"); compound.remove("Dimension");