diff --git a/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodecHelper.java b/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodecHelper.java index 1b215218..64066740 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodecHelper.java +++ b/src/main/java/com/github/steveice10/mc/protocol/codec/MinecraftCodecHelper.java @@ -521,9 +521,9 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper { } else if (positionSource instanceof EntityPositionSource) { this.writeVarInt(buf, ((EntityPositionSource) positionSource).getEntityId()); buf.writeFloat(((EntityPositionSource) positionSource).getYOffset()); + } else { + throw new IllegalStateException("Unknown position source type!"); } - - throw new IllegalStateException("Unknown position source type!"); } public VillagerData readVillagerData(ByteBuf buf) {