@Override
public EntityPropertiesMessage decode(ByteBuf buffer) throws IOException {
int entityID = buffer.readInt();
int amount = buffer.readInt();
System.out.println(amount);
EntityPropertiesMessage msg = new EntityPropertiesMessage(entityID);
Map<EntityPropertiesCodec, Double> map = new HashMap<EntityPropertiesCodec, Double>();
for (int i = 1; i <= amount; i++) {
msg.addProperty(EntityPropertiesMessage.EntityProperties.getByName(ByteBufUtils.readString(buffer)), buffer.readDouble());
}
return msg;
}