diff --git a/changelog.md b/changelog.md index 801fbf1..51fa505 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +------------------------------------------------------ +Version 3.2.1 +------------------------------------------------------ +- Fixed inadvertent clientside requirement from the 1.20.6 port + ------------------------------------------------------ Version 3.2.0 ------------------------------------------------------ diff --git a/gradle.properties b/gradle.properties index 63d62fd..36e0fa8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ jb_annotations_version = 23.0.0 apiguardian_version = 1.1.2 # Mod Properties -mod_version = 3.2.0 +mod_version = 3.2.1 maven_group = org.ladysnake archives_base_name = impersonate diff --git a/src/main/java/org/ladysnake/impersonate/impl/PlayerImpersonator.java b/src/main/java/org/ladysnake/impersonate/impl/PlayerImpersonator.java index 813d080..44d831b 100644 --- a/src/main/java/org/ladysnake/impersonate/impl/PlayerImpersonator.java +++ b/src/main/java/org/ladysnake/impersonate/impl/PlayerImpersonator.java @@ -18,29 +18,27 @@ package org.ladysnake.impersonate.impl; import com.mojang.authlib.GameProfile; -import net.minecraft.network.RegistryByteBuf; -import net.minecraft.registry.RegistryWrapper; -import org.ladysnake.cca.api.v3.component.CopyableComponent; -import org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent; import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; import net.minecraft.component.type.ProfileComponent; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; -import net.minecraft.nbt.NbtHelper; import net.minecraft.nbt.NbtList; import net.minecraft.nbt.NbtOps; -import net.minecraft.network.PacketByteBuf; +import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodecs; import net.minecraft.network.listener.ClientPlayPacketListener; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.s2c.play.PlayerListS2CPacket; import net.minecraft.network.packet.s2c.play.PlayerRemoveS2CPacket; +import net.minecraft.registry.RegistryWrapper; import net.minecraft.server.PlayerManager; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.ladysnake.cca.api.v3.component.CopyableComponent; +import org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent; import org.ladysnake.impersonate.Impersonate; import org.ladysnake.impersonate.Impersonator; @@ -48,7 +46,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.UUID; public class PlayerImpersonator implements Impersonator, AutoSyncedComponent, CopyableComponent { @@ -192,8 +189,10 @@ public void copyFrom(PlayerImpersonator other, RegistryWrapper.WrapperLookup reg this.resetImpersonation(); } - private static final int ID_PRESENT = 0b01; - private static final int NAME_PRESENT = 0b10; + @Override + public boolean isRequiredOnClient() { + return false; + } @Override public boolean shouldSyncWith(ServerPlayerEntity player) {